From fb8faacddc40165e8cdd92ca0cb99d1d18c3a6b8 Mon Sep 17 00:00:00 2001 From: Bartuccio Antoine Date: Sun, 22 Mar 2020 16:14:37 +0100 Subject: [PATCH] trombi: raw tool for trombi admins to add a club membership to a trombi member --- locale/fr/LC_MESSAGES/django.po | 390 ++++++++++++++------------- trombi/templates/trombi/detail.jinja | 1 + trombi/urls.py | 8 +- trombi/views.py | 33 ++- 4 files changed, 238 insertions(+), 194 deletions(-) diff --git a/locale/fr/LC_MESSAGES/django.po b/locale/fr/LC_MESSAGES/django.po index 4f3a6080..632ec785 100644 --- a/locale/fr/LC_MESSAGES/django.po +++ b/locale/fr/LC_MESSAGES/django.po @@ -6,7 +6,7 @@ msgid "" msgstr "" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2019-11-13 23:14+0100\n" +"POT-Creation-Date: 2020-03-22 16:12+0100\n" "PO-Revision-Date: 2016-07-18\n" "Last-Translator: Skia \n" "Language-Team: AE info \n" @@ -41,7 +41,7 @@ msgstr "code postal" msgid "country" msgstr "pays" -#: accounting/models.py:66 core/models.py:258 +#: accounting/models.py:66 core/models.py:281 msgid "phone" msgstr "téléphone" @@ -127,10 +127,10 @@ msgstr "numéro" msgid "journal" msgstr "classeur" -#: accounting/models.py:290 core/models.py:825 core/models.py:1363 -#: core/models.py:1411 core/models.py:1440 core/models.py:1464 +#: accounting/models.py:290 core/models.py:848 core/models.py:1386 +#: core/models.py:1434 core/models.py:1463 core/models.py:1487 #: counter/models.py:364 counter/models.py:457 counter/models.py:662 -#: eboutic/models.py:46 eboutic/models.py:93 forum/models.py:311 +#: eboutic/models.py:47 eboutic/models.py:100 forum/models.py:311 #: forum/models.py:408 stock/models.py:104 msgid "date" msgstr "date" @@ -149,7 +149,7 @@ msgstr "méthode de paiement" msgid "cheque number" msgstr "numéro de chèque" -#: accounting/models.py:303 eboutic/models.py:178 +#: accounting/models.py:303 eboutic/models.py:185 msgid "invoice" msgstr "facture" @@ -166,7 +166,7 @@ msgid "accounting type" msgstr "type comptable" #: accounting/models.py:328 accounting/models.py:475 accounting/models.py:510 -#: accounting/models.py:545 core/models.py:1439 core/models.py:1465 +#: accounting/models.py:545 core/models.py:1462 core/models.py:1488 #: counter/models.py:423 msgid "label" msgstr "étiquette" @@ -200,7 +200,7 @@ msgstr "Utilisateur" #: com/templates/com/news_admin_list.jinja:288 #: com/templates/com/weekmail.jinja:18 com/templates/com/weekmail.jinja:47 #: core/templates/core/user_clubs.jinja:15 -#: core/templates/core/user_clubs.jinja:41 +#: core/templates/core/user_clubs.jinja:44 #: counter/templates/counter/invoices_call.jinja:23 #: trombi/templates/trombi/edit_profile.jinja:15 #: trombi/templates/trombi/edit_profile.jinja:22 @@ -367,6 +367,9 @@ msgstr "Compte en banque : " #: core/templates/core/group_list.jinja:25 core/templates/core/macros.jinja:93 #: core/templates/core/macros.jinja:112 core/templates/core/page_prop.jinja:14 #: core/templates/core/user_account_detail.jinja:38 +#: core/templates/core/user_account_detail.jinja:66 +#: core/templates/core/user_clubs.jinja:32 +#: core/templates/core/user_clubs.jinja:61 #: core/templates/core/user_detail.jinja:178 #: core/templates/core/user_edit.jinja:19 #: core/templates/core/user_preferences.jinja:36 @@ -392,7 +395,7 @@ msgid "Delete" msgstr "Supprimer" #: accounting/templates/accounting/bank_account_details.jinja:18 -#: club/views.py:78 core/views/user.py:196 sas/templates/sas/picture.jinja:86 +#: club/views.py:88 core/views/user.py:196 sas/templates/sas/picture.jinja:86 msgid "Infos" msgstr "Infos" @@ -411,7 +414,7 @@ msgstr "Nouveau compte club" #: accounting/templates/accounting/bank_account_details.jinja:27 #: accounting/templates/accounting/bank_account_list.jinja:22 #: accounting/templates/accounting/club_account_details.jinja:58 -#: accounting/templates/accounting/journal_details.jinja:89 club/views.py:124 +#: accounting/templates/accounting/journal_details.jinja:89 club/views.py:134 #: com/templates/com/news_admin_list.jinja:39 #: com/templates/com/news_admin_list.jinja:68 #: com/templates/com/news_admin_list.jinja:115 @@ -633,7 +636,7 @@ msgstr "No" #: counter/templates/counter/cash_summary_list.jinja:34 #: counter/templates/counter/last_ops.jinja:14 #: counter/templates/counter/last_ops.jinja:39 -#: rootplace/templates/rootplace/logs.jinja:12 sas/views.py:369 +#: rootplace/templates/rootplace/logs.jinja:12 sas/views.py:375 #: stock/templates/stock/stock_shopping_list.jinja:25 #: stock/templates/stock/stock_shopping_list.jinja:54 #: trombi/templates/trombi/user_profile.jinja:40 @@ -909,11 +912,11 @@ msgstr "Opérations sans étiquette" msgid "Refound this account" msgstr "Rembourser ce compte" -#: club/forms.py:60 club/forms.py:188 +#: club/forms.py:60 club/forms.py:202 msgid "Users to add" msgstr "Utilisateurs à ajouter" -#: club/forms.py:61 club/forms.py:189 core/views/group.py:63 +#: club/forms.py:61 club/forms.py:203 core/views/group.py:63 msgid "Search users to add (one or more)." msgstr "Recherche les utilisateurs à ajouter (un ou plus)." @@ -947,7 +950,7 @@ msgstr "Action" msgid "This field is required" msgstr "Ce champ est obligatoire." -#: club/forms.py:127 club/forms.py:250 club/tests.py:587 +#: club/forms.py:127 club/forms.py:264 club/tests.py:587 msgid "One of the selected users doesn't exist" msgstr "Un des utilisateurs sélectionné n'existe pas" @@ -983,25 +986,33 @@ msgstr "Date de fin" msgid "Counter" msgstr "Comptoir" -#: club/forms.py:232 club/templates/club/club_members.jinja:21 +#: club/forms.py:182 counter/views.py:797 +msgid "Products" +msgstr "Produits" + +#: club/forms.py:187 counter/views.py:802 +msgid "Archived products" +msgstr "Produits archivés" + +#: club/forms.py:246 club/templates/club/club_members.jinja:21 #: club/templates/club/club_members.jinja:46 #: core/templates/core/user_clubs.jinja:29 msgid "Mark as old" msgstr "Marquer comme ancien" -#: club/forms.py:254 +#: club/forms.py:268 msgid "User must be subscriber to take part to a club" msgstr "L'utilisateur doit être cotisant pour faire partie d'un club" -#: club/forms.py:258 core/views/group.py:82 +#: club/forms.py:272 core/views/group.py:82 msgid "You can not add the same user twice" msgstr "Vous ne pouvez pas ajouter deux fois le même utilisateur" -#: club/forms.py:279 +#: club/forms.py:293 msgid "You should specify a role" msgstr "Vous devez choisir un rôle" -#: club/forms.py:290 sas/views.py:130 sas/views.py:196 sas/views.py:295 +#: club/forms.py:304 sas/views.py:130 sas/views.py:202 sas/views.py:301 msgid "You do not have the permission to do that" msgstr "Vous n'avez pas la permission de faire cela" @@ -1033,11 +1044,11 @@ msgstr "actif" msgid "short description" msgstr "description courte" -#: club/models.py:74 core/models.py:260 +#: club/models.py:74 core/models.py:283 msgid "address" msgstr "Adresse" -#: club/models.py:94 core/models.py:173 +#: club/models.py:94 core/models.py:196 msgid "home" msgstr "home" @@ -1050,18 +1061,18 @@ msgid "A club with that unix_name already exists" msgstr "Un club avec ce nom UNIX existe déjà." #: club/models.py:267 counter/models.py:623 counter/models.py:653 -#: eboutic/models.py:42 eboutic/models.py:89 election/models.py:192 +#: eboutic/models.py:43 eboutic/models.py:96 election/models.py:192 #: launderette/models.py:145 launderette/models.py:213 sas/models.py:244 #: trombi/models.py:213 msgid "user" msgstr "nom d'utilisateur" -#: club/models.py:284 core/models.py:224 election/models.py:187 +#: club/models.py:284 core/models.py:247 election/models.py:187 #: election/models.py:223 trombi/models.py:218 msgid "role" msgstr "rôle" -#: club/models.py:289 core/models.py:73 counter/models.py:122 +#: club/models.py:289 core/models.py:81 counter/models.py:122 #: counter/models.py:150 election/models.py:15 election/models.py:120 #: election/models.py:197 forum/models.py:59 forum/models.py:240 msgid "description" @@ -1080,7 +1091,7 @@ msgid "Enter a valid address. Only the root of the address is needed." msgstr "" "Entrez une adresse valide. Seule la racine de l'adresse est nécessaire." -#: club/models.py:353 com/models.py:83 com/models.py:310 core/models.py:826 +#: club/models.py:353 com/models.py:83 com/models.py:310 core/models.py:849 msgid "is moderated" msgstr "est modéré" @@ -1132,7 +1143,7 @@ msgstr "Membres du club" #: club/templates/club/club_members.jinja:17 #: club/templates/club/club_old_members.jinja:9 #: core/templates/core/user_clubs.jinja:16 -#: core/templates/core/user_clubs.jinja:42 +#: core/templates/core/user_clubs.jinja:45 #: trombi/templates/trombi/edit_profile.jinja:23 #: trombi/templates/trombi/export.jinja:56 #: trombi/templates/trombi/user_profile.jinja:39 @@ -1143,7 +1154,7 @@ msgstr "Rôle" #: club/templates/club/club_old_members.jinja:10 #: core/templates/core/group_list.jinja:15 #: core/templates/core/user_clubs.jinja:17 -#: core/templates/core/user_clubs.jinja:43 +#: core/templates/core/user_clubs.jinja:46 msgid "Description" msgstr "Description" @@ -1168,17 +1179,17 @@ msgid "Club old members" msgstr "Anciens membres du club" #: club/templates/club/club_old_members.jinja:11 -#: core/templates/core/user_clubs.jinja:44 +#: core/templates/core/user_clubs.jinja:47 msgid "From" msgstr "Du" #: club/templates/club/club_old_members.jinja:12 -#: core/templates/core/user_clubs.jinja:45 +#: core/templates/core/user_clubs.jinja:48 msgid "To" msgstr "Au" -#: club/templates/club/club_sellings.jinja:5 club/views.py:144 -#: club/views.py:378 counter/templates/counter/counter_main.jinja:19 +#: club/templates/club/club_sellings.jinja:5 club/views.py:154 +#: club/views.py:483 counter/templates/counter/counter_main.jinja:19 #: counter/templates/counter/last_ops.jinja:35 msgid "Sellings" msgstr "Ventes" @@ -1354,46 +1365,41 @@ msgstr "Aucune page n'existe pour ce club" msgid "Club stats" msgstr "Statistiques du club" -#: club/views.py:88 +#: club/views.py:98 msgid "Members" msgstr "Membres" -#: club/views.py:97 +#: club/views.py:107 msgid "Old members" msgstr "Anciens membres" -#: club/views.py:107 core/templates/core/page.jinja:33 +#: club/views.py:117 core/templates/core/page.jinja:33 msgid "History" msgstr "Historique" -#: club/views.py:115 core/templates/core/base.jinja:118 core/views/user.py:219 -#: sas/templates/sas/picture.jinja:95 trombi/views.py:61 +#: club/views.py:125 core/templates/core/base.jinja:118 core/views/user.py:219 +#: sas/templates/sas/picture.jinja:95 trombi/views.py:63 msgid "Tools" msgstr "Outils" -#: club/views.py:135 +#: club/views.py:145 msgid "Edit club page" msgstr "Éditer la page de club" -#: club/views.py:151 +#: club/views.py:161 msgid "Mailing list" msgstr "Listes de diffusion" -#: club/views.py:160 com/views.py:138 +#: club/views.py:170 com/views.py:138 msgid "Posters list" msgstr "Liste d'affiches" -#: club/views.py:170 counter/templates/counter/counter_list.jinja:21 +#: club/views.py:180 counter/templates/counter/counter_list.jinja:21 #: counter/templates/counter/counter_list.jinja:43 #: counter/templates/counter/counter_list.jinja:59 msgid "Props" msgstr "Propriétés" -#: club/views.py:335 core/templates/core/user_stats.jinja:27 -#: counter/views.py:1712 -msgid "Product" -msgstr "Produit" - #: com/models.py:46 msgid "alert message" msgstr "message d'alerte" @@ -1436,7 +1442,7 @@ msgstr "résumé" msgid "content" msgstr "contenu" -#: com/models.py:72 core/models.py:1409 launderette/models.py:101 +#: com/models.py:72 core/models.py:1432 launderette/models.py:101 #: launderette/models.py:139 launderette/models.py:196 stock/models.py:80 #: stock/models.py:138 msgid "type" @@ -1487,7 +1493,7 @@ msgstr "weekmail" msgid "rank" msgstr "rang" -#: com/models.py:296 core/models.py:791 core/models.py:841 +#: com/models.py:296 core/models.py:814 core/models.py:864 msgid "file" msgstr "fichier" @@ -1583,7 +1589,7 @@ msgstr "Type" #: com/templates/com/news_admin_list.jinja:286 #: com/templates/com/weekmail.jinja:19 com/templates/com/weekmail.jinja:48 #: forum/templates/forum/forum.jinja:24 forum/templates/forum/forum.jinja:43 -#: forum/templates/forum/main.jinja:27 forum/views.py:243 +#: forum/templates/forum/main.jinja:27 forum/views.py:244 #: pedagogy/templates/pedagogy/guide.jinja:60 msgid "Title" msgstr "Titre" @@ -1956,30 +1962,30 @@ msgstr "" "Vous devez êtres un membre du bureau du club sélectionné pour poster dans le " "Weekmail." -#: core/models.py:69 +#: core/models.py:76 msgid "meta group status" msgstr "status du meta-groupe" -#: core/models.py:71 +#: core/models.py:78 msgid "Whether a group is a meta group or not" msgstr "Si un groupe est un meta-groupe ou pas" -#: core/models.py:108 +#: core/models.py:131 #, python-format msgid "%(value)s is not a valid promo (between 0 and %(end)s)" msgstr "%(value)s n'est pas une promo valide (doit être entre 0 et %(end)s)" -#: core/models.py:126 +#: core/models.py:149 msgid "username" msgstr "nom d'utilisateur" -#: core/models.py:130 +#: core/models.py:153 msgid "Required. 254 characters or fewer. Letters, digits and ./+/-/_ only." msgstr "" "Requis. Pas plus de 254 caractères. Uniquement des lettres, numéros, et ./" "+/-/_" -#: core/models.py:136 +#: core/models.py:159 msgid "" "Enter a valid username. This value may contain only letters, numbers and ./" "+/-/_ characters." @@ -1987,43 +1993,43 @@ msgstr "" "Entrez un nom d'utilisateur correct. Uniquement des lettres, numéros, et ./" "+/-/_" -#: core/models.py:142 +#: core/models.py:165 msgid "A user with that username already exists." msgstr "Un utilisateur de ce nom existe déjà" -#: core/models.py:144 +#: core/models.py:167 msgid "first name" msgstr "Prénom" -#: core/models.py:145 +#: core/models.py:168 msgid "last name" msgstr "Nom" -#: core/models.py:146 +#: core/models.py:169 msgid "email address" msgstr "adresse email" -#: core/models.py:147 +#: core/models.py:170 msgid "date of birth" msgstr "date de naissance" -#: core/models.py:148 +#: core/models.py:171 msgid "nick name" msgstr "surnom" -#: core/models.py:150 +#: core/models.py:173 msgid "staff status" msgstr "status \"staff\"" -#: core/models.py:152 +#: core/models.py:175 msgid "Designates whether the user can log into this admin site." msgstr "Est-ce que l'utilisateur peut se logger à la partie admin du site." -#: core/models.py:155 +#: core/models.py:178 msgid "active" msgstr "actif" -#: core/models.py:158 +#: core/models.py:181 msgid "" "Designates whether this user should be treated as active. Unselect this " "instead of deleting accounts." @@ -2031,159 +2037,159 @@ msgstr "" "Est-ce que l'utilisateur doit être traité comme actif. Déselectionnez au " "lieu de supprimer les comptes." -#: core/models.py:162 +#: core/models.py:185 msgid "date joined" msgstr "date d'inscription" -#: core/models.py:163 +#: core/models.py:186 msgid "last update" msgstr "dernière mise à jour" -#: core/models.py:165 +#: core/models.py:188 msgid "superuser" msgstr "super-utilisateur" -#: core/models.py:167 +#: core/models.py:190 msgid "Designates whether this user is a superuser. " msgstr "Est-ce que l'utilisateur est super-utilisateur." -#: core/models.py:181 +#: core/models.py:204 msgid "profile" msgstr "profil" -#: core/models.py:189 +#: core/models.py:212 msgid "avatar" msgstr "avatar" -#: core/models.py:197 +#: core/models.py:220 msgid "scrub" msgstr "blouse" -#: core/models.py:203 +#: core/models.py:226 msgid "sex" msgstr "sexe" -#: core/models.py:205 matmat/views.py:74 +#: core/models.py:228 matmat/views.py:74 msgid "Man" msgstr "Homme" -#: core/models.py:205 matmat/views.py:75 +#: core/models.py:228 matmat/views.py:75 msgid "Woman" msgstr "Femme" -#: core/models.py:209 +#: core/models.py:232 msgid "tshirt size" msgstr "taille de tshirt" -#: core/models.py:212 +#: core/models.py:235 msgid "-" msgstr "-" -#: core/models.py:213 +#: core/models.py:236 msgid "XS" msgstr "XS" -#: core/models.py:214 +#: core/models.py:237 msgid "S" msgstr "S" -#: core/models.py:215 +#: core/models.py:238 msgid "M" msgstr "M" -#: core/models.py:216 +#: core/models.py:239 msgid "L" msgstr "L" -#: core/models.py:217 +#: core/models.py:240 msgid "XL" msgstr "XL" -#: core/models.py:218 +#: core/models.py:241 msgid "XXL" msgstr "XXL" -#: core/models.py:219 +#: core/models.py:242 msgid "XXXL" msgstr "XXXL" -#: core/models.py:227 +#: core/models.py:250 msgid "Student" msgstr "Étudiant" -#: core/models.py:228 +#: core/models.py:251 msgid "Administrative agent" msgstr "Personnel administratif" -#: core/models.py:229 +#: core/models.py:252 msgid "Teacher" msgstr "Enseignant" -#: core/models.py:230 +#: core/models.py:253 msgid "Agent" msgstr "Personnel" -#: core/models.py:231 +#: core/models.py:254 msgid "Doctor" msgstr "Doctorant" -#: core/models.py:232 +#: core/models.py:255 msgid "Former student" msgstr "Ancien étudiant" -#: core/models.py:233 +#: core/models.py:256 msgid "Service" msgstr "Service" -#: core/models.py:239 +#: core/models.py:262 msgid "department" msgstr "département" -#: core/models.py:246 +#: core/models.py:269 msgid "dpt option" msgstr "Filière" -#: core/models.py:248 pedagogy/models.py:74 pedagogy/models.py:303 +#: core/models.py:271 pedagogy/models.py:74 pedagogy/models.py:303 msgid "semester" msgstr "semestre" -#: core/models.py:249 +#: core/models.py:272 msgid "quote" msgstr "citation" -#: core/models.py:250 +#: core/models.py:273 msgid "school" msgstr "école" -#: core/models.py:252 +#: core/models.py:275 msgid "promo" msgstr "promo" -#: core/models.py:255 +#: core/models.py:278 msgid "forum signature" msgstr "signature du forum" -#: core/models.py:257 +#: core/models.py:280 msgid "second email address" msgstr "adresse email secondaire" -#: core/models.py:259 +#: core/models.py:282 msgid "parent phone" msgstr "téléphone des parents" -#: core/models.py:262 +#: core/models.py:285 msgid "parent address" msgstr "adresse des parents" -#: core/models.py:265 +#: core/models.py:288 msgid "is subscriber viewable" msgstr "profil visible par les cotisants" -#: core/models.py:480 +#: core/models.py:503 msgid "A user with that username already exists" msgstr "Un utilisateur de ce nom d'utilisateur existe déjà" -#: core/models.py:618 core/templates/core/macros.jinja:72 +#: core/models.py:641 core/templates/core/macros.jinja:72 #: core/templates/core/macros.jinja:74 core/templates/core/macros.jinja:75 #: core/templates/core/user_detail.jinja:79 #: core/templates/core/user_detail.jinja:80 @@ -2201,109 +2207,109 @@ msgstr "Un utilisateur de ce nom d'utilisateur existe déjà" msgid "Profile" msgstr "Profil" -#: core/models.py:742 +#: core/models.py:765 msgid "Visitor" msgstr "Visiteur" -#: core/models.py:750 +#: core/models.py:773 msgid "do you want to receive the weekmail" msgstr "voulez-vous recevoir le Weekmail" -#: core/models.py:752 +#: core/models.py:775 msgid "show your stats to others" msgstr "montrez vos statistiques aux autres" -#: core/models.py:754 +#: core/models.py:777 msgid "get a notification for every click" msgstr "recevez une notification pour chaque click" -#: core/models.py:757 +#: core/models.py:780 msgid "get a notification for every refilling" msgstr "recevez une notification pour chaque rechargement" -#: core/models.py:780 +#: core/models.py:803 msgid "file name" msgstr "nom du fichier" -#: core/models.py:784 core/models.py:1132 +#: core/models.py:807 core/models.py:1155 msgid "parent" msgstr "parent" -#: core/models.py:798 +#: core/models.py:821 msgid "compressed file" msgstr "version allégée" -#: core/models.py:805 +#: core/models.py:828 msgid "thumbnail" msgstr "miniature" -#: core/models.py:813 core/models.py:830 +#: core/models.py:836 core/models.py:853 msgid "owner" msgstr "propriétaire" -#: core/models.py:817 core/models.py:1152 core/views/files.py:191 +#: core/models.py:840 core/models.py:1175 core/views/files.py:191 msgid "edit group" msgstr "groupe d'édition" -#: core/models.py:820 core/models.py:1155 core/views/files.py:194 +#: core/models.py:843 core/models.py:1178 core/views/files.py:194 msgid "view group" msgstr "groupe de vue" -#: core/models.py:822 +#: core/models.py:845 msgid "is folder" msgstr "est un dossier" -#: core/models.py:823 +#: core/models.py:846 msgid "mime type" msgstr "type mime" -#: core/models.py:824 +#: core/models.py:847 msgid "size" msgstr "taille" -#: core/models.py:835 +#: core/models.py:858 msgid "asked for removal" msgstr "retrait demandé" -#: core/models.py:837 +#: core/models.py:860 msgid "is in the SAS" msgstr "est dans le SAS" -#: core/models.py:879 +#: core/models.py:902 msgid "Character '/' not authorized in name" msgstr "Le caractère '/' n'est pas autorisé dans les noms de fichier" -#: core/models.py:881 core/models.py:885 +#: core/models.py:904 core/models.py:908 msgid "Loop in folder tree" msgstr "Boucle dans l'arborescence des dossiers" -#: core/models.py:888 +#: core/models.py:911 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:899 +#: core/models.py:922 msgid "Duplicate file" msgstr "Un fichier de ce nom existe déjà" -#: core/models.py:916 +#: core/models.py:939 msgid "You must provide a file" msgstr "Vous devez fournir un fichier" -#: core/models.py:1056 +#: core/models.py:1079 msgid "Folder: " msgstr "Dossier : " -#: core/models.py:1058 +#: core/models.py:1081 msgid "File: " msgstr "Fichier : " -#: core/models.py:1115 +#: core/models.py:1138 msgid "page unix name" msgstr "nom unix de la page" -#: core/models.py:1121 +#: core/models.py:1144 msgid "" "Enter a valid page name. This value may contain only unaccented letters, " "numbers and ./+/-/_ characters." @@ -2311,55 +2317,55 @@ msgstr "" "Entrez un nom de page correct. Uniquement des lettres non accentuées, " "numéros, et ./+/-/_" -#: core/models.py:1139 +#: core/models.py:1162 msgid "page name" msgstr "nom de la page" -#: core/models.py:1147 +#: core/models.py:1170 msgid "owner group" msgstr "groupe propriétaire" -#: core/models.py:1160 +#: core/models.py:1183 msgid "lock user" msgstr "utilisateur bloquant" -#: core/models.py:1167 +#: core/models.py:1190 msgid "lock_timeout" msgstr "décompte du déblocage" -#: core/models.py:1197 +#: core/models.py:1220 msgid "Duplicate page" msgstr "Une page de ce nom existe déjà" -#: core/models.py:1200 +#: core/models.py:1223 msgid "Loop in page tree" msgstr "Boucle dans l'arborescence des pages" -#: core/models.py:1360 +#: core/models.py:1383 msgid "revision" msgstr "révision" -#: core/models.py:1361 +#: core/models.py:1384 msgid "page title" msgstr "titre de la page" -#: core/models.py:1362 +#: core/models.py:1385 msgid "page content" msgstr "contenu de la page" -#: core/models.py:1406 +#: core/models.py:1429 msgid "url" msgstr "url" -#: core/models.py:1407 +#: core/models.py:1430 msgid "param" msgstr "param" -#: core/models.py:1412 +#: core/models.py:1435 msgid "viewed" msgstr "vue" -#: core/models.py:1470 +#: core/models.py:1493 msgid "operation type" msgstr "type d'opération" @@ -2773,23 +2779,23 @@ msgstr "Créneau" msgid "Tokens" msgstr "Jetons" -#: core/templates/core/macros.jinja:119 core/templates/core/macros.jinja:121 +#: core/templates/core/macros.jinja:120 core/templates/core/macros.jinja:122 msgid "Previous" msgstr "Précédent" -#: core/templates/core/macros.jinja:125 +#: core/templates/core/macros.jinja:126 msgid "current" msgstr "actuel" -#: core/templates/core/macros.jinja:131 core/templates/core/macros.jinja:133 +#: core/templates/core/macros.jinja:132 core/templates/core/macros.jinja:134 msgid "Next" msgstr "Suivant" -#: core/templates/core/macros.jinja:149 +#: core/templates/core/macros.jinja:150 msgid "Select All" msgstr "Tout sélectionner" -#: core/templates/core/macros.jinja:150 +#: core/templates/core/macros.jinja:151 msgid "Unselect All" msgstr "Tout désélectionner" @@ -3088,15 +3094,15 @@ msgstr "Clubs" msgid "Current club(s) :" msgstr "Clubs actuels : " -#: core/templates/core/user_clubs.jinja:36 +#: core/templates/core/user_clubs.jinja:39 msgid "Old club(s) :" msgstr "Anciens clubs :" -#: core/templates/core/user_clubs.jinja:63 +#: core/templates/core/user_clubs.jinja:69 msgid "Subscribed mailing lists" msgstr "Mailing listes abonnées" -#: core/templates/core/user_clubs.jinja:65 +#: core/templates/core/user_clubs.jinja:71 msgid "Unsubscribe" msgstr "Se désabonner" @@ -3309,7 +3315,7 @@ msgstr "Photos de %(user_name)s" msgid "Preferences" msgstr "Préférences" -#: core/templates/core/user_preferences.jinja:14 trombi/views.py:56 +#: core/templates/core/user_preferences.jinja:14 trombi/views.py:58 msgid "Trombi" msgstr "Trombi" @@ -3358,6 +3364,10 @@ msgstr "Achats" msgid "Product top 10" msgstr "Top 10 produits" +#: core/templates/core/user_stats.jinja:27 counter/views.py:1712 +msgid "Product" +msgstr "Produit" + #: core/templates/core/user_tools.jinja:4 #, python-format msgid "%(user_name)s's tools" @@ -3539,7 +3549,7 @@ msgstr "Erreur de création du dossier %(folder_name)s : %(msg)s" msgid "Error uploading file %(file_name)s: %(msg)s" msgstr "Erreur d'envoi du fichier %(file_name)s : %(msg)s" -#: core/views/files.py:196 sas/views.py:372 +#: core/views/files.py:196 sas/views.py:378 msgid "Apply rights recursively" msgstr "Appliquer les droits récursivement" @@ -3655,7 +3665,7 @@ msgstr "Parrain" msgid "Godchild" msgstr "Fillot" -#: core/views/forms.py:340 counter/views.py:154 trombi/views.py:156 +#: core/views/forms.py:340 counter/views.py:154 trombi/views.py:158 msgid "Select user" msgstr "Choisir un utilisateur" @@ -3800,11 +3810,11 @@ msgstr "est validé" msgid "refilling" msgstr "rechargement" -#: counter/models.py:441 eboutic/models.py:154 +#: counter/models.py:441 eboutic/models.py:161 msgid "unit price" msgstr "prix unitaire" -#: counter/models.py:442 counter/models.py:739 eboutic/models.py:155 +#: counter/models.py:442 counter/models.py:739 eboutic/models.py:162 msgid "quantity" msgstr "quantité" @@ -4234,14 +4244,6 @@ msgstr "Administration des comptoirs" msgid "Stocks" msgstr "Stocks" -#: counter/views.py:797 -msgid "Products" -msgstr "Produits" - -#: counter/views.py:802 -msgid "Archived products" -msgstr "Produits archivés" - #: counter/views.py:807 msgid "Product types" msgstr "Types de produit" @@ -4308,27 +4310,27 @@ msgstr "Nombre de chèque" msgid "people(s)" msgstr "personne(s)" -#: eboutic/models.py:94 +#: eboutic/models.py:101 msgid "validated" msgstr "validé" -#: eboutic/models.py:107 +#: eboutic/models.py:114 msgid "Invoice already validated" msgstr "Facture déjà validée" -#: eboutic/models.py:151 +#: eboutic/models.py:158 msgid "product id" msgstr "ID du produit" -#: eboutic/models.py:152 +#: eboutic/models.py:159 msgid "product name" msgstr "nom du produit" -#: eboutic/models.py:153 +#: eboutic/models.py:160 msgid "product type id" msgstr "id du type du produit" -#: eboutic/models.py:170 +#: eboutic/models.py:177 msgid "basket" msgstr "panier" @@ -4342,12 +4344,12 @@ msgstr "Valeur du panier : " msgid "Current account amount: " msgstr "Solde actuel : " -#: eboutic/templates/eboutic/eboutic_main.jinja:41 -#: eboutic/templates/eboutic/eboutic_makecommand.jinja:38 +#: eboutic/templates/eboutic/eboutic_main.jinja:43 +#: eboutic/templates/eboutic/eboutic_makecommand.jinja:40 msgid "Remaining account amount: " msgstr "Solde restant : " -#: eboutic/templates/eboutic/eboutic_main.jinja:48 +#: eboutic/templates/eboutic/eboutic_main.jinja:51 msgid "Proceed to command" msgstr "Procéder à la commande" @@ -4355,18 +4357,18 @@ msgstr "Procéder à la commande" msgid "Basket state" msgstr "État du panier" -#: eboutic/templates/eboutic/eboutic_makecommand.jinja:47 +#: eboutic/templates/eboutic/eboutic_makecommand.jinja:50 msgid "Pay with credit card" msgstr "Payer avec une carte bancaire" -#: eboutic/templates/eboutic/eboutic_makecommand.jinja:52 +#: eboutic/templates/eboutic/eboutic_makecommand.jinja:55 msgid "" "AE account payment disabled because your basket contains refilling items." msgstr "" "Paiement par compte AE désactivé parce que votre panier contient des bons de " "rechargement." -#: eboutic/templates/eboutic/eboutic_makecommand.jinja:57 +#: eboutic/templates/eboutic/eboutic_makecommand.jinja:60 msgid "Pay with Sith account" msgstr "Payer avec un compte AE" @@ -4695,11 +4697,11 @@ msgstr "Enlever des favoris" msgid "Mark as favorite" msgstr "Ajouter aux favoris" -#: forum/views.py:189 +#: forum/views.py:190 msgid "Apply rights and club owner recursively" msgstr "Appliquer les droits et le club propriétaire récursivement" -#: forum/views.py:407 +#: forum/views.py:410 #, python-format msgid "%(author)s said" msgstr "Citation de %(author)s" @@ -5986,6 +5988,10 @@ msgstr "Fin des commentaires : " msgid "Export" msgstr "Exporter" +#: trombi/templates/trombi/detail.jinja:36 +msgid "Add club membership" +msgstr "Ajouter appartenance à un club" + #: trombi/templates/trombi/edit_profile.jinja:4 #: trombi/templates/trombi/edit_profile.jinja:8 msgid "Edit profile" @@ -6076,27 +6082,27 @@ msgstr "" msgid "Edit comment" msgstr "Éditer le commentaire" -#: trombi/views.py:68 +#: trombi/views.py:70 msgid "My profile" msgstr "Mon profil" -#: trombi/views.py:75 +#: trombi/views.py:77 msgid "My pictures" msgstr "Mes photos" -#: trombi/views.py:87 +#: trombi/views.py:89 msgid "Admin tools" msgstr "Admin Trombi" -#: trombi/views.py:220 +#: trombi/views.py:222 msgid "Explain why you rejected the comment" msgstr "Expliquez pourquoi vous refusez le commentaire" -#: trombi/views.py:253 +#: trombi/views.py:255 msgid "Rejected comment" msgstr "Commentaire rejeté" -#: trombi/views.py:255 +#: trombi/views.py:257 #, python-format msgid "" "Your comment to %(target)s on the Trombi \"%(trombi)s\" was rejected for the " @@ -6113,16 +6119,16 @@ msgstr "" "\n" "%(content)s" -#: trombi/views.py:287 +#: trombi/views.py:289 #, python-format msgid "%(name)s (deadline: %(date)s)" msgstr "%(name)s (date limite: %(date)s)" -#: trombi/views.py:297 +#: trombi/views.py:299 msgid "Select trombi" msgstr "Choisir un trombi" -#: trombi/views.py:299 +#: trombi/views.py:301 msgid "" "This allows you to subscribe to a Trombi. Be aware that you can subscribe " "only once, so don't play with that, or you will expose yourself to the " @@ -6132,19 +6138,19 @@ msgstr "" "pouvez vous inscrire qu'à un seul Trombi, donc ne jouez pas avec cet option " "ou vous encourerez la colère des admins!" -#: trombi/views.py:372 +#: trombi/views.py:374 msgid "Personal email (not UTBM)" msgstr "Email personnel (pas UTBM)" -#: trombi/views.py:373 +#: trombi/views.py:375 msgid "Phone" msgstr "Téléphone" -#: trombi/views.py:374 +#: trombi/views.py:376 msgid "Native town" msgstr "Ville d'origine" -#: trombi/views.py:458 +#: trombi/views.py:489 msgid "" "You can not yet write comment, you must wait for the subscription deadline " "to be passed." @@ -6152,11 +6158,11 @@ msgstr "" "Vous ne pouvez pas encore écrire de commentaires, vous devez attendre la fin " "des inscriptions" -#: trombi/views.py:465 +#: trombi/views.py:496 msgid "You can not write comment anymore, the deadline is already passed." msgstr "Vous ne pouvez plus écrire de commentaires, la date est passée." -#: trombi/views.py:478 +#: trombi/views.py:509 #, python-format msgid "Maximum characters: %(max_length)s" msgstr "Nombre de caractères max: %(max_length)s" diff --git a/trombi/templates/trombi/detail.jinja b/trombi/templates/trombi/detail.jinja index de788abb..85556703 100644 --- a/trombi/templates/trombi/detail.jinja +++ b/trombi/templates/trombi/detail.jinja @@ -33,6 +33,7 @@
{{ u.user.get_display_name() }}
{% trans %}Delete{% endtrans %}
+
{% trans %}Add club membership{% endtrans %}
{% endfor %} diff --git a/trombi/urls.py b/trombi/urls.py index 76575ef9..9858ea65 100644 --- a/trombi/urls.py +++ b/trombi/urls.py @@ -1,7 +1,8 @@ # -*- coding:utf-8 -* # -# Copyright 2017 +# Copyright 2017,2020 # - Skia +# - Sli # # Ce fichier fait partie du site de l'Association des Étudiants de l'UTBM, # http://ae.utbm.fr. @@ -81,4 +82,9 @@ urlpatterns = [ UserTrombiDeleteMembershipView.as_view(), name="delete_membership", ), + re_path( + r"^membership/(?P[0-9]+)/create$", + UserTrombiAddMembershipView.as_view(), + name="create_membership", + ), ] diff --git a/trombi/views.py b/trombi/views.py index 2f21a68d..71749f78 100644 --- a/trombi/views.py +++ b/trombi/views.py @@ -1,7 +1,8 @@ # -*- coding:utf-8 -* # -# Copyright 2017 +# Copyright 2017,2020 # - Skia +# - Sli # # Ce fichier fait partie du site de l'Association des Étudiants de l'UTBM, # http://ae.utbm.fr. @@ -31,6 +32,7 @@ from django.utils.translation import ugettext_lazy as _ from django import forms from django.conf import settings from django.forms.models import modelform_factory +from django.core.exceptions import PermissionDenied from ajax_select.fields import AutoCompleteSelectField @@ -410,6 +412,35 @@ class UserTrombiDeleteMembershipView(TrombiTabsMixin, CanEditMixin, DeleteView): ) +# Used by admins when someone does not have every club in his list +class UserTrombiAddMembershipView(TrombiTabsMixin, CreateView): + model = TrombiClubMembership + template_name = "core/edit.jinja" + fields = ["club", "role", "start", "end"] + pk_url_kwarg = "user_id" + current_tab = "profile" + + def dispatch(self, request, *arg, **kwargs): + self.trombi_user = get_object_or_404(TrombiUser, pk=kwargs["user_id"]) + if not self.trombi_user.trombi.is_owned_by(request.user): + raise PermissionDenied() + + return super(UserTrombiAddMembershipView, self).dispatch( + request, *arg, **kwargs + ) + + def form_valid(self, form): + membership = form.save(commit=False) + membership.user = self.trombi_user + membership.save() + return HttpResponseRedirect(self.get_success_url()) + + def get_success_url(self): + return reverse( + "trombi:detail", kwargs={"trombi_id": self.trombi_user.trombi.id} + ) + + class UserTrombiEditMembershipView(CanEditMixin, TrombiTabsMixin, UpdateView): model = TrombiClubMembership pk_url_kwarg = "membership_id"