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

View File

@ -46,4 +46,4 @@ class UvController(ControllerBase):
)
@paginate(PageNumberPaginationExtra, page_size=100)
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;
overflow-wrap: break-word;
.closed td.title {
color: lighten($black-color, 10%);
font-style: italic;
}
td {
text-align: center;
border: none;

View File

@ -85,7 +85,7 @@
</div>
</div>
</form>
<table id="dynamic_view">
<table id="uv-list">
<thead>
<tr>
<td>{% trans %}UV{% endtrans %}</td>
@ -102,11 +102,17 @@
{% endif %}
</tr>
</thead>
<tbody id="dynamic_view_content" :aria-busy="loading">
<tbody :aria-busy="loading">
<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 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.credit_type"></td>
<td><i :class="uv.semester.includes('AUTUMN') && 'fa fa-leaf'"></i></td>