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 %} +