mirror of
https://github.com/ae-utbm/sith.git
synced 2024-11-25 02:24:26 +00:00
Add SAS moderation tool
This commit is contained in:
parent
157b1e4c78
commit
e681cc65fe
@ -6,7 +6,7 @@
|
|||||||
msgid ""
|
msgid ""
|
||||||
msgstr ""
|
msgstr ""
|
||||||
"Report-Msgid-Bugs-To: \n"
|
"Report-Msgid-Bugs-To: \n"
|
||||||
"POT-Creation-Date: 2016-11-08 18:53+0100\n"
|
"POT-Creation-Date: 2016-11-09 09:21+0100\n"
|
||||||
"PO-Revision-Date: 2016-07-18\n"
|
"PO-Revision-Date: 2016-07-18\n"
|
||||||
"Last-Translator: Skia <skia@libskia.so>\n"
|
"Last-Translator: Skia <skia@libskia.so>\n"
|
||||||
"Language-Team: AE info <ae.info@utbm.fr>\n"
|
"Language-Team: AE info <ae.info@utbm.fr>\n"
|
||||||
@ -123,7 +123,7 @@ msgstr "numéro"
|
|||||||
msgid "journal"
|
msgid "journal"
|
||||||
msgstr "classeur"
|
msgstr "classeur"
|
||||||
|
|
||||||
#: accounting/models.py:194 core/models.py:498 core/models.py:778
|
#: accounting/models.py:194 core/models.py:504 core/models.py:792
|
||||||
#: counter/models.py:244 counter/models.py:287 counter/models.py:404
|
#: counter/models.py:244 counter/models.py:287 counter/models.py:404
|
||||||
#: eboutic/models.py:15 eboutic/models.py:48
|
#: eboutic/models.py:15 eboutic/models.py:48
|
||||||
msgid "date"
|
msgid "date"
|
||||||
@ -190,7 +190,7 @@ msgstr "Compte"
|
|||||||
msgid "Company"
|
msgid "Company"
|
||||||
msgstr "Entreprise"
|
msgstr "Entreprise"
|
||||||
|
|
||||||
#: accounting/models.py:207 sith/settings.py:290
|
#: accounting/models.py:207 sith/settings.py:304
|
||||||
msgid "Other"
|
msgid "Other"
|
||||||
msgstr "Autre"
|
msgstr "Autre"
|
||||||
|
|
||||||
@ -305,13 +305,14 @@ msgstr "Compte en banque : "
|
|||||||
#: accounting/templates/accounting/label_list.jinja:21
|
#: accounting/templates/accounting/label_list.jinja:21
|
||||||
#: club/templates/club/club_sellings.jinja:49
|
#: club/templates/club/club_sellings.jinja:49
|
||||||
#: core/templates/core/file_detail.jinja:43
|
#: core/templates/core/file_detail.jinja:43
|
||||||
|
#: core/templates/core/file_moderation.jinja:24
|
||||||
#: core/templates/core/group_list.jinja:13 core/templates/core/macros.jinja:66
|
#: core/templates/core/group_list.jinja:13 core/templates/core/macros.jinja:66
|
||||||
#: core/templates/core/user_account_detail.jinja:38
|
#: core/templates/core/user_account_detail.jinja:38
|
||||||
#: core/templates/core/user_edit.jinja:18
|
#: core/templates/core/user_edit.jinja:19
|
||||||
#: counter/templates/counter/last_ops.jinja:29
|
#: counter/templates/counter/last_ops.jinja:29
|
||||||
#: counter/templates/counter/last_ops.jinja:59
|
#: counter/templates/counter/last_ops.jinja:59
|
||||||
#: launderette/templates/launderette/launderette_admin.jinja:16
|
#: launderette/templates/launderette/launderette_admin.jinja:16
|
||||||
#: launderette/views.py:146
|
#: launderette/views.py:146 sas/templates/sas/moderation.jinja:26
|
||||||
msgid "Delete"
|
msgid "Delete"
|
||||||
msgstr "Supprimer"
|
msgstr "Supprimer"
|
||||||
|
|
||||||
@ -532,7 +533,7 @@ msgstr "Il n'y a pas d'étiquette dans ce compte club."
|
|||||||
msgid "Edit operation"
|
msgid "Edit operation"
|
||||||
msgstr "Éditer l'opération"
|
msgstr "Éditer l'opération"
|
||||||
|
|
||||||
#: accounting/templates/accounting/operation_edit.jinja:40
|
#: accounting/templates/accounting/operation_edit.jinja:41
|
||||||
#: core/templates/core/create.jinja:12 core/templates/core/edit.jinja:7
|
#: core/templates/core/create.jinja:12 core/templates/core/edit.jinja:7
|
||||||
#: core/templates/core/edit.jinja.py:15 core/templates/core/edit.jinja:20
|
#: core/templates/core/edit.jinja.py:15 core/templates/core/edit.jinja:20
|
||||||
#: core/templates/core/file_edit.jinja:8 core/templates/core/page_prop.jinja:8
|
#: core/templates/core/file_edit.jinja:8 core/templates/core/page_prop.jinja:8
|
||||||
@ -754,7 +755,7 @@ msgid "Payment method"
|
|||||||
msgstr "Méthode de paiement"
|
msgstr "Méthode de paiement"
|
||||||
|
|
||||||
#: club/templates/club/club_tools.jinja:4
|
#: club/templates/club/club_tools.jinja:4
|
||||||
#: core/templates/core/user_tools.jinja:62
|
#: core/templates/core/user_tools.jinja:71
|
||||||
msgid "Club tools"
|
msgid "Club tools"
|
||||||
msgstr "Outils club"
|
msgstr "Outils club"
|
||||||
|
|
||||||
@ -792,7 +793,7 @@ msgstr "Propriétés"
|
|||||||
msgid "Select user"
|
msgid "Select user"
|
||||||
msgstr "Choisir un utilisateur"
|
msgstr "Choisir un utilisateur"
|
||||||
|
|
||||||
#: club/views.py:150
|
#: club/views.py:150 sas/views.py:59 sas/views.py:96
|
||||||
msgid "You do not have the permission to do that"
|
msgid "You do not have the permission to do that"
|
||||||
msgstr "Vous n'avez pas la permission de faire cela"
|
msgstr "Vous n'avez pas la permission de faire cela"
|
||||||
|
|
||||||
@ -1084,128 +1085,132 @@ msgstr "adresse des parents"
|
|||||||
msgid "is subscriber viewable"
|
msgid "is subscriber viewable"
|
||||||
msgstr "profil visible par les cotisants"
|
msgstr "profil visible par les cotisants"
|
||||||
|
|
||||||
#: core/models.py:294
|
#: core/models.py:300
|
||||||
msgid "A user with that username already exists"
|
msgid "A user with that username already exists"
|
||||||
msgstr "Un utilisateur de ce nom d'utilisateur existe déjà"
|
msgstr "Un utilisateur de ce nom d'utilisateur existe déjà"
|
||||||
|
|
||||||
#: core/models.py:417 core/templates/core/macros.jinja:17
|
#: core/models.py:423 core/templates/core/macros.jinja:17
|
||||||
#: core/templates/core/user_detail.jinja:14
|
#: core/templates/core/user_detail.jinja:14
|
||||||
#: core/templates/core/user_detail.jinja:16
|
#: core/templates/core/user_detail.jinja:16
|
||||||
#: core/templates/core/user_edit.jinja:16
|
#: core/templates/core/user_edit.jinja:17
|
||||||
msgid "Profile"
|
msgid "Profile"
|
||||||
msgstr "Profil"
|
msgstr "Profil"
|
||||||
|
|
||||||
#: core/models.py:475
|
#: core/models.py:481
|
||||||
msgid "Visitor"
|
msgid "Visitor"
|
||||||
msgstr "Visiteur"
|
msgstr "Visiteur"
|
||||||
|
|
||||||
#: core/models.py:480
|
#: core/models.py:486
|
||||||
msgid "define if we show a users stats"
|
msgid "define if we show a users stats"
|
||||||
msgstr "Definit si l'on montre les statistiques de l'utilisateur"
|
msgstr "Definit si l'on montre les statistiques de l'utilisateur"
|
||||||
|
|
||||||
#: core/models.py:482
|
#: core/models.py:488
|
||||||
msgid "Show your account statistics to others"
|
msgid "Show your account statistics to others"
|
||||||
msgstr "Montrez vos statistiques de compte aux autres"
|
msgstr "Montrez vos statistiques de compte aux autres"
|
||||||
|
|
||||||
#: core/models.py:489
|
#: core/models.py:495
|
||||||
msgid "file name"
|
msgid "file name"
|
||||||
msgstr "nom du fichier"
|
msgstr "nom du fichier"
|
||||||
|
|
||||||
#: core/models.py:490 core/models.py:625
|
#: core/models.py:496 core/models.py:639
|
||||||
msgid "parent"
|
msgid "parent"
|
||||||
msgstr "parent"
|
msgstr "parent"
|
||||||
|
|
||||||
#: core/models.py:491 core/models.py:501
|
#: core/models.py:497 core/models.py:508
|
||||||
msgid "file"
|
msgid "file"
|
||||||
msgstr "fichier"
|
msgstr "fichier"
|
||||||
|
|
||||||
#: core/models.py:492
|
#: core/models.py:498
|
||||||
msgid "owner"
|
msgid "owner"
|
||||||
msgstr "propriétaire"
|
msgstr "propriétaire"
|
||||||
|
|
||||||
#: core/models.py:493 core/models.py:631
|
#: core/models.py:499 core/models.py:645
|
||||||
msgid "edit group"
|
msgid "edit group"
|
||||||
msgstr "groupe d'édition"
|
msgstr "groupe d'édition"
|
||||||
|
|
||||||
#: core/models.py:494 core/models.py:632
|
#: core/models.py:500 core/models.py:646
|
||||||
msgid "view group"
|
msgid "view group"
|
||||||
msgstr "groupe de vue"
|
msgstr "groupe de vue"
|
||||||
|
|
||||||
#: core/models.py:495
|
#: core/models.py:501
|
||||||
msgid "is folder"
|
msgid "is folder"
|
||||||
msgstr "est un dossier"
|
msgstr "est un dossier"
|
||||||
|
|
||||||
#: core/models.py:496
|
#: core/models.py:502
|
||||||
msgid "mime type"
|
msgid "mime type"
|
||||||
msgstr "type mime"
|
msgstr "type mime"
|
||||||
|
|
||||||
#: core/models.py:497
|
#: core/models.py:503
|
||||||
msgid "size"
|
msgid "size"
|
||||||
msgstr "taille"
|
msgstr "taille"
|
||||||
|
|
||||||
#: core/models.py:529
|
#: core/models.py:505
|
||||||
|
msgid "is moderated"
|
||||||
|
msgstr "est modéré"
|
||||||
|
|
||||||
|
#: core/models.py:538
|
||||||
msgid "Character '/' not authorized in name"
|
msgid "Character '/' not authorized in name"
|
||||||
msgstr "Le caractère '/' n'est pas autorisé dans les noms de fichier"
|
msgstr "Le caractère '/' n'est pas autorisé dans les noms de fichier"
|
||||||
|
|
||||||
#: core/models.py:532 core/models.py:537
|
#: core/models.py:541 core/models.py:546
|
||||||
msgid "Loop in folder tree"
|
msgid "Loop in folder tree"
|
||||||
msgstr "Boucle dans l'arborescence des dossiers"
|
msgstr "Boucle dans l'arborescence des dossiers"
|
||||||
|
|
||||||
#: core/models.py:541
|
#: core/models.py:550
|
||||||
msgid "You can not make a file be a children of a non folder file"
|
msgid "You can not make a file be a children of a non folder file"
|
||||||
msgstr ""
|
msgstr ""
|
||||||
"Vous ne pouvez pas mettre un fichier enfant de quelque chose qui n'est pas "
|
"Vous ne pouvez pas mettre un fichier enfant de quelque chose qui n'est pas "
|
||||||
"un dossier"
|
"un dossier"
|
||||||
|
|
||||||
#: core/models.py:545
|
#: core/models.py:554
|
||||||
msgid "Duplicate file"
|
msgid "Duplicate file"
|
||||||
msgstr "Un fichier de ce nom existe déjà"
|
msgstr "Un fichier de ce nom existe déjà"
|
||||||
|
|
||||||
#: core/models.py:555
|
#: core/models.py:564
|
||||||
msgid "You must provide a file"
|
msgid "You must provide a file"
|
||||||
msgstr "Vous devez fournir un fichier"
|
msgstr "Vous devez fournir un fichier"
|
||||||
|
|
||||||
#: core/models.py:580
|
#: core/models.py:594
|
||||||
msgid "Folder: "
|
msgid "Folder: "
|
||||||
msgstr "Dossier : "
|
msgstr "Dossier : "
|
||||||
|
|
||||||
#: core/models.py:582
|
#: core/models.py:596
|
||||||
msgid "File: "
|
msgid "File: "
|
||||||
msgstr "Fichier : "
|
msgstr "Fichier : "
|
||||||
|
|
||||||
#: core/models.py:624 core/models.py:628
|
#: core/models.py:638 core/models.py:642
|
||||||
msgid "page name"
|
msgid "page name"
|
||||||
msgstr "nom de la page"
|
msgstr "nom de la page"
|
||||||
|
|
||||||
#: core/models.py:629
|
#: core/models.py:643
|
||||||
msgid "owner group"
|
msgid "owner group"
|
||||||
msgstr "groupe propriétaire"
|
msgstr "groupe propriétaire"
|
||||||
|
|
||||||
#: core/models.py:633
|
#: core/models.py:647
|
||||||
msgid "lock user"
|
msgid "lock user"
|
||||||
msgstr "utilisateur bloquant"
|
msgstr "utilisateur bloquant"
|
||||||
|
|
||||||
#: core/models.py:634
|
#: core/models.py:648
|
||||||
msgid "lock_timeout"
|
msgid "lock_timeout"
|
||||||
msgstr "décompte du déblocage"
|
msgstr "décompte du déblocage"
|
||||||
|
|
||||||
#: core/models.py:661
|
#: core/models.py:675
|
||||||
msgid "Duplicate page"
|
msgid "Duplicate page"
|
||||||
msgstr "Une page de ce nom existe déjà"
|
msgstr "Une page de ce nom existe déjà"
|
||||||
|
|
||||||
#: core/models.py:667
|
#: core/models.py:681
|
||||||
msgid "Loop in page tree"
|
msgid "Loop in page tree"
|
||||||
msgstr "Boucle dans l'arborescence des pages"
|
msgstr "Boucle dans l'arborescence des pages"
|
||||||
|
|
||||||
#: core/models.py:775
|
#: core/models.py:789
|
||||||
msgid "revision"
|
msgid "revision"
|
||||||
msgstr "révision"
|
msgstr "révision"
|
||||||
|
|
||||||
#: core/models.py:776
|
#: core/models.py:790
|
||||||
msgid "page title"
|
msgid "page title"
|
||||||
msgstr "titre de la page"
|
msgstr "titre de la page"
|
||||||
|
|
||||||
#: core/models.py:777
|
#: core/models.py:791
|
||||||
msgid "page content"
|
msgid "page content"
|
||||||
msgstr "contenu de la page"
|
msgstr "contenu de la page"
|
||||||
|
|
||||||
@ -1254,7 +1259,9 @@ msgstr "Matmatronch"
|
|||||||
msgid "Wiki"
|
msgid "Wiki"
|
||||||
msgstr "Wiki"
|
msgstr "Wiki"
|
||||||
|
|
||||||
#: core/templates/core/base.jinja:71
|
#: core/templates/core/base.jinja:71 sas/templates/sas/album.jinja:4
|
||||||
|
#: sas/templates/sas/main.jinja:4 sas/templates/sas/main.jinja.py:8
|
||||||
|
#: sas/templates/sas/picture.jinja:4
|
||||||
msgid "SAS"
|
msgid "SAS"
|
||||||
msgstr "SAS"
|
msgstr "SAS"
|
||||||
|
|
||||||
@ -1267,7 +1274,7 @@ msgid "Services"
|
|||||||
msgstr "Services"
|
msgstr "Services"
|
||||||
|
|
||||||
#: core/templates/core/base.jinja:74 core/templates/core/file.jinja:20
|
#: core/templates/core/base.jinja:74 core/templates/core/file.jinja:20
|
||||||
#: core/views/files.py:47
|
#: core/views/files.py:48
|
||||||
msgid "Files"
|
msgid "Files"
|
||||||
msgstr "Fichiers"
|
msgstr "Fichiers"
|
||||||
|
|
||||||
@ -1340,6 +1347,8 @@ msgid "Prop"
|
|||||||
msgstr "Propriétés"
|
msgstr "Propriétés"
|
||||||
|
|
||||||
#: core/templates/core/file_detail.jinja:13
|
#: core/templates/core/file_detail.jinja:13
|
||||||
|
#: core/templates/core/file_moderation.jinja:20
|
||||||
|
#: sas/templates/sas/moderation.jinja:22
|
||||||
msgid "Owner: "
|
msgid "Owner: "
|
||||||
msgstr "Propriétaire : "
|
msgstr "Propriétaire : "
|
||||||
|
|
||||||
@ -1348,6 +1357,8 @@ msgid "Real name: "
|
|||||||
msgstr "Nom réel : "
|
msgstr "Nom réel : "
|
||||||
|
|
||||||
#: core/templates/core/file_detail.jinja:35
|
#: core/templates/core/file_detail.jinja:35
|
||||||
|
#: core/templates/core/file_moderation.jinja:21
|
||||||
|
#: sas/templates/sas/moderation.jinja:23
|
||||||
msgid "Date: "
|
msgid "Date: "
|
||||||
msgstr "Date : "
|
msgstr "Date : "
|
||||||
|
|
||||||
@ -1367,10 +1378,26 @@ msgstr "octets"
|
|||||||
msgid "Download"
|
msgid "Download"
|
||||||
msgstr "Télécharger"
|
msgstr "Télécharger"
|
||||||
|
|
||||||
|
#: core/templates/core/file_detail.jinja:46
|
||||||
|
#: core/templates/core/file_moderation.jinja:23
|
||||||
|
#: sas/templates/sas/moderation.jinja:25
|
||||||
|
msgid "Moderate"
|
||||||
|
msgstr "Modérer"
|
||||||
|
|
||||||
#: core/templates/core/file_list.jinja:19
|
#: core/templates/core/file_list.jinja:19
|
||||||
msgid "There is no file in this website."
|
msgid "There is no file in this website."
|
||||||
msgstr "Il n'y a pas de fichier sur ce site web."
|
msgstr "Il n'y a pas de fichier sur ce site web."
|
||||||
|
|
||||||
|
#: core/templates/core/file_moderation.jinja:4
|
||||||
|
#: core/templates/core/file_moderation.jinja:8
|
||||||
|
msgid "File moderation"
|
||||||
|
msgstr "Modération des fichiers"
|
||||||
|
|
||||||
|
#: core/templates/core/file_moderation.jinja:19
|
||||||
|
#: sas/templates/sas/moderation.jinja:21
|
||||||
|
msgid "Full name: "
|
||||||
|
msgstr "Nom complet : "
|
||||||
|
|
||||||
#: core/templates/core/group_edit.jinja:4
|
#: core/templates/core/group_edit.jinja:4
|
||||||
msgid "Back to list"
|
msgid "Back to list"
|
||||||
msgstr "Retour à la liste"
|
msgstr "Retour à la liste"
|
||||||
@ -1380,7 +1407,7 @@ msgid "Edit group"
|
|||||||
msgstr "Éditer le groupe"
|
msgstr "Éditer le groupe"
|
||||||
|
|
||||||
#: core/templates/core/group_edit.jinja:9
|
#: core/templates/core/group_edit.jinja:9
|
||||||
#: core/templates/core/user_edit.jinja:36
|
#: core/templates/core/user_edit.jinja:37
|
||||||
#: core/templates/core/user_group.jinja:8
|
#: core/templates/core/user_group.jinja:8
|
||||||
msgid "Update"
|
msgid "Update"
|
||||||
msgstr "Mettre à jour"
|
msgstr "Mettre à jour"
|
||||||
@ -1438,7 +1465,7 @@ msgstr "Promo : "
|
|||||||
msgid "Subscribed until %(subscription_end)s"
|
msgid "Subscribed until %(subscription_end)s"
|
||||||
msgstr "Cotisant jusqu'au %(subscription_end)s"
|
msgstr "Cotisant jusqu'au %(subscription_end)s"
|
||||||
|
|
||||||
#: core/templates/core/macros.jinja:39 core/templates/core/user_edit.jinja:39
|
#: core/templates/core/macros.jinja:39 core/templates/core/user_edit.jinja:40
|
||||||
msgid "Account number: "
|
msgid "Account number: "
|
||||||
msgstr "Numero de compte : "
|
msgstr "Numero de compte : "
|
||||||
|
|
||||||
@ -1752,39 +1779,39 @@ msgstr "Éditer l'utilisateur"
|
|||||||
msgid "Edit user profile"
|
msgid "Edit user profile"
|
||||||
msgstr "Éditer le profil de l'utilisateur"
|
msgstr "Éditer le profil de l'utilisateur"
|
||||||
|
|
||||||
#: core/templates/core/user_edit.jinja:14
|
#: core/templates/core/user_edit.jinja:15
|
||||||
msgid "Current profile: "
|
msgid "Current profile: "
|
||||||
msgstr "Profil actuel : "
|
msgstr "Profil actuel : "
|
||||||
|
|
||||||
#: core/templates/core/user_edit.jinja:24
|
#: core/templates/core/user_edit.jinja:25
|
||||||
msgid "Take picture"
|
msgid "Take picture"
|
||||||
msgstr "Prendre une photo"
|
msgstr "Prendre une photo"
|
||||||
|
|
||||||
#: core/templates/core/user_edit.jinja:29
|
#: core/templates/core/user_edit.jinja:30
|
||||||
msgid "Current avatar: "
|
msgid "Current avatar: "
|
||||||
msgstr "Avatar actuel : "
|
msgstr "Avatar actuel : "
|
||||||
|
|
||||||
#: core/templates/core/user_edit.jinja:30
|
#: core/templates/core/user_edit.jinja:31
|
||||||
msgid "Avatar"
|
msgid "Avatar"
|
||||||
msgstr "Avatar"
|
msgstr "Avatar"
|
||||||
|
|
||||||
#: core/templates/core/user_edit.jinja:32
|
#: core/templates/core/user_edit.jinja:33
|
||||||
msgid "Current scrub: "
|
msgid "Current scrub: "
|
||||||
msgstr "Blouse actuelle : "
|
msgstr "Blouse actuelle : "
|
||||||
|
|
||||||
#: core/templates/core/user_edit.jinja:33
|
#: core/templates/core/user_edit.jinja:34
|
||||||
msgid "Scrub"
|
msgid "Scrub"
|
||||||
msgstr "Blouse"
|
msgstr "Blouse"
|
||||||
|
|
||||||
#: core/templates/core/user_edit.jinja:37
|
#: core/templates/core/user_edit.jinja:38
|
||||||
msgid "Username: "
|
msgid "Username: "
|
||||||
msgstr "Nom d'utilisateur : "
|
msgstr "Nom d'utilisateur : "
|
||||||
|
|
||||||
#: core/templates/core/user_edit.jinja:42
|
#: core/templates/core/user_edit.jinja:43
|
||||||
msgid "Change my password"
|
msgid "Change my password"
|
||||||
msgstr "Changer mon mot de passe"
|
msgstr "Changer mon mot de passe"
|
||||||
|
|
||||||
#: core/templates/core/user_edit.jinja:44
|
#: core/templates/core/user_edit.jinja:45
|
||||||
msgid "Change user password"
|
msgid "Change user password"
|
||||||
msgstr "Changer le mot de passe"
|
msgstr "Changer le mot de passe"
|
||||||
|
|
||||||
@ -1902,16 +1929,25 @@ msgstr "Comptabilité générale"
|
|||||||
msgid "Club account: "
|
msgid "Club account: "
|
||||||
msgstr "Compte club : "
|
msgstr "Compte club : "
|
||||||
|
|
||||||
#: core/views/files.py:46
|
#: core/templates/core/user_tools.jinja:63
|
||||||
|
msgid "Communication"
|
||||||
|
msgstr "Communication"
|
||||||
|
|
||||||
|
#: core/templates/core/user_tools.jinja:65
|
||||||
|
msgid "Moderate files"
|
||||||
|
msgstr "Modérer les fichiers"
|
||||||
|
|
||||||
|
#: core/views/files.py:47
|
||||||
msgid "Add a new folder"
|
msgid "Add a new folder"
|
||||||
msgstr "Ajouter un nouveau dossier"
|
msgstr "Ajouter un nouveau dossier"
|
||||||
|
|
||||||
#: core/views/files.py:57
|
#: core/views/files.py:58
|
||||||
#, python-format
|
#, python-format
|
||||||
msgid "Error creating folder %(folder_name)s: %(msg)s"
|
msgid "Error creating folder %(folder_name)s: %(msg)s"
|
||||||
msgstr "Erreur de création du dossier %(folder_name)s : %(msg)s"
|
msgstr "Erreur de création du dossier %(folder_name)s : %(msg)s"
|
||||||
|
|
||||||
#: core/views/files.py:66 core/views/forms.py:181 core/views/forms.py:185
|
#: core/views/files.py:67 core/views/forms.py:181 core/views/forms.py:185
|
||||||
|
#: sas/views.py:41
|
||||||
#, python-format
|
#, python-format
|
||||||
msgid "Error uploading file %(file_name)s: %(msg)s"
|
msgid "Error uploading file %(file_name)s: %(msg)s"
|
||||||
msgstr "Erreur d'envoie du fichier %(file_name)s : %(msg)s"
|
msgstr "Erreur d'envoie du fichier %(file_name)s : %(msg)s"
|
||||||
@ -2042,7 +2078,7 @@ msgstr "Bureau"
|
|||||||
#: eboutic/templates/eboutic/eboutic_main.jinja:24
|
#: eboutic/templates/eboutic/eboutic_main.jinja:24
|
||||||
#: eboutic/templates/eboutic/eboutic_makecommand.jinja:8
|
#: eboutic/templates/eboutic/eboutic_makecommand.jinja:8
|
||||||
#: eboutic/templates/eboutic/eboutic_payment_result.jinja:4
|
#: eboutic/templates/eboutic/eboutic_payment_result.jinja:4
|
||||||
#: sith/settings.py:289 sith/settings.py:297
|
#: sith/settings.py:303 sith/settings.py:311
|
||||||
msgid "Eboutic"
|
msgid "Eboutic"
|
||||||
msgstr "Eboutic"
|
msgstr "Eboutic"
|
||||||
|
|
||||||
@ -2083,8 +2119,8 @@ msgstr "quantité"
|
|||||||
msgid "Sith account"
|
msgid "Sith account"
|
||||||
msgstr "Compte utilisateur"
|
msgstr "Compte utilisateur"
|
||||||
|
|
||||||
#: counter/models.py:289 sith/settings.py:282 sith/settings.py:287
|
#: counter/models.py:289 sith/settings.py:296 sith/settings.py:301
|
||||||
#: sith/settings.py:309
|
#: sith/settings.py:323
|
||||||
msgid "Credit card"
|
msgid "Credit card"
|
||||||
msgstr "Carte bancaire"
|
msgstr "Carte bancaire"
|
||||||
|
|
||||||
@ -2182,7 +2218,8 @@ msgid ""
|
|||||||
"counter is open but not active, the last sale was done at least %(minutes)s "
|
"counter is open but not active, the last sale was done at least %(minutes)s "
|
||||||
"minutes ago "
|
"minutes ago "
|
||||||
msgstr ""
|
msgstr ""
|
||||||
"Le comptoir est ouvert, mais inactif. La dernière vente a eu lieu il y a %(minutes)s minutes."
|
"Le comptoir est ouvert, mais inactif. La dernière vente a eu lieu il y a "
|
||||||
|
"%(minutes)s minutes."
|
||||||
|
|
||||||
#: counter/templates/counter/activity.jinja:24
|
#: counter/templates/counter/activity.jinja:24
|
||||||
msgid "counter is not open : no one is connected"
|
msgid "counter is not open : no one is connected"
|
||||||
@ -2642,12 +2679,12 @@ msgid "Washing and drying"
|
|||||||
msgstr "Lavage et séchage"
|
msgstr "Lavage et séchage"
|
||||||
|
|
||||||
#: launderette/templates/launderette/launderette_book.jinja:27
|
#: launderette/templates/launderette/launderette_book.jinja:27
|
||||||
#: sith/settings.py:429
|
#: sith/settings.py:443
|
||||||
msgid "Washing"
|
msgid "Washing"
|
||||||
msgstr "Lavage"
|
msgstr "Lavage"
|
||||||
|
|
||||||
#: launderette/templates/launderette/launderette_book.jinja:31
|
#: launderette/templates/launderette/launderette_book.jinja:31
|
||||||
#: sith/settings.py:429
|
#: sith/settings.py:443
|
||||||
msgid "Drying"
|
msgid "Drying"
|
||||||
msgstr "Séchage"
|
msgstr "Séchage"
|
||||||
|
|
||||||
@ -2714,115 +2751,140 @@ msgstr "Utilisateur qui sera conservé"
|
|||||||
msgid "User that will be deleted"
|
msgid "User that will be deleted"
|
||||||
msgstr "Utilisateur qui sera supprimé"
|
msgstr "Utilisateur qui sera supprimé"
|
||||||
|
|
||||||
#: sith/settings.py:165
|
#: sas/templates/sas/album.jinja:12
|
||||||
|
msgid "Upload"
|
||||||
|
msgstr "Envoyer"
|
||||||
|
|
||||||
|
#: sas/templates/sas/main.jinja:15
|
||||||
|
msgid "Create"
|
||||||
|
msgstr "Créer"
|
||||||
|
|
||||||
|
#: sas/templates/sas/moderation.jinja:4 sas/templates/sas/moderation.jinja:8
|
||||||
|
msgid "SAS moderation"
|
||||||
|
msgstr "Modération du SAS"
|
||||||
|
|
||||||
|
#: sas/views.py:20
|
||||||
|
msgid "Add a new album"
|
||||||
|
msgstr "Ajouter un nouvel album"
|
||||||
|
|
||||||
|
#: sas/views.py:21
|
||||||
|
msgid "Upload images"
|
||||||
|
msgstr "Envoyer les images"
|
||||||
|
|
||||||
|
#: sas/views.py:31
|
||||||
|
#, python-format
|
||||||
|
msgid "Error creating album %(album)s: %(msg)s"
|
||||||
|
msgstr "Erreur de création de l'album %(album)s : %(msg)s"
|
||||||
|
|
||||||
|
#: sith/settings.py:166
|
||||||
msgid "English"
|
msgid "English"
|
||||||
msgstr "Anglais"
|
msgstr "Anglais"
|
||||||
|
|
||||||
#: sith/settings.py:166
|
#: sith/settings.py:167
|
||||||
msgid "French"
|
msgid "French"
|
||||||
msgstr "Français"
|
msgstr "Français"
|
||||||
|
|
||||||
#: sith/settings.py:279 sith/settings.py:286 sith/settings.py:307
|
#: sith/settings.py:293 sith/settings.py:300 sith/settings.py:321
|
||||||
msgid "Check"
|
msgid "Check"
|
||||||
msgstr "Chèque"
|
msgstr "Chèque"
|
||||||
|
|
||||||
#: sith/settings.py:280 sith/settings.py:288 sith/settings.py:308
|
#: sith/settings.py:294 sith/settings.py:302 sith/settings.py:322
|
||||||
msgid "Cash"
|
msgid "Cash"
|
||||||
msgstr "Espèces"
|
msgstr "Espèces"
|
||||||
|
|
||||||
#: sith/settings.py:281
|
#: sith/settings.py:295
|
||||||
msgid "Transfert"
|
msgid "Transfert"
|
||||||
msgstr "Virement"
|
msgstr "Virement"
|
||||||
|
|
||||||
#: sith/settings.py:294
|
#: sith/settings.py:308
|
||||||
msgid "Belfort"
|
msgid "Belfort"
|
||||||
msgstr "Belfort"
|
msgstr "Belfort"
|
||||||
|
|
||||||
#: sith/settings.py:295
|
#: sith/settings.py:309
|
||||||
msgid "Sevenans"
|
msgid "Sevenans"
|
||||||
msgstr "Sevenans"
|
msgstr "Sevenans"
|
||||||
|
|
||||||
#: sith/settings.py:296
|
#: sith/settings.py:310
|
||||||
msgid "Montbéliard"
|
msgid "Montbéliard"
|
||||||
msgstr "Montbéliard"
|
msgstr "Montbéliard"
|
||||||
|
|
||||||
#: sith/settings.py:336
|
#: sith/settings.py:350
|
||||||
msgid "One semester"
|
msgid "One semester"
|
||||||
msgstr "Un semestre, 15 €"
|
msgstr "Un semestre, 15 €"
|
||||||
|
|
||||||
#: sith/settings.py:341
|
#: sith/settings.py:355
|
||||||
msgid "Two semesters"
|
msgid "Two semesters"
|
||||||
msgstr "Deux semestres, 28 €"
|
msgstr "Deux semestres, 28 €"
|
||||||
|
|
||||||
#: sith/settings.py:346
|
#: sith/settings.py:360
|
||||||
msgid "Common core cursus"
|
msgid "Common core cursus"
|
||||||
msgstr "Cursus tronc commun, 45 €"
|
msgstr "Cursus tronc commun, 45 €"
|
||||||
|
|
||||||
#: sith/settings.py:351
|
#: sith/settings.py:365
|
||||||
msgid "Branch cursus"
|
msgid "Branch cursus"
|
||||||
msgstr "Cursus branche, 45 €"
|
msgstr "Cursus branche, 45 €"
|
||||||
|
|
||||||
#: sith/settings.py:356
|
#: sith/settings.py:370
|
||||||
msgid "Alternating cursus"
|
msgid "Alternating cursus"
|
||||||
msgstr "Cursus alternant, 30 €"
|
msgstr "Cursus alternant, 30 €"
|
||||||
|
|
||||||
#: sith/settings.py:361
|
#: sith/settings.py:375
|
||||||
msgid "Honorary member"
|
msgid "Honorary member"
|
||||||
msgstr "Membre honoraire, 0 €"
|
msgstr "Membre honoraire, 0 €"
|
||||||
|
|
||||||
#: sith/settings.py:366
|
#: sith/settings.py:380
|
||||||
msgid "Assidu member"
|
msgid "Assidu member"
|
||||||
msgstr "Membre d'Assidu, 0 €"
|
msgstr "Membre d'Assidu, 0 €"
|
||||||
|
|
||||||
#: sith/settings.py:371
|
#: sith/settings.py:385
|
||||||
msgid "Amicale/DOCEO member"
|
msgid "Amicale/DOCEO member"
|
||||||
msgstr "Membre de l'Amicale/DOCEO, 0 €"
|
msgstr "Membre de l'Amicale/DOCEO, 0 €"
|
||||||
|
|
||||||
#: sith/settings.py:376
|
#: sith/settings.py:390
|
||||||
msgid "UT network member"
|
msgid "UT network member"
|
||||||
msgstr "Cotisant du réseau UT, 0 €"
|
msgstr "Cotisant du réseau UT, 0 €"
|
||||||
|
|
||||||
#: sith/settings.py:381
|
#: sith/settings.py:395
|
||||||
msgid "CROUS member"
|
msgid "CROUS member"
|
||||||
msgstr "Membres du CROUS, 0 €"
|
msgstr "Membres du CROUS, 0 €"
|
||||||
|
|
||||||
#: sith/settings.py:386
|
#: sith/settings.py:400
|
||||||
msgid "Sbarro/ESTA member"
|
msgid "Sbarro/ESTA member"
|
||||||
msgstr "Membre de Sbarro ou de l'ESTA, 15 €"
|
msgstr "Membre de Sbarro ou de l'ESTA, 15 €"
|
||||||
|
|
||||||
#: sith/settings.py:394
|
#: sith/settings.py:408
|
||||||
msgid "President"
|
msgid "President"
|
||||||
msgstr "Président"
|
msgstr "Président"
|
||||||
|
|
||||||
#: sith/settings.py:395
|
#: sith/settings.py:409
|
||||||
msgid "Vice-President"
|
msgid "Vice-President"
|
||||||
msgstr "Vice-Président"
|
msgstr "Vice-Président"
|
||||||
|
|
||||||
#: sith/settings.py:396
|
#: sith/settings.py:410
|
||||||
msgid "Treasurer"
|
msgid "Treasurer"
|
||||||
msgstr "Trésorier"
|
msgstr "Trésorier"
|
||||||
|
|
||||||
#: sith/settings.py:397
|
#: sith/settings.py:411
|
||||||
msgid "Communication supervisor"
|
msgid "Communication supervisor"
|
||||||
msgstr "Responsable com"
|
msgstr "Responsable com"
|
||||||
|
|
||||||
#: sith/settings.py:398
|
#: sith/settings.py:412
|
||||||
msgid "Secretary"
|
msgid "Secretary"
|
||||||
msgstr "Secrétaire"
|
msgstr "Secrétaire"
|
||||||
|
|
||||||
#: sith/settings.py:399
|
#: sith/settings.py:413
|
||||||
msgid "IT supervisor"
|
msgid "IT supervisor"
|
||||||
msgstr "Responsable info"
|
msgstr "Responsable info"
|
||||||
|
|
||||||
#: sith/settings.py:400
|
#: sith/settings.py:414
|
||||||
msgid "Board member"
|
msgid "Board member"
|
||||||
msgstr "Membre du bureau"
|
msgstr "Membre du bureau"
|
||||||
|
|
||||||
#: sith/settings.py:401
|
#: sith/settings.py:415
|
||||||
msgid "Active member"
|
msgid "Active member"
|
||||||
msgstr "Membre actif"
|
msgstr "Membre actif"
|
||||||
|
|
||||||
#: sith/settings.py:402
|
#: sith/settings.py:416
|
||||||
msgid "Curious"
|
msgid "Curious"
|
||||||
msgstr "Curieux"
|
msgstr "Curieux"
|
||||||
|
|
||||||
@ -2866,4 +2928,3 @@ msgstr "Un utilisateur avec cette adresse email existe déjà"
|
|||||||
msgid "You must either choose an existing user or create a new one properly"
|
msgid "You must either choose an existing user or create a new one properly"
|
||||||
msgstr ""
|
msgstr ""
|
||||||
"Vous devez soit choisir un utilisateur existant, ou en créer un proprement."
|
"Vous devez soit choisir un utilisateur existant, ou en créer un proprement."
|
||||||
|
|
||||||
|
32
sas/migrations/0001_initial.py
Normal file
32
sas/migrations/0001_initial.py
Normal file
@ -0,0 +1,32 @@
|
|||||||
|
# -*- coding: utf-8 -*-
|
||||||
|
from __future__ import unicode_literals
|
||||||
|
|
||||||
|
from django.db import migrations, models
|
||||||
|
|
||||||
|
|
||||||
|
class Migration(migrations.Migration):
|
||||||
|
|
||||||
|
dependencies = [
|
||||||
|
('core', '0007_auto_20161108_1703'),
|
||||||
|
]
|
||||||
|
|
||||||
|
operations = [
|
||||||
|
migrations.CreateModel(
|
||||||
|
name='Album',
|
||||||
|
fields=[
|
||||||
|
],
|
||||||
|
options={
|
||||||
|
'proxy': True,
|
||||||
|
},
|
||||||
|
bases=('core.sithfile',),
|
||||||
|
),
|
||||||
|
migrations.CreateModel(
|
||||||
|
name='Picture',
|
||||||
|
fields=[
|
||||||
|
],
|
||||||
|
options={
|
||||||
|
'proxy': True,
|
||||||
|
},
|
||||||
|
bases=('core.sithfile',),
|
||||||
|
),
|
||||||
|
]
|
@ -17,7 +17,7 @@ class Picture(SithFile):
|
|||||||
return user.is_in_group(settings.SITH_SAS_ADMIN_GROUP_ID)
|
return user.is_in_group(settings.SITH_SAS_ADMIN_GROUP_ID)
|
||||||
|
|
||||||
def can_be_viewed_by(self, user):
|
def can_be_viewed_by(self, user):
|
||||||
return self.can_be_edited_by(user) or (self.is_in_sas and self.is_authorized and
|
return self.can_be_edited_by(user) or (self.is_in_sas and self.is_moderated and
|
||||||
user.is_in_group(settings.SITH_MAIN_MEMBERS_GROUP))
|
user.is_in_group(settings.SITH_MAIN_MEMBERS_GROUP))
|
||||||
|
|
||||||
def get_download_url(self):
|
def get_download_url(self):
|
||||||
@ -36,7 +36,7 @@ class Album(SithFile):
|
|||||||
return user.is_in_group(settings.SITH_SAS_ADMIN_GROUP_ID)
|
return user.is_in_group(settings.SITH_SAS_ADMIN_GROUP_ID)
|
||||||
|
|
||||||
def can_be_viewed_by(self, user):
|
def can_be_viewed_by(self, user):
|
||||||
return self.can_be_edited_by(user) or (self.is_in_sas and self.is_authorized and
|
return self.can_be_edited_by(user) or (self.is_in_sas and self.is_moderated and
|
||||||
user.is_in_group(settings.SITH_MAIN_MEMBERS_GROUP))
|
user.is_in_group(settings.SITH_MAIN_MEMBERS_GROUP))
|
||||||
|
|
||||||
def get_absolute_url(self):
|
def get_absolute_url(self):
|
||||||
|
@ -12,7 +12,7 @@
|
|||||||
<p><input type="submit" value="{% trans %}Upload{% endtrans %}" /></p>
|
<p><input type="submit" value="{% trans %}Upload{% endtrans %}" /></p>
|
||||||
</form>
|
</form>
|
||||||
<div>
|
<div>
|
||||||
{% for a in album.children.filter(is_folder=True).all() %}
|
{% for a in album.children.filter(is_folder=True, is_moderated=True).all() %}
|
||||||
<div style="display: inline-block; border: solid 1px black;">
|
<div style="display: inline-block; border: solid 1px black;">
|
||||||
<a href="{{ url("sas:album", album_id=a.id) }}">{{ a.name }}</a>
|
<a href="{{ url("sas:album", album_id=a.id) }}">{{ a.name }}</a>
|
||||||
</div>
|
</div>
|
||||||
@ -20,8 +20,7 @@
|
|||||||
</div>
|
</div>
|
||||||
<div>
|
<div>
|
||||||
{# for a in album.children.filter(mime_type__in=['image/jpeg', 'image/png']).all() #}
|
{# for a in album.children.filter(mime_type__in=['image/jpeg', 'image/png']).all() #}
|
||||||
{% for p in album.children.filter(is_folder=False).all() %}
|
{% for p in album.children.filter(is_folder=False, is_moderated=True).all() %}
|
||||||
<p>{{ p.name }}</p>
|
|
||||||
{% if p.as_picture.can_be_viewed_by(user) %}
|
{% if p.as_picture.can_be_viewed_by(user) %}
|
||||||
<div style="display: inline-block; border: solid 1px black;">
|
<div style="display: inline-block; border: solid 1px black;">
|
||||||
<a href="{{ url("sas:picture", picture_id=p.id) }}">
|
<a href="{{ url("sas:picture", picture_id=p.id) }}">
|
||||||
|
@ -6,16 +6,27 @@
|
|||||||
|
|
||||||
{% block content %}
|
{% block content %}
|
||||||
<h3>{% trans %}SAS{% endtrans %}</h3>
|
<h3>{% trans %}SAS{% endtrans %}</h3>
|
||||||
|
{% if user.is_in_group(settings.SITH_SAS_ADMIN_GROUP_ID) %}
|
||||||
<form action="" method="post" enctype="multipart/form-data">
|
<form action="" method="post" enctype="multipart/form-data">
|
||||||
{% csrf_token %}
|
{% csrf_token %}
|
||||||
{{ form.as_p() }}
|
{{ form.non_field_errors() }}
|
||||||
|
<p>{{ form.album_name.errors }}<label for="{{ form.album_name.name }}">{{ form.album_name.label }}</label>
|
||||||
|
{{ form.album_name }}</p>
|
||||||
<p><input type="submit" value="{% trans %}Create{% endtrans %}" /></p>
|
<p><input type="submit" value="{% trans %}Create{% endtrans %}" /></p>
|
||||||
</form>
|
</form>
|
||||||
|
{% endif %}
|
||||||
<div>
|
<div>
|
||||||
{% for a in root_file.children.filter(is_folder=True).all() %}
|
{% for a in root_file.children.filter(is_folder=True).all() %}
|
||||||
<div style="display: inline-block; border: solid 1px black;">
|
{% if a.is_moderated %}
|
||||||
|
<div style="display: inline-block; border: solid 1px black; text-align: center">
|
||||||
<a href="{{ url("sas:album", album_id=a.id) }}">{{ a.name }}</a>
|
<a href="{{ url("sas:album", album_id=a.id) }}">{{ a.name }}</a>
|
||||||
</div>
|
</div>
|
||||||
|
{% elif user.is_in_group(settings.SITH_SAS_ADMIN_GROUP_ID) %}
|
||||||
|
<div style="display: inline-block; border: solid 1px red; text-align: center">
|
||||||
|
<p><a href="{{ url('core:file_moderate', file_id=a.id) }}?next={{ url('sas:moderation') }}">Moderate</a> or <a href="">Delete</a></p>
|
||||||
|
<a href="{{ url("sas:album", album_id=a.id) }}">{{ a.name }}</a>
|
||||||
|
</div>
|
||||||
|
{% endif %}
|
||||||
{% endfor %}
|
{% endfor %}
|
||||||
</div>
|
</div>
|
||||||
{% endblock %}
|
{% endblock %}
|
||||||
|
30
sas/templates/sas/moderation.jinja
Normal file
30
sas/templates/sas/moderation.jinja
Normal file
@ -0,0 +1,30 @@
|
|||||||
|
{% extends "core/base.jinja" %}
|
||||||
|
|
||||||
|
{% block title %}
|
||||||
|
{% trans %}SAS moderation{% endtrans %}
|
||||||
|
{% endblock %}
|
||||||
|
|
||||||
|
{% block content %}
|
||||||
|
<h3>{% trans %}SAS moderation{% endtrans %}</h3>
|
||||||
|
<div>
|
||||||
|
{% for p in pictures %}
|
||||||
|
<div style="margin: 2px; padding: 2px; border: solid 1px red; text-align: center">
|
||||||
|
{% if p.is_folder %}
|
||||||
|
<strong>Album</strong>
|
||||||
|
{% else %}
|
||||||
|
<strong>Picture</strong>
|
||||||
|
{% endif %}
|
||||||
|
<p>
|
||||||
|
<a href="{{ url("sas:picture", picture_id=p.id) }}">
|
||||||
|
<img src="{{ url('sas:download', picture_id=p.id) }}" alt="{{ p.name }}" style="width: 100px">
|
||||||
|
</a><br/>
|
||||||
|
{% trans %}Full name: {% endtrans %}{{ p.get_parent_path()+'/'+p.name }}<br/>
|
||||||
|
{% trans %}Owner: {% endtrans %}{{ p.owner.get_display_name() }}<br/>
|
||||||
|
{% trans %}Date: {% endtrans %}{{ p.date|date(DATE_FORMAT) }} {{ p.date|time(TIME_FORMAT) }}<br/>
|
||||||
|
</p>
|
||||||
|
<p><a href="{{ url('core:file_moderate', file_id=p.id) }}?next={{ url('sas:moderation') }}">{% trans %}Moderate{% endtrans %}</a> -
|
||||||
|
<a href="{{ url('core:file_delete', file_id=p.id) }}?next={{ url('sas:moderation') }}">{% trans %}Delete{% endtrans %}</a></p>
|
||||||
|
</div>
|
||||||
|
{% endfor %}
|
||||||
|
</div>
|
||||||
|
{% endblock %}
|
@ -4,6 +4,7 @@ from sas.views import *
|
|||||||
|
|
||||||
urlpatterns = [
|
urlpatterns = [
|
||||||
url(r'^$', SASMainView.as_view(), name='main'),
|
url(r'^$', SASMainView.as_view(), name='main'),
|
||||||
|
url(r'^moderation$', ModerationView.as_view(), name='moderation'),
|
||||||
url(r'^album/(?P<album_id>[0-9]+)$', AlbumView.as_view(), name='album'),
|
url(r'^album/(?P<album_id>[0-9]+)$', AlbumView.as_view(), name='album'),
|
||||||
url(r'^picture/(?P<picture_id>[0-9]+)$', PictureView.as_view(), name='picture'),
|
url(r'^picture/(?P<picture_id>[0-9]+)$', PictureView.as_view(), name='picture'),
|
||||||
url(r'^picture/(?P<picture_id>[0-9]+)/download$', send_pict, name='download'),
|
url(r'^picture/(?P<picture_id>[0-9]+)/download$', send_pict, name='download'),
|
||||||
|
30
sas/views.py
30
sas/views.py
@ -12,7 +12,7 @@ from ajax_select.fields import AutoCompleteSelectField, AutoCompleteSelectMultip
|
|||||||
from core.views import CanViewMixin, CanEditMixin, CanEditPropMixin, CanCreateMixin, TabedViewMixin
|
from core.views import CanViewMixin, CanEditMixin, CanEditPropMixin, CanCreateMixin, TabedViewMixin
|
||||||
from core.views.forms import SelectUser, LoginForm, SelectDate, SelectDateTime
|
from core.views.forms import SelectUser, LoginForm, SelectDate, SelectDateTime
|
||||||
from core.views.files import send_file
|
from core.views.files import send_file
|
||||||
from core.models import SithFile
|
from core.models import SithFile, User
|
||||||
|
|
||||||
from sas.models import Picture, Album
|
from sas.models import Picture, Album
|
||||||
|
|
||||||
@ -21,10 +21,10 @@ class SASForm(forms.Form):
|
|||||||
images = forms.ImageField(widget=forms.ClearableFileInput(attrs={'multiple': True}), label=_("Upload images"),
|
images = forms.ImageField(widget=forms.ClearableFileInput(attrs={'multiple': True}), label=_("Upload images"),
|
||||||
required=False)
|
required=False)
|
||||||
|
|
||||||
def process(self, parent, owner, files):
|
def process(self, parent, owner, files, automodere=False):
|
||||||
try:
|
try:
|
||||||
if self.cleaned_data['album_name'] != "":
|
if self.cleaned_data['album_name'] != "":
|
||||||
album = Album(parent=parent, name=self.cleaned_data['album_name'], owner=owner)
|
album = Album(parent=parent, name=self.cleaned_data['album_name'], owner=owner, is_moderated=automodere)
|
||||||
album.clean()
|
album.clean()
|
||||||
album.save()
|
album.save()
|
||||||
except Exception as e:
|
except Exception as e:
|
||||||
@ -32,7 +32,7 @@ class SASForm(forms.Form):
|
|||||||
{'album': self.cleaned_data['album_name'], 'msg': str(e.message)})
|
{'album': self.cleaned_data['album_name'], 'msg': str(e.message)})
|
||||||
for f in files:
|
for f in files:
|
||||||
new_file = Picture(parent=parent, name=f.name, file=f, owner=owner, mime_type=f.content_type, size=f._size,
|
new_file = Picture(parent=parent, name=f.name, file=f, owner=owner, mime_type=f.content_type, size=f._size,
|
||||||
is_folder=False)
|
is_folder=False, is_moderated=automodere)
|
||||||
try:
|
try:
|
||||||
new_file.clean()
|
new_file.clean()
|
||||||
# TODO: generate thumbnail
|
# TODO: generate thumbnail
|
||||||
@ -49,10 +49,14 @@ class SASMainView(FormView):
|
|||||||
self.form = self.get_form()
|
self.form = self.get_form()
|
||||||
parent = SithFile.objects.filter(id=settings.SITH_SAS_ROOT_DIR_ID).first()
|
parent = SithFile.objects.filter(id=settings.SITH_SAS_ROOT_DIR_ID).first()
|
||||||
files = request.FILES.getlist('images')
|
files = request.FILES.getlist('images')
|
||||||
if request.user.is_authenticated() and request.user.is_in_group('ae-membres') and self.form.is_valid():
|
root = User.objects.filter(username="root").first()
|
||||||
self.form.process(parent=parent, owner=request.user, files=files)
|
if request.user.is_authenticated() and request.user.is_in_group(settings.SITH_SAS_ADMIN_GROUP_ID):
|
||||||
|
if self.form.is_valid():
|
||||||
|
self.form.process(parent=parent, owner=root, files=files, automodere=True)
|
||||||
if self.form.is_valid():
|
if self.form.is_valid():
|
||||||
return super(SASMainView, self).form_valid(self.form)
|
return super(SASMainView, self).form_valid(self.form)
|
||||||
|
else:
|
||||||
|
self.form.add_error(None, _("You do not have the permission to do that"))
|
||||||
return self.form_invalid(self.form)
|
return self.form_invalid(self.form)
|
||||||
|
|
||||||
def get_context_data(self, **kwargs):
|
def get_context_data(self, **kwargs):
|
||||||
@ -79,7 +83,6 @@ class AlbumView(CanViewMixin, DetailView, FormMixin):
|
|||||||
return super(AlbumView, self).get(request, *args, **kwargs)
|
return super(AlbumView, self).get(request, *args, **kwargs)
|
||||||
|
|
||||||
def post(self, request, *args, **kwargs):
|
def post(self, request, *args, **kwargs):
|
||||||
print('GUY')
|
|
||||||
self.object = self.get_object()
|
self.object = self.get_object()
|
||||||
self.form = self.get_form()
|
self.form = self.get_form()
|
||||||
parent = SithFile.objects.filter(id=self.object.id).first()
|
parent = SithFile.objects.filter(id=self.object.id).first()
|
||||||
@ -90,7 +93,7 @@ class AlbumView(CanViewMixin, DetailView, FormMixin):
|
|||||||
if self.form.is_valid():
|
if self.form.is_valid():
|
||||||
return super(AlbumView, self).form_valid(self.form)
|
return super(AlbumView, self).form_valid(self.form)
|
||||||
else:
|
else:
|
||||||
self.form.add_error(None, _("You have do not have permission to do that"))
|
self.form.add_error(None, _("You do not have the permission to do that"))
|
||||||
return self.form_invalid(self.form)
|
return self.form_invalid(self.form)
|
||||||
|
|
||||||
def get_success_url(self):
|
def get_success_url(self):
|
||||||
@ -101,3 +104,14 @@ class AlbumView(CanViewMixin, DetailView, FormMixin):
|
|||||||
kwargs['form'] = self.form
|
kwargs['form'] = self.form
|
||||||
return kwargs
|
return kwargs
|
||||||
|
|
||||||
|
# Admin views
|
||||||
|
|
||||||
|
class ModerationView(TemplateView):
|
||||||
|
template_name = "sas/moderation.jinja"
|
||||||
|
|
||||||
|
def get_context_data(self, **kwargs):
|
||||||
|
kwargs = super(ModerationView, self).get_context_data(**kwargs)
|
||||||
|
kwargs['pictures'] = [p for p in Picture.objects.filter(is_moderated=False).all() if p.is_in_sas]
|
||||||
|
return kwargs
|
||||||
|
|
||||||
|
|
||||||
|
@ -448,7 +448,7 @@ SITH_LAUNDERETTE_PRICES = {
|
|||||||
|
|
||||||
# SAS variables
|
# SAS variables
|
||||||
SITH_SAS_ROOT_DIR_ID = 4
|
SITH_SAS_ROOT_DIR_ID = 4
|
||||||
SITH_SAS_ADMIN_GROUP_ID = 26
|
SITH_SAS_ADMIN_GROUP_ID = 9
|
||||||
|
|
||||||
try:
|
try:
|
||||||
from .settings_custom import *
|
from .settings_custom import *
|
||||||
|
Loading…
Reference in New Issue
Block a user