Visually differentiate closed UVs from the others

This commit is contained in:
imperosol
2025-01-21 16:01:50 +01:00
parent 78f3caa455
commit 5fa431e29b
4 changed files with 27 additions and 15 deletions

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>