mirror of
https://github.com/ae-utbm/sith.git
synced 2024-12-23 00:01:16 +00:00
Merge branch 'subscriptions' into 'master'
Subscriptions stats Des « statistiques » de cotisations C'est pratique See merge request !78
This commit is contained in:
commit
969d5699fa
16
core/static/core/js/Chart.bundle.min.js
vendored
Normal file
16
core/static/core/js/Chart.bundle.min.js
vendored
Normal file
File diff suppressed because one or more lines are too long
@ -16,6 +16,7 @@
|
||||
{% endif %}
|
||||
{% if user.is_in_group(settings.SITH_MAIN_BOARD_GROUP) or user.is_root %}
|
||||
<li><a href="{{ url('subscription:subscription') }}">{% trans %}Subscriptions{% endtrans %}</a></li>
|
||||
<li><a href="{{ url('subscription:stats') }}">{% trans %}Subscription stats{% endtrans %}</a></li>
|
||||
<li><a href="{{ url('club:club_new') }}">{% trans %}New club{% endtrans %}</a></li>
|
||||
{% endif %}
|
||||
</ul>
|
||||
|
@ -6,7 +6,7 @@
|
||||
msgid ""
|
||||
msgstr ""
|
||||
"Report-Msgid-Bugs-To: \n"
|
||||
"POT-Creation-Date: 2017-05-31 23:42+0200\n"
|
||||
"POT-Creation-Date: 2017-06-06 23:25+0200\n"
|
||||
"PO-Revision-Date: 2016-07-18\n"
|
||||
"Last-Translator: Skia <skia@libskia.so>\n"
|
||||
"Language-Team: AE info <ae.info@utbm.fr>\n"
|
||||
@ -126,8 +126,8 @@ msgstr "numéro"
|
||||
msgid "journal"
|
||||
msgstr "classeur"
|
||||
|
||||
#: accounting/models.py:254 core/models.py:596 core/models.py:967
|
||||
#: core/models.py:1007 counter/models.py:276 counter/models.py:324
|
||||
#: accounting/models.py:254 core/models.py:600 core/models.py:971
|
||||
#: core/models.py:1011 counter/models.py:276 counter/models.py:324
|
||||
#: counter/models.py:450 eboutic/models.py:39 eboutic/models.py:72
|
||||
#: forum/models.py:236 forum/models.py:308 stock/models.py:76
|
||||
msgid "date"
|
||||
@ -293,7 +293,7 @@ msgstr "Liste des types comptable"
|
||||
#: accounting/templates/accounting/label_list.jinja:9
|
||||
#: accounting/templates/accounting/operation_edit.jinja:9
|
||||
#: accounting/templates/accounting/simplifiedaccountingtype_list.jinja:9
|
||||
#: core/templates/core/user_tools.jinja:54
|
||||
#: core/templates/core/user_tools.jinja:55
|
||||
msgid "Accounting"
|
||||
msgstr "Comptabilité"
|
||||
|
||||
@ -312,7 +312,7 @@ msgstr "Il n'y a pas de types comptable dans ce site web."
|
||||
|
||||
#: accounting/templates/accounting/bank_account_details.jinja:4
|
||||
#: accounting/templates/accounting/bank_account_details.jinja:13
|
||||
#: core/templates/core/user_tools.jinja:63
|
||||
#: core/templates/core/user_tools.jinja:64
|
||||
msgid "Bank account: "
|
||||
msgstr "Compte en banque : "
|
||||
|
||||
@ -326,8 +326,8 @@ msgstr "Compte en banque : "
|
||||
#: core/templates/core/file_detail.jinja:25
|
||||
#: core/templates/core/file_detail.jinja:62
|
||||
#: core/templates/core/file_moderation.jinja:24
|
||||
#: core/templates/core/group_list.jinja:13 core/templates/core/macros.jinja:49
|
||||
#: core/templates/core/macros.jinja:68
|
||||
#: core/templates/core/group_list.jinja:13 core/templates/core/macros.jinja:53
|
||||
#: core/templates/core/macros.jinja:72
|
||||
#: core/templates/core/pagerev_edit.jinja:28
|
||||
#: core/templates/core/user_account_detail.jinja:38
|
||||
#: core/templates/core/user_edit.jinja:19
|
||||
@ -335,12 +335,11 @@ msgstr "Compte en banque : "
|
||||
#: counter/templates/counter/last_ops.jinja:59
|
||||
#: election/templates/election/election_detail.jinja:280
|
||||
#: election/templates/election/election_detail.jinja:329
|
||||
#: forum/templates/forum/macros.jinja:21
|
||||
#: forum/templates/forum/macros.jinja:123
|
||||
#: forum/templates/forum/macros.jinja:21 forum/templates/forum/macros.jinja:123
|
||||
#: launderette/templates/launderette/launderette_admin.jinja:16
|
||||
#: launderette/views.py:178 sas/templates/sas/album.jinja:26
|
||||
#: sas/templates/sas/moderation.jinja:18 sas/templates/sas/picture.jinja:74
|
||||
#: sas/templates/sas/picture.jinja:124
|
||||
#: sas/templates/sas/picture.jinja.py:124
|
||||
#: stock/templates/stock/stock_shopping_list.jinja:43
|
||||
#: stock/templates/stock/stock_shopping_list.jinja:69
|
||||
#: trombi/templates/trombi/detail.jinja:28
|
||||
@ -372,7 +371,7 @@ msgstr "Nouveau compte club"
|
||||
#: com/templates/com/news_admin_list.jinja:72
|
||||
#: com/templates/com/weekmail.jinja:32 com/templates/com/weekmail.jinja:61
|
||||
#: core/templates/core/file.jinja:38 core/templates/core/page.jinja:31
|
||||
#: core/templates/core/user_tools.jinja:39 core/views/user.py:177
|
||||
#: core/templates/core/user_tools.jinja:40 core/views/user.py:177
|
||||
#: counter/templates/counter/cash_summary_list.jinja:53
|
||||
#: counter/templates/counter/counter_list.jinja:17
|
||||
#: counter/templates/counter/counter_list.jinja:32
|
||||
@ -491,14 +490,14 @@ msgstr "Non"
|
||||
|
||||
#: accounting/templates/accounting/club_account_details.jinja:56
|
||||
#: com/templates/com/news_admin_list.jinja:38
|
||||
#: com/templates/com/news_admin_list.jinja:71
|
||||
#: core/templates/core/file.jinja:36 core/templates/core/page.jinja:28
|
||||
#: com/templates/com/news_admin_list.jinja:71 core/templates/core/file.jinja:36
|
||||
#: core/templates/core/page.jinja:28
|
||||
msgid "View"
|
||||
msgstr "Voir"
|
||||
|
||||
#: accounting/templates/accounting/co_list.jinja:4
|
||||
#: accounting/templates/accounting/journal_details.jinja:18
|
||||
#: core/templates/core/user_tools.jinja:59
|
||||
#: core/templates/core/user_tools.jinja:60
|
||||
msgid "Company list"
|
||||
msgstr "Liste des entreprises"
|
||||
|
||||
@ -696,7 +695,7 @@ msgstr "Opération liée : "
|
||||
#: core/templates/core/user_preferences.jinja:12
|
||||
#: core/templates/core/user_preferences.jinja:19
|
||||
#: counter/templates/counter/cash_register_summary.jinja:22
|
||||
#: forum/templates/forum/reply.jinja:31
|
||||
#: forum/templates/forum/reply.jinja:32
|
||||
#: subscription/templates/subscription/subscription.jinja:24
|
||||
#: trombi/templates/trombi/comment.jinja:26
|
||||
#: trombi/templates/trombi/user_tools.jinja:13
|
||||
@ -859,13 +858,12 @@ msgstr "L'utilisateur est déjà membre de ce club"
|
||||
msgid "past member"
|
||||
msgstr "Anciens membres"
|
||||
|
||||
#: club/templates/club/club_list.jinja:4
|
||||
#: club/templates/club/club_list.jinja:24
|
||||
#: club/templates/club/club_list.jinja:4 club/templates/club/club_list.jinja:24
|
||||
msgid "Club list"
|
||||
msgstr "Liste des clubs"
|
||||
|
||||
#: club/templates/club/club_list.jinja:21
|
||||
#: core/templates/core/user_tools.jinja:19
|
||||
#: core/templates/core/user_tools.jinja:20
|
||||
msgid "New club"
|
||||
msgstr "Nouveau club"
|
||||
|
||||
@ -922,14 +920,13 @@ msgstr "Du"
|
||||
msgid "To"
|
||||
msgstr "Au"
|
||||
|
||||
#: club/templates/club/club_sellings.jinja:5 club/views.py:84
|
||||
#: club/views.py:247 counter/templates/counter/counter_main.jinja:19
|
||||
#: club/templates/club/club_sellings.jinja:5 club/views.py:84 club/views.py:247
|
||||
#: counter/templates/counter/counter_main.jinja:19
|
||||
#: counter/templates/counter/last_ops.jinja:35
|
||||
msgid "Sellings"
|
||||
msgstr "Ventes"
|
||||
|
||||
#: club/templates/club/club_sellings.jinja:9
|
||||
#: club/templates/club/stats.jinja:19
|
||||
#: club/templates/club/club_sellings.jinja:9 club/templates/club/stats.jinja:19
|
||||
#: counter/templates/counter/cash_summary_list.jinja:15
|
||||
msgid "Show"
|
||||
msgstr "Montrer"
|
||||
@ -985,6 +982,8 @@ msgstr "Quantité"
|
||||
#: counter/templates/counter/cash_summary_list.jinja:35
|
||||
#: counter/templates/counter/last_ops.jinja:44
|
||||
#: counter/templates/counter/stats.jinja:18
|
||||
#: subscription/templates/subscription/stats.jinja:33
|
||||
#: subscription/templates/subscription/stats.jinja:41
|
||||
msgid "Total"
|
||||
msgstr "Total"
|
||||
|
||||
@ -997,7 +996,7 @@ msgid "Payment method"
|
||||
msgstr "Méthode de paiement"
|
||||
|
||||
#: club/templates/club/club_tools.jinja:4
|
||||
#: core/templates/core/user_tools.jinja:95
|
||||
#: core/templates/core/user_tools.jinja:96
|
||||
msgid "Club tools"
|
||||
msgstr "Outils club"
|
||||
|
||||
@ -1069,7 +1068,7 @@ msgid "Begin date"
|
||||
msgstr "Date de début"
|
||||
|
||||
#: club/views.py:196 com/views.py:123 counter/views.py:1020
|
||||
#: election/views.py:131
|
||||
#: election/views.py:131 subscription/views.py:50
|
||||
msgid "End date"
|
||||
msgstr "Date de fin"
|
||||
|
||||
@ -1124,7 +1123,7 @@ msgstr "résumé"
|
||||
msgid "content"
|
||||
msgstr "contenu"
|
||||
|
||||
#: com/models.py:63 core/models.py:1006 launderette/models.py:84
|
||||
#: com/models.py:63 core/models.py:1010 launderette/models.py:84
|
||||
#: launderette/models.py:109 launderette/models.py:145 stock/models.py:59
|
||||
#: stock/models.py:98
|
||||
msgid "type"
|
||||
@ -1134,7 +1133,7 @@ msgstr "type"
|
||||
msgid "author"
|
||||
msgstr "auteur"
|
||||
|
||||
#: com/models.py:66 core/models.py:597
|
||||
#: com/models.py:66 core/models.py:601
|
||||
msgid "is moderated"
|
||||
msgstr "est modéré"
|
||||
|
||||
@ -1187,9 +1186,8 @@ msgid "News admin"
|
||||
msgstr "Administration des nouvelles"
|
||||
|
||||
#: com/templates/com/news_admin_list.jinja:9
|
||||
#: com/templates/com/news_detail.jinja:5
|
||||
#: com/templates/com/news_detail.jinja:11 com/templates/com/news_list.jinja:4
|
||||
#: com/templates/com/news_list.jinja:28
|
||||
#: com/templates/com/news_detail.jinja:5 com/templates/com/news_detail.jinja:11
|
||||
#: com/templates/com/news_list.jinja:4 com/templates/com/news_list.jinja:28
|
||||
msgid "News"
|
||||
msgstr "Nouvelles"
|
||||
|
||||
@ -1265,7 +1263,7 @@ msgid "Edit news"
|
||||
msgstr "Éditer la nouvelle"
|
||||
|
||||
#: com/templates/com/news_edit.jinja:8 com/templates/com/news_edit.jinja:30
|
||||
#: core/templates/core/user_tools.jinja:81
|
||||
#: core/templates/core/user_tools.jinja:82
|
||||
msgid "Create news"
|
||||
msgstr "Créer nouvelle"
|
||||
|
||||
@ -1294,7 +1292,7 @@ msgstr ""
|
||||
|
||||
#: com/templates/com/news_edit.jinja:55 com/templates/com/weekmail.jinja:10
|
||||
#: core/templates/core/pagerev_edit.jinja:25
|
||||
#: forum/templates/forum/reply.jinja:30
|
||||
#: forum/templates/forum/reply.jinja:31
|
||||
msgid "Preview"
|
||||
msgstr "Prévisualiser"
|
||||
|
||||
@ -1311,7 +1309,7 @@ msgid "Coming soon... don't miss!"
|
||||
msgstr "Prochainement... à ne pas rater!"
|
||||
|
||||
#: com/templates/com/weekmail.jinja:5 com/templates/com/weekmail.jinja.py:9
|
||||
#: com/views.py:61 core/templates/core/user_tools.jinja:79
|
||||
#: com/views.py:61 core/templates/core/user_tools.jinja:80
|
||||
msgid "Weekmail"
|
||||
msgstr "Weekmail"
|
||||
|
||||
@ -1401,7 +1399,7 @@ msgstr "Le mot de la fin"
|
||||
msgid "Communication administration"
|
||||
msgstr "Administration de la communication"
|
||||
|
||||
#: com/views.py:66 core/templates/core/user_tools.jinja:80
|
||||
#: com/views.py:66 core/templates/core/user_tools.jinja:81
|
||||
msgid "Weekmail destinations"
|
||||
msgstr "Destinataires du Weekmail"
|
||||
|
||||
@ -1417,7 +1415,7 @@ msgstr "Message d'info"
|
||||
msgid "Alert message"
|
||||
msgstr "Message d'alerte"
|
||||
|
||||
#: com/views.py:122 election/views.py:130
|
||||
#: com/views.py:122 election/views.py:130 subscription/views.py:47
|
||||
msgid "Start date"
|
||||
msgstr "Date de début"
|
||||
|
||||
@ -1677,120 +1675,120 @@ msgstr "profil visible par les cotisants"
|
||||
msgid "A user with that username already exists"
|
||||
msgstr "Un utilisateur de ce nom d'utilisateur existe déjà"
|
||||
|
||||
#: core/models.py:474 core/templates/core/macros.jinja:17
|
||||
#: core/models.py:474 core/templates/core/macros.jinja:21
|
||||
#: core/templates/core/user_detail.jinja:14
|
||||
#: core/templates/core/user_detail.jinja:16
|
||||
#: core/templates/core/user_edit.jinja:17
|
||||
#: election/templates/election/election_detail.jinja:316
|
||||
#: forum/templates/forum/macros.jinja:93 forum/templates/forum/macros.jinja:95
|
||||
#: forum/templates/forum/reply.jinja:36 forum/templates/forum/reply.jinja:38
|
||||
#: forum/templates/forum/reply.jinja:37 forum/templates/forum/reply.jinja:39
|
||||
#: trombi/templates/trombi/user_tools.jinja:43
|
||||
msgid "Profile"
|
||||
msgstr "Profil"
|
||||
|
||||
#: core/models.py:554
|
||||
#: core/models.py:558
|
||||
msgid "Visitor"
|
||||
msgstr "Visiteur"
|
||||
|
||||
#: core/models.py:559
|
||||
#: core/models.py:563
|
||||
msgid "do you want to receive the weekmail"
|
||||
msgstr "voulez-vous recevoir le Weekmail"
|
||||
|
||||
#: core/models.py:564
|
||||
#: core/models.py:568
|
||||
msgid "define if we show a users stats"
|
||||
msgstr "Definit si l'on montre les statistiques de l'utilisateur"
|
||||
|
||||
#: core/models.py:566
|
||||
#: core/models.py:570
|
||||
msgid "Show your account statistics to others"
|
||||
msgstr "Montrez vos statistiques de compte aux autres"
|
||||
|
||||
#: core/models.py:585
|
||||
#: core/models.py:589
|
||||
msgid "file name"
|
||||
msgstr "nom du fichier"
|
||||
|
||||
#: core/models.py:586 core/models.py:794
|
||||
#: core/models.py:590 core/models.py:798
|
||||
msgid "parent"
|
||||
msgstr "parent"
|
||||
|
||||
#: core/models.py:587 core/models.py:603
|
||||
#: core/models.py:591 core/models.py:607
|
||||
msgid "file"
|
||||
msgstr "fichier"
|
||||
|
||||
#: core/models.py:588
|
||||
#: core/models.py:592
|
||||
msgid "compressed file"
|
||||
msgstr "version allégée"
|
||||
|
||||
#: core/models.py:589
|
||||
#: core/models.py:593
|
||||
msgid "thumbnail"
|
||||
msgstr "miniature"
|
||||
|
||||
#: core/models.py:590 core/models.py:598
|
||||
#: core/models.py:594 core/models.py:602
|
||||
msgid "owner"
|
||||
msgstr "propriétaire"
|
||||
|
||||
#: core/models.py:591 core/models.py:800 core/views/files.py:146
|
||||
#: core/models.py:595 core/models.py:804 core/views/files.py:146
|
||||
msgid "edit group"
|
||||
msgstr "groupe d'édition"
|
||||
|
||||
#: core/models.py:592 core/models.py:801 core/views/files.py:147
|
||||
#: core/models.py:596 core/models.py:805 core/views/files.py:147
|
||||
msgid "view group"
|
||||
msgstr "groupe de vue"
|
||||
|
||||
#: core/models.py:593
|
||||
#: core/models.py:597
|
||||
msgid "is folder"
|
||||
msgstr "est un dossier"
|
||||
|
||||
#: core/models.py:594
|
||||
#: core/models.py:598
|
||||
msgid "mime type"
|
||||
msgstr "type mime"
|
||||
|
||||
#: core/models.py:595
|
||||
#: core/models.py:599
|
||||
msgid "size"
|
||||
msgstr "taille"
|
||||
|
||||
#: core/models.py:599
|
||||
#: core/models.py:603
|
||||
msgid "asked for removal"
|
||||
msgstr "retrait demandé"
|
||||
|
||||
#: core/models.py:600
|
||||
#: core/models.py:604
|
||||
msgid "is in the SAS"
|
||||
msgstr "est dans le SAS"
|
||||
|
||||
#: core/models.py:639
|
||||
#: core/models.py:643
|
||||
msgid "Character '/' not authorized in name"
|
||||
msgstr "Le caractère '/' n'est pas autorisé dans les noms de fichier"
|
||||
|
||||
#: core/models.py:642 core/models.py:647
|
||||
#: core/models.py:646 core/models.py:651
|
||||
msgid "Loop in folder tree"
|
||||
msgstr "Boucle dans l'arborescence des dossiers"
|
||||
|
||||
#: core/models.py:651
|
||||
#: core/models.py:655
|
||||
msgid "You can not make a file be a children of a non folder file"
|
||||
msgstr ""
|
||||
"Vous ne pouvez pas mettre un fichier enfant de quelque chose qui n'est pas "
|
||||
"un dossier"
|
||||
|
||||
#: core/models.py:655
|
||||
#: core/models.py:659
|
||||
msgid "Duplicate file"
|
||||
msgstr "Un fichier de ce nom existe déjà"
|
||||
|
||||
#: core/models.py:669
|
||||
#: core/models.py:673
|
||||
msgid "You must provide a file"
|
||||
msgstr "Vous devez fournir un fichier"
|
||||
|
||||
#: core/models.py:735
|
||||
#: core/models.py:739
|
||||
msgid "Folder: "
|
||||
msgstr "Dossier : "
|
||||
|
||||
#: core/models.py:737
|
||||
#: core/models.py:741
|
||||
msgid "File: "
|
||||
msgstr "Fichier : "
|
||||
|
||||
#: core/models.py:785
|
||||
#: core/models.py:789
|
||||
msgid "page unix name"
|
||||
msgstr "nom unix de la page"
|
||||
|
||||
#: core/models.py:789
|
||||
#: core/models.py:793
|
||||
msgid ""
|
||||
"Enter a valid page name. This value may contain only unaccented letters, "
|
||||
"numbers and ./+/-/_ characters."
|
||||
@ -1798,51 +1796,51 @@ msgstr ""
|
||||
"Entrez un nom de page correct. Uniquement des lettres non accentuées, "
|
||||
"numéros, et ./+/-/_"
|
||||
|
||||
#: core/models.py:797
|
||||
#: core/models.py:801
|
||||
msgid "page name"
|
||||
msgstr "nom de la page"
|
||||
|
||||
#: core/models.py:798
|
||||
#: core/models.py:802
|
||||
msgid "owner group"
|
||||
msgstr "groupe propriétaire"
|
||||
|
||||
#: core/models.py:802
|
||||
#: core/models.py:806
|
||||
msgid "lock user"
|
||||
msgstr "utilisateur bloquant"
|
||||
|
||||
#: core/models.py:803
|
||||
#: core/models.py:807
|
||||
msgid "lock_timeout"
|
||||
msgstr "décompte du déblocage"
|
||||
|
||||
#: core/models.py:830
|
||||
#: core/models.py:834
|
||||
msgid "Duplicate page"
|
||||
msgstr "Une page de ce nom existe déjà"
|
||||
|
||||
#: core/models.py:836
|
||||
#: core/models.py:840
|
||||
msgid "Loop in page tree"
|
||||
msgstr "Boucle dans l'arborescence des pages"
|
||||
|
||||
#: core/models.py:964
|
||||
#: core/models.py:968
|
||||
msgid "revision"
|
||||
msgstr "révision"
|
||||
|
||||
#: core/models.py:965
|
||||
#: core/models.py:969
|
||||
msgid "page title"
|
||||
msgstr "titre de la page"
|
||||
|
||||
#: core/models.py:966
|
||||
#: core/models.py:970
|
||||
msgid "page content"
|
||||
msgstr "contenu de la page"
|
||||
|
||||
#: core/models.py:1004
|
||||
#: core/models.py:1008
|
||||
msgid "url"
|
||||
msgstr "url"
|
||||
|
||||
#: core/models.py:1005
|
||||
#: core/models.py:1009
|
||||
msgid "param"
|
||||
msgstr "param"
|
||||
|
||||
#: core/models.py:1008
|
||||
#: core/models.py:1012
|
||||
msgid "viewed"
|
||||
msgstr "vue"
|
||||
|
||||
@ -1875,8 +1873,7 @@ msgstr "S'enregister"
|
||||
msgid "View more"
|
||||
msgstr "Voir plus"
|
||||
|
||||
#: core/templates/core/base.jinja:62
|
||||
#: forum/templates/forum/last_unread.jinja:16
|
||||
#: core/templates/core/base.jinja:62 forum/templates/forum/last_unread.jinja:16
|
||||
msgid "Mark all as read"
|
||||
msgstr "Marquer tout commme lu"
|
||||
|
||||
@ -1908,7 +1905,7 @@ msgstr "SAS"
|
||||
|
||||
#: core/templates/core/base.jinja:94 forum/templates/forum/forum.jinja:10
|
||||
#: forum/templates/forum/last_unread.jinja:13
|
||||
#: forum/templates/forum/main.jinja:6 forum/templates/forum/main.jinja:11
|
||||
#: forum/templates/forum/main.jinja:6 forum/templates/forum/main.jinja.py:11
|
||||
#: forum/templates/forum/main.jinja:14 forum/templates/forum/reply.jinja:15
|
||||
#: forum/templates/forum/topic.jinja:30
|
||||
msgid "Forum"
|
||||
@ -2122,30 +2119,28 @@ msgstr "login"
|
||||
msgid "Lost password?"
|
||||
msgstr "Mot de passe perdu ?"
|
||||
|
||||
#: core/templates/core/macros.jinja:27
|
||||
#: core/templates/core/user_detail.jinja:27
|
||||
#: core/templates/core/macros.jinja:31 core/templates/core/user_detail.jinja:27
|
||||
msgid "Born: "
|
||||
msgstr "Né le : "
|
||||
|
||||
#: core/templates/core/macros.jinja:31
|
||||
#: core/templates/core/user_detail.jinja:48
|
||||
#: core/templates/core/macros.jinja:35 core/templates/core/user_detail.jinja:48
|
||||
msgid "Promo: "
|
||||
msgstr "Promo : "
|
||||
|
||||
#: core/templates/core/macros.jinja:38
|
||||
#: core/templates/core/macros.jinja:42
|
||||
#, python-format
|
||||
msgid "Subscribed until %(subscription_end)s"
|
||||
msgstr "Cotisant jusqu'au %(subscription_end)s"
|
||||
|
||||
#: core/templates/core/macros.jinja:39 core/templates/core/user_edit.jinja:40
|
||||
#: core/templates/core/macros.jinja:43 core/templates/core/user_edit.jinja:40
|
||||
msgid "Account number: "
|
||||
msgstr "Numero de compte : "
|
||||
|
||||
#: core/templates/core/macros.jinja:44 launderette/models.py:151
|
||||
#: core/templates/core/macros.jinja:48 launderette/models.py:151
|
||||
msgid "Slot"
|
||||
msgstr "Créneau"
|
||||
|
||||
#: core/templates/core/macros.jinja:57
|
||||
#: core/templates/core/macros.jinja:61
|
||||
#: launderette/templates/launderette/launderette_admin.jinja:20
|
||||
msgid "Tokens"
|
||||
msgstr "Jetons"
|
||||
@ -2407,7 +2402,7 @@ msgid "Eboutic invoices"
|
||||
msgstr "Facture eboutic"
|
||||
|
||||
#: core/templates/core/user_account.jinja:53
|
||||
#: core/templates/core/user_tools.jinja:33 counter/views.py:561
|
||||
#: core/templates/core/user_tools.jinja:34 counter/views.py:561
|
||||
msgid "Etickets"
|
||||
msgstr "Etickets"
|
||||
|
||||
@ -2596,121 +2591,126 @@ msgstr "Fusionner deux utilisateurs"
|
||||
msgid "Subscriptions"
|
||||
msgstr "Cotisations"
|
||||
|
||||
#: core/templates/core/user_tools.jinja:24 counter/views.py:531
|
||||
#: core/templates/core/user_tools.jinja:19
|
||||
#: subscription/templates/subscription/stats.jinja:4
|
||||
msgid "Subscription stats"
|
||||
msgstr "Statistiques de cotisation"
|
||||
|
||||
#: core/templates/core/user_tools.jinja:25 counter/views.py:531
|
||||
#: counter/views.py:685
|
||||
msgid "Counters"
|
||||
msgstr "Comptoirs"
|
||||
|
||||
#: core/templates/core/user_tools.jinja:27
|
||||
#: core/templates/core/user_tools.jinja:28
|
||||
msgid "General management"
|
||||
msgstr "Gestion générale"
|
||||
|
||||
#: core/templates/core/user_tools.jinja:28
|
||||
#: core/templates/core/user_tools.jinja:29
|
||||
msgid "General counters management"
|
||||
msgstr "Gestion générale des comptoirs"
|
||||
|
||||
#: core/templates/core/user_tools.jinja:29
|
||||
#: core/templates/core/user_tools.jinja:30
|
||||
msgid "Products management"
|
||||
msgstr "Gestion des produits"
|
||||
|
||||
#: core/templates/core/user_tools.jinja:30
|
||||
#: core/templates/core/user_tools.jinja:31
|
||||
msgid "Product types management"
|
||||
msgstr "Gestion des types de produit"
|
||||
|
||||
#: core/templates/core/user_tools.jinja:31
|
||||
#: core/templates/core/user_tools.jinja:32
|
||||
#: counter/templates/counter/cash_summary_list.jinja:23 counter/views.py:551
|
||||
msgid "Cash register summaries"
|
||||
msgstr "Relevés de caisse"
|
||||
|
||||
#: core/templates/core/user_tools.jinja:32
|
||||
#: core/templates/core/user_tools.jinja:33
|
||||
#: counter/templates/counter/invoices_call.jinja:4 counter/views.py:556
|
||||
msgid "Invoices call"
|
||||
msgstr "Appels à facture"
|
||||
|
||||
#: core/templates/core/user_tools.jinja:40 core/views/user.py:204
|
||||
#: core/templates/core/user_tools.jinja:41 core/views/user.py:204
|
||||
#: counter/templates/counter/counter_list.jinja:18
|
||||
#: counter/templates/counter/counter_list.jinja:33
|
||||
#: counter/templates/counter/counter_list.jinja:54
|
||||
msgid "Stats"
|
||||
msgstr "Stats"
|
||||
|
||||
#: core/templates/core/user_tools.jinja:44
|
||||
#: core/templates/core/user_tools.jinja:45
|
||||
#: counter/templates/counter/counter_list.jinja:37
|
||||
#: stock/templates/stock/stock_item_list.jinja:11
|
||||
#: stock/templates/stock/stock_list.jinja:16
|
||||
msgid "Shopping lists"
|
||||
msgstr "Liste de courses"
|
||||
|
||||
#: core/templates/core/user_tools.jinja:46
|
||||
#: core/templates/core/user_tools.jinja:47
|
||||
#: counter/templates/counter/counter_list.jinja:39
|
||||
msgid "Create new stock"
|
||||
msgstr "Créer nouveau stock"
|
||||
|
||||
#: core/templates/core/user_tools.jinja:57
|
||||
#: core/templates/core/user_tools.jinja:58
|
||||
msgid "Refound Account"
|
||||
msgstr "Rembourser un compte"
|
||||
|
||||
#: core/templates/core/user_tools.jinja:58
|
||||
#: core/templates/core/user_tools.jinja:59
|
||||
msgid "General accounting"
|
||||
msgstr "Comptabilité générale"
|
||||
|
||||
#: core/templates/core/user_tools.jinja:68
|
||||
#: core/templates/core/user_tools.jinja:69
|
||||
msgid "Club account: "
|
||||
msgstr "Compte club : "
|
||||
|
||||
#: core/templates/core/user_tools.jinja:75
|
||||
#: core/templates/core/user_tools.jinja:76
|
||||
msgid "Communication"
|
||||
msgstr "Communication"
|
||||
|
||||
#: core/templates/core/user_tools.jinja:78
|
||||
#: core/templates/core/user_tools.jinja:79
|
||||
msgid "Create weekmail article"
|
||||
msgstr "Rédiger un nouvel article dans le Weekmail"
|
||||
|
||||
#: core/templates/core/user_tools.jinja:82
|
||||
#: core/templates/core/user_tools.jinja:83
|
||||
msgid "Moderate news"
|
||||
msgstr "Modérer les nouvelles"
|
||||
|
||||
#: core/templates/core/user_tools.jinja:83
|
||||
#: core/templates/core/user_tools.jinja:84
|
||||
msgid "Edit index page"
|
||||
msgstr "Éditer la page d'accueil"
|
||||
|
||||
#: core/templates/core/user_tools.jinja:84
|
||||
#: core/templates/core/user_tools.jinja:85
|
||||
msgid "Edit alert message"
|
||||
msgstr "Éditer le message d'alerte"
|
||||
|
||||
#: core/templates/core/user_tools.jinja:85
|
||||
#: core/templates/core/user_tools.jinja:86
|
||||
msgid "Edit information message"
|
||||
msgstr "Éditer le message d'informations"
|
||||
|
||||
#: core/templates/core/user_tools.jinja:86
|
||||
#: core/templates/core/user_tools.jinja:87
|
||||
msgid "Moderate files"
|
||||
msgstr "Modérer les fichiers"
|
||||
|
||||
#: core/templates/core/user_tools.jinja:89
|
||||
#: core/templates/core/user_tools.jinja:90
|
||||
msgid "Moderate pictures"
|
||||
msgstr "Modérer les photos"
|
||||
|
||||
#: core/templates/core/user_tools.jinja:102
|
||||
#: core/templates/core/user_tools.jinja:103
|
||||
msgid "Elections"
|
||||
msgstr "Élections"
|
||||
|
||||
#: core/templates/core/user_tools.jinja:104
|
||||
#: core/templates/core/user_tools.jinja:105
|
||||
msgid "See available elections"
|
||||
msgstr "Voir les élections disponibles"
|
||||
|
||||
#: core/templates/core/user_tools.jinja:106
|
||||
#: core/templates/core/user_tools.jinja:107
|
||||
msgid "Create a new election"
|
||||
msgstr "Créer une nouvelle élection"
|
||||
|
||||
#: core/templates/core/user_tools.jinja:109
|
||||
#: core/templates/core/user_tools.jinja:110
|
||||
msgid "Other tools"
|
||||
msgstr "Autres outils"
|
||||
|
||||
#: core/templates/core/user_tools.jinja:111
|
||||
#: core/templates/core/user_tools.jinja:112
|
||||
msgid "Convert dokuwiki/BBcode syntax to Markdown"
|
||||
msgstr "Convertir de la syntaxe dokuwiki/BBcode vers Markdown"
|
||||
|
||||
#: core/templates/core/user_tools.jinja:112
|
||||
#: core/templates/core/user_tools.jinja:113
|
||||
msgid "Trombi tools"
|
||||
msgstr "Outils Trombi"
|
||||
|
||||
@ -3079,6 +3079,7 @@ msgstr "Pas de date de naissance renseignée"
|
||||
#: launderette/templates/launderette/launderette_admin.jinja:35
|
||||
#: launderette/templates/launderette/launderette_click.jinja:13
|
||||
#: sas/templates/sas/picture.jinja:82
|
||||
#: subscription/templates/subscription/stats.jinja:14
|
||||
msgid "Go"
|
||||
msgstr "Valider"
|
||||
|
||||
@ -3661,7 +3662,7 @@ msgid "New forum"
|
||||
msgstr "Nouveau forum"
|
||||
|
||||
#: forum/templates/forum/forum.jinja:22 forum/templates/forum/reply.jinja:8
|
||||
#: forum/templates/forum/reply.jinja:25
|
||||
#: forum/templates/forum/reply.jinja:26
|
||||
msgid "New topic"
|
||||
msgstr "Nouveau sujet"
|
||||
|
||||
@ -3707,7 +3708,7 @@ msgstr "Message supprimé ou non-visible."
|
||||
msgid "View last unread messages"
|
||||
msgstr "Voir les derniers messages non lus"
|
||||
|
||||
#: forum/templates/forum/reply.jinja:6 forum/templates/forum/reply.jinja:23
|
||||
#: forum/templates/forum/reply.jinja:6 forum/templates/forum/reply.jinja:24
|
||||
#: forum/templates/forum/topic.jinja:40 forum/templates/forum/topic.jinja:59
|
||||
msgid "Reply"
|
||||
msgstr "Répondre"
|
||||
@ -3841,11 +3842,11 @@ msgstr "Fusionner deux utilisateurs"
|
||||
msgid "Merge"
|
||||
msgstr "Fusion"
|
||||
|
||||
#: rootplace/views.py:89
|
||||
#: rootplace/views.py:90
|
||||
msgid "User that will be kept"
|
||||
msgstr "Utilisateur qui sera conservé"
|
||||
|
||||
#: rootplace/views.py:90
|
||||
#: rootplace/views.py:91
|
||||
msgid "User that will be deleted"
|
||||
msgstr "Utilisateur qui sera supprimé"
|
||||
|
||||
@ -4368,16 +4369,28 @@ msgstr "Vous ne pouvez pas cotiser plusieurs fois pour la même période"
|
||||
msgid "Subscription error"
|
||||
msgstr "Erreur de cotisation"
|
||||
|
||||
#: subscription/templates/subscription/stats.jinja:18
|
||||
msgid "Total subscriptions"
|
||||
msgstr "Cotisations totales"
|
||||
|
||||
#: subscription/templates/subscription/stats.jinja:19
|
||||
msgid "Subscriptions by type"
|
||||
msgstr "Cotisations par type"
|
||||
|
||||
#: subscription/templates/subscription/stats.jinja:29
|
||||
msgid "Subscription type"
|
||||
msgstr "Type de cotisation"
|
||||
|
||||
#: subscription/templates/subscription/subscription.jinja:22
|
||||
msgid "Eboutic is reserved to specific users. In doubt, don't use it."
|
||||
msgstr ""
|
||||
"Eboutic est réservé à des cas particuliers. Dans le doute, ne l'utilisez pas."
|
||||
|
||||
#: subscription/views.py:74
|
||||
#: subscription/views.py:86
|
||||
msgid "A user with that email address already exists"
|
||||
msgstr "Un utilisateur avec cette adresse email existe déjà"
|
||||
|
||||
#: subscription/views.py:90
|
||||
#: subscription/views.py:102
|
||||
msgid "You must either choose an existing user or create a new one properly"
|
||||
msgstr ""
|
||||
"Vous devez soit choisir un utilisateur existant, soit en créer un proprement"
|
||||
@ -4613,4 +4626,3 @@ msgstr "Vous ne pouvez plus écrire de commentaires, la date est passée."
|
||||
#, python-format
|
||||
msgid "Maximum characters: %(max_length)s"
|
||||
msgstr "Nombre de caractères max: %(max_length)s"
|
||||
|
||||
|
@ -22,13 +22,10 @@
|
||||
#
|
||||
#
|
||||
|
||||
from django.conf.urls import url, include
|
||||
from django.conf.urls import url
|
||||
|
||||
from rootplace.views import *
|
||||
|
||||
urlpatterns = [
|
||||
url(r'^merge$', MergeUsersView.as_view(), name='merge'),
|
||||
]
|
||||
|
||||
|
||||
|
||||
|
@ -31,6 +31,7 @@ from django.core.exceptions import PermissionDenied
|
||||
|
||||
from ajax_select.fields import AutoCompleteSelectField
|
||||
|
||||
from core.views import CanViewMixin
|
||||
from core.models import User
|
||||
from counter.models import Customer
|
||||
|
||||
|
136
subscription/templates/subscription/stats.jinja
Normal file
136
subscription/templates/subscription/stats.jinja
Normal file
@ -0,0 +1,136 @@
|
||||
{% extends "core/base.jinja" %}
|
||||
|
||||
{% block title %}
|
||||
{% trans %}Subscription stats{% endtrans %}
|
||||
{% endblock %}
|
||||
|
||||
{% block head %}
|
||||
{{ super() }}
|
||||
<script type="text/javascript" src="{{ static('core/js/Chart.bundle.min.js') }}"></script>
|
||||
{% endblock %}
|
||||
|
||||
{% block content %}
|
||||
|
||||
<p>
|
||||
{{ form.start_date.label }}<br>
|
||||
{{ form.start_date }}<br><br>
|
||||
{{ form.end_date.label }}<br>
|
||||
{{ form.end_date }}<br>
|
||||
<p><input type="submit" value="{% trans %}Go{% endtrans %}" /></p>
|
||||
</p>
|
||||
|
||||
<canvas id="statsChart" width="400" height="200"></canvas>
|
||||
|
||||
<p>
|
||||
{% trans %}Total subscriptions{% endtrans %} : {{ subscriptions_total.count() }}<br><br>
|
||||
{% trans %}Subscriptions by type{% endtrans %}<br><br>
|
||||
{% for location in locations %}
|
||||
{{ location[1] }} : <i class="nb">{{ subscriptions_total.filter(location=location[0]).count() }}</i><br>
|
||||
{% endfor %}
|
||||
<p>
|
||||
|
||||
<br>
|
||||
|
||||
<table>
|
||||
<tr>
|
||||
<th>{% trans %}Subscription type{% endtrans %}</th>
|
||||
{% for location in locations %}
|
||||
<th>{{ location[1] }}</th>
|
||||
{% endfor %}
|
||||
<th id="graphLabel">{% trans %}Total{% endtrans %}</th>
|
||||
{% for type in subscriptions_types %}
|
||||
<tr>
|
||||
<td><i class="types" >{{ subscriptions_types[type]['name'] }}</i></td>
|
||||
{% set subscriptions_total_type = subscriptions_total.filter(subscription_type=type) %}
|
||||
{% for location in locations %}
|
||||
<td>
|
||||
{% set subscriptions_total_type_location = subscriptions_total_type.filter(location=location[0]) %}
|
||||
{% trans %}Total{% endtrans %} : {{ subscriptions_total_type_location.count()}}<br>
|
||||
{% for p_type in payment_types %}
|
||||
{{ p_type[1] }} : <i class="nb">{{ subscriptions_total_type_location.filter(payment_method=p_type[0]).count()}}</i><br>
|
||||
{% endfor %}
|
||||
</td>
|
||||
{% endfor %}
|
||||
<td class="total"><i class="nb">{{subscriptions_total_type.count()}}</i>
|
||||
</tr>
|
||||
{% endfor %}
|
||||
</table>
|
||||
|
||||
{% endblock %}
|
||||
|
||||
{% block script %}
|
||||
{{ super() }}
|
||||
<script>
|
||||
function getRandomColor() {
|
||||
var letters = '0123456789ABCDEF';
|
||||
var color = '#';
|
||||
for (var i = 0; i < 6; i++ ) {
|
||||
color += letters[Math.floor(Math.random() * 16)];
|
||||
}
|
||||
return color;
|
||||
}
|
||||
function getRandomColorUniq(list) {
|
||||
var color = getRandomColor();
|
||||
while (list.includes(color)){
|
||||
color = getRandomColor();
|
||||
}
|
||||
return color;
|
||||
}
|
||||
function hexToRgb(hex) {
|
||||
// Expand shorthand form (e.g. "03F") to full form (e.g. "0033FF")
|
||||
var shorthandRegex = /^#?([a-f\d])([a-f\d])([a-f\d])$/i;
|
||||
hex = hex.replace(shorthandRegex, function(m, r, g, b) {
|
||||
return r + r + g + g + b + b;
|
||||
});
|
||||
|
||||
var result = /^#?([a-f\d]{2})([a-f\d]{2})([a-f\d]{2})$/i.exec(hex);
|
||||
return result ? {
|
||||
r: parseInt(result[1], 16),
|
||||
g: parseInt(result[2], 16),
|
||||
b: parseInt(result[3], 16)
|
||||
} : null;
|
||||
}
|
||||
|
||||
var ctx = document.getElementById("statsChart").getContext('2d');
|
||||
var labels = [];
|
||||
var total = [];
|
||||
var colors = [];
|
||||
var colors_dimmed = [];
|
||||
Array.from(document.getElementsByClassName("types")).forEach(function(element){
|
||||
labels.push(element.childNodes[0].data);
|
||||
});
|
||||
Array.from(document.getElementsByClassName("total")).forEach(function(element){
|
||||
total.push(element.childNodes[0].childNodes[0].data);
|
||||
});
|
||||
labels.forEach(function(element){
|
||||
colors.push(getRandomColorUniq(colors));
|
||||
});
|
||||
colors.forEach(function(element){
|
||||
var rgb_color = hexToRgb(element);
|
||||
colors_dimmed.push('rgba(' + rgb_color.r + ', ' + rgb_color.g + ', ' + rgb_color.b + ', 0.2)');
|
||||
});
|
||||
console.log(colors);console.log(colors_dimmed);
|
||||
var myChart = new Chart(ctx, {
|
||||
type: 'bar',
|
||||
data: {
|
||||
labels: labels,
|
||||
datasets: [{
|
||||
label: document.getElementById("graphLabel").childNodes[0].data,
|
||||
data: total,
|
||||
backgroundColor: colors_dimmed,
|
||||
borderColor: colors,
|
||||
borderWidth: 1
|
||||
}]
|
||||
},
|
||||
options: {
|
||||
scales: {
|
||||
yAxes: [{
|
||||
ticks: {
|
||||
beginAtZero:true
|
||||
}
|
||||
}]
|
||||
}
|
||||
}
|
||||
});
|
||||
</script>
|
||||
{% endblock %}
|
@ -22,13 +22,14 @@
|
||||
#
|
||||
#
|
||||
|
||||
from django.conf.urls import url, include
|
||||
from django.conf.urls import url
|
||||
|
||||
from subscription.views import *
|
||||
|
||||
urlpatterns = [
|
||||
# Subscription views
|
||||
url(r'^$', NewSubscription.as_view(), name='subscription'),
|
||||
url(r'stats', SubscriptionsStatsView.as_view(), name='stats'),
|
||||
]
|
||||
|
||||
|
||||
|
@ -22,11 +22,10 @@
|
||||
#
|
||||
#
|
||||
|
||||
from django.shortcuts import render
|
||||
from django.views.generic.edit import UpdateView, CreateView
|
||||
from django.views.generic.base import View
|
||||
from django.views.generic.edit import CreateView, FormView
|
||||
from django.utils.translation import ugettext_lazy as _
|
||||
from django.core.exceptions import PermissionDenied, ValidationError
|
||||
from django.core.urlresolvers import reverse_lazy
|
||||
from django.db import IntegrityError
|
||||
from django import forms
|
||||
from django.forms import Select
|
||||
@ -37,8 +36,21 @@ import random
|
||||
|
||||
from subscription.models import Subscription
|
||||
from core.views import CanEditMixin, CanEditPropMixin, CanViewMixin
|
||||
from core.views.forms import SelectDateTime
|
||||
from core.models import User
|
||||
|
||||
|
||||
class SelectionDateForm(forms.Form):
|
||||
def __init__(self, *args, **kwargs):
|
||||
super(SelectionDateForm, self).__init__(*args, **kwargs)
|
||||
self.fields['start_date'] = forms.DateTimeField(
|
||||
['%Y-%m-%d %H:%M:%S'], label=_("Start date"),
|
||||
widget=SelectDateTime, required=True)
|
||||
self.fields['end_date'] = forms.DateTimeField(
|
||||
['%Y-%m-%d %H:%M:%S'], label=_("End date"),
|
||||
widget=SelectDateTime, required=True)
|
||||
|
||||
|
||||
class SubscriptionForm(forms.ModelForm):
|
||||
class Meta:
|
||||
model = Subscription
|
||||
@ -114,3 +126,48 @@ class NewSubscription(CreateView):
|
||||
)
|
||||
return super(NewSubscription, self).form_valid(form)
|
||||
|
||||
|
||||
class SubscriptionsStatsView(FormView):
|
||||
template_name = "subscription/stats.jinja"
|
||||
form_class = SelectionDateForm
|
||||
|
||||
def dispatch(self, request, *arg, **kwargs):
|
||||
import datetime
|
||||
self.start_date = datetime.datetime.today()
|
||||
self.end_date = self.start_date
|
||||
res = super(SubscriptionsStatsView, self).dispatch(
|
||||
request, *arg, **kwargs)
|
||||
if request.user.is_root or request.user.is_board_member:
|
||||
return res
|
||||
raise PermissionDenied
|
||||
|
||||
def post(self, request, *args, **kwargs):
|
||||
self.form = self.get_form()
|
||||
self.start_date = self.form['start_date']
|
||||
self.end_date = self.form['end_date']
|
||||
res = super(SubscriptionsStatsView, self).post(
|
||||
request, *args, **kwargs)
|
||||
if request.user.is_root or request.user.is_board_member:
|
||||
return res
|
||||
raise PermissionDenied
|
||||
|
||||
def get_initial(self):
|
||||
init = {
|
||||
'start_date': self.start_date.strftime('%Y-%m-%d %H:%M:%S'),
|
||||
'end_date': self.end_date.strftime('%Y-%m-%d %H:%M:%S')
|
||||
}
|
||||
return init
|
||||
|
||||
def get_context_data(self, **kwargs):
|
||||
from subscription.models import Subscription
|
||||
kwargs = super(SubscriptionsStatsView, self).get_context_data(**kwargs)
|
||||
kwargs['subscriptions_total'] = Subscription.objects.filter(
|
||||
subscription_end__gte=self.end_date,
|
||||
subscription_start__lte=self.start_date)
|
||||
kwargs['subscriptions_types'] = settings.SITH_SUBSCRIPTIONS
|
||||
kwargs['payment_types'] = settings.SITH_COUNTER_PAYMENT_METHOD
|
||||
kwargs['locations'] = settings.SITH_SUBSCRIPTION_LOCATIONS
|
||||
return kwargs
|
||||
|
||||
def get_success_url(self, **kwargs):
|
||||
return reverse_lazy('subscriptions:stats')
|
||||
|
Loading…
Reference in New Issue
Block a user