mirror of
https://gitlab.crans.org/bde/nk20
synced 2025-06-22 18:38:23 +02:00
Finish script, finish view, make some progress on template
This commit is contained in:
30
apps/wrapped/templates/wrapped/1/wrapped_view_club.html
Normal file
30
apps/wrapped/templates/wrapped/1/wrapped_view_club.html
Normal file
@ -0,0 +1,30 @@
|
||||
{% extends "wrapped/1/wrapped_base.html" %}
|
||||
{% comment %}
|
||||
COPYRIGHT (C) 2018-2024 BDE ENS Paris-Saclay
|
||||
SPDX-License-Identifier: GPL-3.0-or-later
|
||||
{% endcomment %}
|
||||
{% load i18n pretty_money %}
|
||||
{% block content %}
|
||||
<div class="wrap-container">
|
||||
<h2>{% trans "NoteKfet Wrapped" %}</h2>
|
||||
<h1 id="name">{{ wrapped.note.club.name }}</h1>
|
||||
{% trans "Your best consumer:" %}
|
||||
<div class="category" id="consumer"></div>
|
||||
{% 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>
|
||||
</ul>
|
||||
</div>
|
||||
<script>
|
||||
let con = {{ big_consumer | safe }};
|
||||
let cre = {{ 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 !" };
|
||||
</script>
|
||||
{% endblock %}
|
Reference in New Issue
Block a user