Improve SAS main view, and make some translations

This commit is contained in:
Skia 2017-01-10 23:32:17 +01:00
parent 3f6199f6c2
commit 881afd9e0a
3 changed files with 91 additions and 75 deletions

View File

@ -6,7 +6,7 @@
msgid "" msgid ""
msgstr "" msgstr ""
"Report-Msgid-Bugs-To: \n" "Report-Msgid-Bugs-To: \n"
"POT-Creation-Date: 2017-01-05 15:45+0100\n" "POT-Creation-Date: 2017-01-10 23:29+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"
@ -325,11 +325,11 @@ msgstr "Compte en banque : "
#: 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
#: election/templates/election/election_detail.jinja:280 #: election/templates/election/election_detail.jinja:280
#: election/templates/election/election_detail.jinja:327 #: election/templates/election/election_detail.jinja:329
#: launderette/templates/launderette/launderette_admin.jinja:16 #: launderette/templates/launderette/launderette_admin.jinja:16
#: launderette/views.py:154 sas/templates/sas/album.jinja:26 #: launderette/views.py:154 sas/templates/sas/album.jinja:26
#: sas/templates/sas/moderation.jinja:18 sas/templates/sas/picture.jinja:66 #: sas/templates/sas/moderation.jinja:18 sas/templates/sas/picture.jinja:66
#: sas/templates/sas/picture.jinja.py:116 #: sas/templates/sas/picture.jinja:116
msgid "Delete" msgid "Delete"
msgstr "Supprimer" msgstr "Supprimer"
@ -355,15 +355,16 @@ msgstr "Nouveau compte club"
#: accounting/templates/accounting/club_account_details.jinja:55 #: accounting/templates/accounting/club_account_details.jinja:55
#: accounting/templates/accounting/journal_details.jinja:82 club/views.py:55 #: accounting/templates/accounting/journal_details.jinja:82 club/views.py:55
#: com/templates/com/news_admin_list.jinja:39 #: com/templates/com/news_admin_list.jinja:39
#: com/templates/com/news_admin_list.jinja:71 core/templates/core/file.jinja:38 #: com/templates/com/news_admin_list.jinja:71
#: core/templates/core/page.jinja:31 core/templates/core/user_tools.jinja:38 #: core/templates/core/file.jinja:38 core/templates/core/page.jinja:31
#: core/views/user.py:152 counter/templates/counter/cash_summary_list.jinja:53 #: core/templates/core/user_tools.jinja:38 core/views/user.py:152
#: counter/templates/counter/cash_summary_list.jinja:53
#: counter/templates/counter/counter_list.jinja:17 #: counter/templates/counter/counter_list.jinja:17
#: counter/templates/counter/counter_list.jinja:32 #: counter/templates/counter/counter_list.jinja:32
#: counter/templates/counter/counter_list.jinja:47 #: counter/templates/counter/counter_list.jinja:47
#: election/templates/election/election_detail.jinja:279 #: election/templates/election/election_detail.jinja:279
#: election/templates/election/election_detail.jinja:324 #: election/templates/election/election_detail.jinja:326
#: election/templates/election/election_detail.jinja:370 #: election/templates/election/election_detail.jinja:374
#: launderette/templates/launderette/launderette_list.jinja:16 #: launderette/templates/launderette/launderette_list.jinja:16
#: sas/templates/sas/album.jinja:18 sas/templates/sas/picture.jinja:92 #: sas/templates/sas/album.jinja:18 sas/templates/sas/picture.jinja:92
msgid "Edit" msgid "Edit"
@ -468,8 +469,8 @@ msgstr "Non"
#: accounting/templates/accounting/club_account_details.jinja:54 #: accounting/templates/accounting/club_account_details.jinja:54
#: com/templates/com/news_admin_list.jinja:38 #: com/templates/com/news_admin_list.jinja:38
#: com/templates/com/news_admin_list.jinja:70 core/templates/core/file.jinja:36 #: com/templates/com/news_admin_list.jinja:70
#: core/templates/core/page.jinja:28 #: core/templates/core/file.jinja:36 core/templates/core/page.jinja:28
msgid "View" msgid "View"
msgstr "Voir" msgstr "Voir"
@ -797,19 +798,19 @@ msgid "A club with that unix_name already exists"
msgstr "Un club avec ce nom UNIX existe déjà." msgstr "Un club avec ce nom UNIX existe déjà."
#: club/models.py:144 counter/models.py:397 counter/models.py:414 #: club/models.py:144 counter/models.py:397 counter/models.py:414
#: eboutic/models.py:14 eboutic/models.py:47 election/models.py:126 #: eboutic/models.py:14 eboutic/models.py:47 election/models.py:130
#: launderette/models.py:87 launderette/models.py:124 sas/models.py:131 #: launderette/models.py:87 launderette/models.py:124 sas/models.py:131
msgid "user" msgid "user"
msgstr "nom d'utilisateur" msgstr "nom d'utilisateur"
#: club/models.py:148 core/models.py:137 election/models.py:125 #: club/models.py:148 core/models.py:137 election/models.py:129
#: election/models.py:141 #: election/models.py:145
msgid "role" msgid "role"
msgstr "rôle" msgstr "rôle"
#: club/models.py:150 core/models.py:33 counter/models.py:71 #: club/models.py:150 core/models.py:33 counter/models.py:71
#: counter/models.py:96 election/models.py:15 election/models.py:82 #: counter/models.py:96 election/models.py:15 election/models.py:82
#: election/models.py:127 #: election/models.py:131
msgid "description" msgid "description"
msgstr "description" msgstr "description"
@ -825,7 +826,8 @@ msgstr "L'utilisateur est déjà membre de ce club"
msgid "past member" msgid "past member"
msgstr "Anciens membres" 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" msgid "Club list"
msgstr "Liste des clubs" msgstr "Liste des clubs"
@ -887,13 +889,14 @@ msgstr "Du"
msgid "To" msgid "To"
msgstr "Au" msgstr "Au"
#: club/templates/club/club_sellings.jinja:5 club/views.py:60 club/views.py:221 #: club/templates/club/club_sellings.jinja:5 club/views.py:60
#: counter/templates/counter/counter_main.jinja:19 #: club/views.py:221 counter/templates/counter/counter_main.jinja:19
#: counter/templates/counter/last_ops.jinja:35 #: counter/templates/counter/last_ops.jinja:35
msgid "Sellings" msgid "Sellings"
msgstr "Ventes" 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 #: counter/templates/counter/cash_summary_list.jinja:15
msgid "Show" msgid "Show"
msgstr "Montrer" msgstr "Montrer"
@ -1012,7 +1015,7 @@ msgstr "Propriétés"
msgid "Select user" msgid "Select user"
msgstr "Choisir un utilisateur" msgstr "Choisir un utilisateur"
#: club/views.py:154 sas/views.py:82 sas/views.py:132 sas/views.py:201 #: club/views.py:154 sas/views.py:82 sas/views.py:133 sas/views.py:202
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"
@ -1020,7 +1023,8 @@ msgstr "Vous n'avez pas la permission de faire cela"
msgid "Begin date" msgid "Begin date"
msgstr "Date de début" msgstr "Date de début"
#: club/views.py:170 com/views.py:81 counter/views.py:933 election/views.py:131 #: club/views.py:170 com/views.py:81 counter/views.py:933
#: election/views.py:131
msgid "End date" msgid "End date"
msgstr "Date de fin" msgstr "Date de fin"
@ -1058,7 +1062,7 @@ msgid "Call"
msgstr "Appel" msgstr "Appel"
#: com/models.py:30 election/models.py:14 election/models.py:81 #: com/models.py:30 election/models.py:14 election/models.py:81
#: election/models.py:114 #: election/models.py:118
msgid "title" msgid "title"
msgstr "titre" msgstr "titre"
@ -1104,8 +1108,9 @@ msgid "News admin"
msgstr "Administration des nouvelles" msgstr "Administration des nouvelles"
#: com/templates/com/news_admin_list.jinja:9 #: 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_detail.jinja:5
#: com/templates/com/news_list.jinja:4 com/templates/com/news_list.jinja:28 #: com/templates/com/news_detail.jinja:11 com/templates/com/news_list.jinja:4
#: com/templates/com/news_list.jinja:28
msgid "News" msgid "News"
msgstr "Nouvelles" msgstr "Nouvelles"
@ -1674,7 +1679,7 @@ msgid "Wiki"
msgstr "Wiki" msgstr "Wiki"
#: core/templates/core/base.jinja:93 sas/templates/sas/album.jinja:4 #: core/templates/core/base.jinja:93 sas/templates/sas/album.jinja:4
#: sas/templates/sas/main.jinja:4 sas/templates/sas/main.jinja.py:8 #: sas/templates/sas/main.jinja:4 sas/templates/sas/main.jinja.py:32
#: sas/templates/sas/picture.jinja:26 #: sas/templates/sas/picture.jinja:26
msgid "SAS" msgid "SAS"
msgstr "SAS" msgstr "SAS"
@ -1891,11 +1896,13 @@ msgstr "login"
msgid "Lost password?" msgid "Lost password?"
msgstr "Mot de passe perdu ?" msgstr "Mot de passe perdu ?"
#: core/templates/core/macros.jinja:27 core/templates/core/user_detail.jinja:27 #: core/templates/core/macros.jinja:27
#: core/templates/core/user_detail.jinja:27
msgid "Born: " msgid "Born: "
msgstr "Né le : " msgstr "Né le : "
#: core/templates/core/macros.jinja:31 core/templates/core/user_detail.jinja:48 #: core/templates/core/macros.jinja:31
#: core/templates/core/user_detail.jinja:48
msgid "Promo: " msgid "Promo: "
msgstr "Promo : " msgstr "Promo : "
@ -2512,15 +2519,6 @@ msgstr "type du produit"
msgid "purchase price" msgid "purchase price"
msgstr "prix d'achat" msgstr "prix d'achat"
msgid "Purchase price"
msgstr "Prix d'achat"
msgid "Selling price"
msgstr "Prix de vente"
msgid "Benefit"
msgstr "Bénéfice"
#: counter/models.py:101 #: counter/models.py:101
msgid "selling price" msgid "selling price"
msgstr "prix de vente" msgstr "prix de vente"
@ -2927,21 +2925,17 @@ msgid "Percentage"
msgstr "Pourcentage" msgstr "Pourcentage"
#: counter/templates/counter/stats.jinja:47 #: counter/templates/counter/stats.jinja:47
#, fuzzy, python-format
#| msgid "Top 100 %(counter_name)s"
msgid "Top 100 barman %(counter_name)s" msgid "Top 100 barman %(counter_name)s"
msgstr "Top 100 %(counter_name)s" msgstr "Top 100 barman %(counter_name)s"
#: counter/templates/counter/stats.jinja:53 #: counter/templates/counter/stats.jinja:53
#: counter/templates/counter/stats.jinja:78 #: counter/templates/counter/stats.jinja:78
msgid "Time" msgid "Time"
msgstr "" msgstr "Temps"
#: counter/templates/counter/stats.jinja:72 #: counter/templates/counter/stats.jinja:72
#, fuzzy, python-format
#| msgid "Top 100 %(counter_name)s"
msgid "Top 100 barman %(counter_name)s (all semesters)" msgid "Top 100 barman %(counter_name)s (all semesters)"
msgstr "Top 100 %(counter_name)s" msgstr "Top 100 barman %(counter_name)s (tous les semestres)"
#: counter/views.py:55 #: counter/views.py:55
msgid "User not found" msgid "User not found"
@ -3144,7 +3138,7 @@ msgstr "groupe de vote"
msgid "candidature groups" msgid "candidature groups"
msgstr "groupe de candidature" msgstr "groupe de candidature"
#: election/models.py:80 election/models.py:115 #: election/models.py:80 election/models.py:119
msgid "election" msgid "election"
msgstr "élection" msgstr "élection"
@ -3152,17 +3146,17 @@ msgstr "élection"
msgid "max choice" msgid "max choice"
msgstr "nombre de choix maxi" msgstr "nombre de choix maxi"
#: election/models.py:128 #: election/models.py:132
msgid "election list" msgid "election list"
msgstr "liste électorale" msgstr "liste électorale"
#: election/models.py:142 #: election/models.py:146
msgid "candidature" msgid "candidature"
msgstr "candidature" msgstr "candidature"
#: election/templates/election/candidate_form.jinja:4 #: election/templates/election/candidate_form.jinja:4
#: election/templates/election/candidate_form.jinja:13 #: election/templates/election/candidate_form.jinja:13
#: election/templates/election/election_detail.jinja:363 #: election/templates/election/election_detail.jinja:365
msgid "Candidate" msgid "Candidate"
msgstr "Candidater" msgstr "Candidater"
@ -3220,24 +3214,24 @@ msgid "Choose blank vote"
msgstr "Choisir de voter blanc" msgstr "Choisir de voter blanc"
#: election/templates/election/election_detail.jinja:304 #: election/templates/election/election_detail.jinja:304
#: election/templates/election/election_detail.jinja:342 #: election/templates/election/election_detail.jinja:344
msgid "votes" msgid "votes"
msgstr "votes" msgstr "votes"
#: election/templates/election/election_detail.jinja:335 #: election/templates/election/election_detail.jinja:337
#: launderette/templates/launderette/launderette_book.jinja:12 #: launderette/templates/launderette/launderette_book.jinja:12
msgid "Choose" msgid "Choose"
msgstr "Choisir" msgstr "Choisir"
#: election/templates/election/election_detail.jinja:358 #: election/templates/election/election_detail.jinja:360
msgid "Submit the vote !" msgid "Submit the vote !"
msgstr "Envoyer le vote !" msgstr "Envoyer le vote !"
#: election/templates/election/election_detail.jinja:365 #: election/templates/election/election_detail.jinja:368
msgid "Add a new list" msgid "Add a new list"
msgstr "Ajouter une nouvelle liste" msgstr "Ajouter une nouvelle liste"
#: election/templates/election/election_detail.jinja:368 #: election/templates/election/election_detail.jinja:372
msgid "Add a new role" msgid "Add a new role"
msgstr "Ajouter un nouveau rôle" msgstr "Ajouter un nouveau rôle"
@ -3415,8 +3409,8 @@ msgid "picture"
msgstr "photo" msgstr "photo"
#: sas/templates/sas/album.jinja:52 sas/templates/sas/album.jinja.py:54 #: sas/templates/sas/album.jinja:52 sas/templates/sas/album.jinja.py:54
#: sas/templates/sas/main.jinja:17 sas/templates/sas/main.jinja.py:19 #: sas/templates/sas/main.jinja:13 sas/templates/sas/main.jinja.py:15
#: sas/templates/sas/main.jinja:21 #: sas/templates/sas/main.jinja:17
msgid "preview" msgid "preview"
msgstr "miniature" msgstr "miniature"
@ -3424,7 +3418,15 @@ msgstr "miniature"
msgid "Upload" msgid "Upload"
msgstr "Envoyer" msgstr "Envoyer"
#: sas/templates/sas/main.jinja:34
msgid "Latest albums"
msgstr "Derniers albums"
#: sas/templates/sas/main.jinja:41 #: sas/templates/sas/main.jinja:41
msgid "All categories"
msgstr "Toutes les catégories"
#: sas/templates/sas/main.jinja:53
msgid "Create" msgid "Create"
msgstr "Créer" msgstr "Créer"
@ -3477,7 +3479,7 @@ msgstr "Erreur de création de l'album %(album)s : %(msg)s"
msgid "Add user" msgid "Add user"
msgstr "Ajouter une personne" msgstr "Ajouter une personne"
#: sas/views.py:256 #: sas/views.py:257
msgid "Apply rights recursively" msgid "Apply rights recursively"
msgstr "Appliquer les droits récursivement" msgstr "Appliquer les droits récursivement"
@ -3715,3 +3717,4 @@ 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, soit en créer un proprement" "Vous devez soit choisir un utilisateur existant, soit en créer un proprement"

View File

@ -4,14 +4,10 @@
{% trans %}SAS{% endtrans %} {% trans %}SAS{% endtrans %}
{% endblock %} {% endblock %}
{% block content %} {% macro display_album(a) %}
<h3>{% trans %}SAS{% endtrans %}</h3> {% if a.is_moderated %}
<hr> <a href="{{ url("sas:album", album_id=a.id) }}">
<div> <div class="album">
{% for a in root_file.children.filter(is_folder=True).order_by('date') %}
{% if a.is_moderated %}
<a href="{{ url("sas:album", album_id=a.id) }}">
<div class="album">
<div> <div>
{% if a.file %} {% if a.file %}
<img src="{{ a.as_picture.get_download_url() }}" alt="{% trans %}preview{% endtrans %}"> <img src="{{ a.as_picture.get_download_url() }}" alt="{% trans %}preview{% endtrans %}">
@ -22,14 +18,30 @@
{% endif %} {% endif %}
</div> </div>
{{ a.name }} {{ a.name }}
</div> </div>
</a> </a>
{% elif user.is_in_group(settings.SITH_GROUP_SAS_ADMIN_ID) %} {% elif user.is_in_group(settings.SITH_GROUP_SAS_ADMIN_ID) %}
<div style="display: inline-block; border: solid 1px red; text-align: center"> <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> <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> <a href="{{ url("sas:album", album_id=a.id) }}">{{ a.name }}</a>
</div> </div>
{% endif %} {% endif %}
{% endmacro %}
{% block content %}
<h3>{% trans %}SAS{% endtrans %}</h3>
<hr>
<h4>{% trans %}Latest albums{% endtrans %}</h4>
<div>
{% for a in latest %}
{{ display_album(a) }}
{% endfor %}
</div>
<hr>
<h4>{% trans %}All categories{% endtrans %}</h4>
<div>
{% for a in root_file.children.filter(is_folder=True).order_by('date') %}
{{ display_album(a) }}
{% endfor %} {% endfor %}
</div> </div>
{% if user.is_in_group(settings.SITH_GROUP_SAS_ADMIN_ID) %} {% if user.is_in_group(settings.SITH_GROUP_SAS_ADMIN_ID) %}

View File

@ -85,6 +85,7 @@ class SASMainView(FormView):
def get_context_data(self, **kwargs): def get_context_data(self, **kwargs):
kwargs = super(SASMainView, self).get_context_data(**kwargs) kwargs = super(SASMainView, self).get_context_data(**kwargs)
kwargs['root_file'] = SithFile.objects.filter(id=settings.SITH_SAS_ROOT_DIR_ID).first() kwargs['root_file'] = SithFile.objects.filter(id=settings.SITH_SAS_ROOT_DIR_ID).first()
kwargs['latest'] = SithFile.objects.filter(is_in_sas=True, is_folder=True, is_moderated=True).order_by('-id')[:5]
return kwargs return kwargs
class PictureView(CanViewMixin, DetailView, FormMixin): class PictureView(CanViewMixin, DetailView, FormMixin):