Visually differentiate closed UVs from the others

This commit is contained in:
imperosol 2025-01-21 16:01:50 +01:00
parent 997641d514
commit 34b675e9a3
4 changed files with 28 additions and 16 deletions

View File

@ -6,7 +6,7 @@
msgid "" msgid ""
msgstr "" msgstr ""
"Report-Msgid-Bugs-To: \n" "Report-Msgid-Bugs-To: \n"
"POT-Creation-Date: 2025-01-19 18:12+0100\n" "POT-Creation-Date: 2025-01-21 15:48+0100\n"
"PO-Revision-Date: 2016-07-18\n" "PO-Revision-Date: 2016-07-18\n"
"Last-Translator: Maréchal <thomas.girod@utbm.fr\n" "Last-Translator: Maréchal <thomas.girod@utbm.fr\n"
"Language-Team: AE info <ae.info@utbm.fr>\n" "Language-Team: AE info <ae.info@utbm.fr>\n"
@ -935,10 +935,6 @@ msgstr "rôle"
msgid "description" msgid "description"
msgstr "description" msgstr "description"
#: club/models.py
msgid "past member"
msgstr "ancien membre"
#: club/models.py #: club/models.py
msgid "Email address" msgid "Email address"
msgstr "Adresse email" msgstr "Adresse email"
@ -3299,8 +3295,8 @@ msgstr "Nom d'utilisateur, email, ou numéro de compte AE"
#: core/views/forms.py #: core/views/forms.py
msgid "" msgid ""
"Profile: you need to be visible on the picture, in order to be recognized " "Profile: you need to be visible on the picture, in order to be recognized (e."
"(e.g. by the barmen)" "g. by the barmen)"
msgstr "" msgstr ""
"Photo de profil: vous devez être visible sur la photo afin d'être reconnu " "Photo de profil: vous devez être visible sur la photo afin d'être reconnu "
"(par exemple par les barmen)" "(par exemple par les barmen)"
@ -3906,8 +3902,8 @@ msgstr ""
#: counter/templates/counter/mails/account_dump.jinja #: counter/templates/counter/mails/account_dump.jinja
msgid "If you think this was a mistake, please mail us at ae@utbm.fr." msgid "If you think this was a mistake, please mail us at ae@utbm.fr."
msgstr "" msgstr ""
"Si vous pensez qu'il s'agit d'une erreur, veuillez envoyer un mail à " "Si vous pensez qu'il s'agit d'une erreur, veuillez envoyer un mail à ae@utbm."
"ae@utbm.fr." "fr."
#: counter/templates/counter/mails/account_dump.jinja #: counter/templates/counter/mails/account_dump.jinja
msgid "" msgid ""
@ -4935,6 +4931,10 @@ msgstr "Département"
msgid "Credit type" msgid "Credit type"
msgstr "Type de crédit" msgstr "Type de crédit"
#: pedagogy/templates/pedagogy/guide.jinja
msgid "closed uv"
msgstr "uv fermée"
#: pedagogy/templates/pedagogy/macros.jinja #: pedagogy/templates/pedagogy/macros.jinja
msgid " not rated " msgid " not rated "
msgstr "non noté" msgstr "non noté"
@ -5973,3 +5973,6 @@ msgstr "Vous ne pouvez plus écrire de commentaires, la date est passée."
#, python-format #, python-format
msgid "Maximum characters: %(max_length)s" msgid "Maximum characters: %(max_length)s"
msgstr "Nombre de caractères max: %(max_length)s" msgstr "Nombre de caractères max: %(max_length)s"
#~ msgid "past member"
#~ msgstr "ancien membre"

View File

@ -46,4 +46,4 @@ class UvController(ControllerBase):
) )
@paginate(PageNumberPaginationExtra, page_size=100) @paginate(PageNumberPaginationExtra, page_size=100)
def fetch_uv_list(self, search: Query[UvFilterSchema]): def fetch_uv_list(self, search: Query[UvFilterSchema]):
return search.filter(UV.objects.values()) return search.filter(UV.objects.order_by("code").values())

View File

@ -47,11 +47,14 @@ $large-devices: 992px;
} }
} }
#dynamic_view { #uv-list {
font-size: 1.1em; font-size: 1.1em;
overflow-wrap: break-word; overflow-wrap: break-word;
.closed td.title {
color: lighten($black-color, 10%);
font-style: italic;
}
td { td {
text-align: center; text-align: center;
border: none; border: none;

View File

@ -85,7 +85,7 @@
</div> </div>
</div> </div>
</form> </form>
<table id="dynamic_view"> <table id="uv-list">
<thead> <thead>
<tr> <tr>
<td>{% trans %}UV{% endtrans %}</td> <td>{% trans %}UV{% endtrans %}</td>
@ -102,11 +102,17 @@
{% endif %} {% endif %}
</tr> </tr>
</thead> </thead>
<tbody id="dynamic_view_content" :aria-busy="loading"> <tbody :aria-busy="loading">
<template x-for="uv in uvs.results" :key="uv.id"> <template x-for="uv in uvs.results" :key="uv.id">
<tr @click="window.location.href = `/pedagogy/uv/${uv.id}`" class="clickable"> <tr
@click="window.location.href = `/pedagogy/uv/${uv.id}`"
class="clickable"
:class="{closed: uv.semester === 'CLOSED'}"
>
<td><a :href="`/pedagogy/uv/${uv.id}`" x-text="uv.code"></a></td> <td><a :href="`/pedagogy/uv/${uv.id}`" x-text="uv.code"></a></td>
<td x-text="uv.title"></td> <td class="title"
x-text="uv.title + (uv.semester === 'CLOSED' ? ' ({% trans %}closed uv{% endtrans %})' : '')"
></td>
<td x-text="uv.department"></td> <td x-text="uv.department"></td>
<td x-text="uv.credit_type"></td> <td x-text="uv.credit_type"></td>
<td><i :class="uv.semester.includes('AUTUMN') && 'fa fa-leaf'"></i></td> <td><i :class="uv.semester.includes('AUTUMN') && 'fa fa-leaf'"></i></td>