1
0
mirror of https://gitlab.crans.org/bde/nk20 synced 2025-06-22 18:38:23 +02:00
This commit is contained in:
quark
2025-02-24 16:10:58 +01:00
parent 5f1b698d58
commit 587314e03c
14 changed files with 344 additions and 299 deletions

View File

@ -8,23 +8,24 @@ SPDX-License-Identifier: GPL-3.0-or-later
<div class="wrap-container">
<h2>{% trans "NoteKfet Wrapped" %}</h2>
<h1 id="name">{{ wrapped.note.club.name }}</h1>
{% trans "Your best consumer:" %}
{% trans "Your best consumer" %}
<div class="category" id="consumer"></div>
{% trans "Your worst creditor:" %}
{% trans "Your worst creditor" %}
<div class="category" id="creditor"></div>
<ul class="list">
<li>{{ nb_soiree_orga }}{% trans " party organised" %}</li>
<li>{{ nb_member }}{% trans " distinct members" %}</li>
<li>{{ nb_soiree_orga }} {% trans "party organised" %}</li>
<li>{{ nb_member }} {% trans "distinct members" %}</li>
</ul>
</div>
<script>
let con = {{ big_consumer | safe }};
let cre = {{ big_creancier | safe }};
let con = Boolean({{ big_consumer | safe }});
let cre = Boolean({{ big_creancier | safe }});
let d1 = document.getElementById("consumer");
let d2 = document.getElementById("creditor");
if (con) { d1.textContent = con[0] + " with " + con[1] + "€";}
else { d1.textContent = "Infortunately, you doesn't have consumer this year...";};
if (cre) { d2.textContent = cre[0] + " with " + cre[1] + "€";}
else { d2.textContent = "Congratulations you are a real rat !" };
if (con) { d1.textContent = {{ big_consumer | safe }}[0] + " with " + {{ big_consumer | safe}}[1] + "€";}
else { d1.textContent = gettext("Infortunately, you doesn't have consumer this year");};
if (cre) { d2.textContent = {{ big_creancier | safe}}[0] + " with " + {{ big_creancier | safe}}[1] + "€";}
else { d2.textContent = gettext("Congratulations you are a real rat !"); };
</script>
{% endblock %}