From f777252a96c2ab0b5eb6a58ec5ac89ad61dd2204 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jon=C3=A1=C5=A1=20Havelka?= Date: Mon, 15 Nov 2021 21:53:36 +0100 Subject: [PATCH] =?UTF-8?q?Add=20neve=C5=99ejn=C3=A1=20=C4=8D=C3=ADsla=20p?= =?UTF-8?q?ro=20orgy=20v=20archivu=20u=20ro=C4=8Dn=C3=ADku=20(RocnikView)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- seminar/models.py | 5 ++ seminar/templates/seminar/archiv/rocnik.html | 48 ++++++++++++++++++++ 2 files changed, 53 insertions(+) diff --git a/seminar/models.py b/seminar/models.py index daef62e6..b04b31fa 100644 --- a/seminar/models.py +++ b/seminar/models.py @@ -466,6 +466,11 @@ class Rocnik(SeminarModelBase): vc.sort(key=lambda c: c.poradi) return vc + def neverejna_cisla(self): + vc = [c for c in self.cisla.all() if not c.verejne()] + vc.sort(key=lambda c: c.poradi) + return vc + def posledni_verejne_cislo(self): vc = self.verejna_cisla() return vc[-1] if vc else None diff --git a/seminar/templates/seminar/archiv/rocnik.html b/seminar/templates/seminar/archiv/rocnik.html index 93690153..01a9f5ac 100644 --- a/seminar/templates/seminar/archiv/rocnik.html +++ b/seminar/templates/seminar/archiv/rocnik.html @@ -63,6 +63,54 @@ {% endfor %} +{% if user.je_org and rocnik.neverejna_cisla %} +
+
+ {% for c in rocnik.neverejna_cisla %} +
+ +
Číslo {{ c.kod }}
+ +
+ +
+
+ +
+ {% if c.titulka_nahled %} + {{ c.kod }} + {% else %} + {% load static %} no-picture + {% endif %} +
+ +
+
+ +
+ +
+ + +
+
+
+
+ + {% endfor %} +
+
+{% endif %} + {% if vysledkovka %}

Výsledková listina