From 826c0a67faeeed33d5a2442531f711e2b8dfbd0f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Kate=C5=99ina=20=C4=8C?= Date: Tue, 18 May 2021 23:58:04 +0200 Subject: [PATCH] =?UTF-8?q?zkr=C3=A1=C5=A1lov=C3=A1n=C3=AD=20tabulky=20ode?= =?UTF-8?q?vzdan=C3=BDch=20=C5=99e=C5=A1en=C3=AD?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- mamweb/static/css/mamweb.css | 8 +++++--- .../seminar/odevzdavatko/resitel_prehled.html | 11 +++++++++-- seminar/templatetags/deadliny.py | 8 ++++---- 3 files changed, 18 insertions(+), 9 deletions(-) diff --git a/mamweb/static/css/mamweb.css b/mamweb/static/css/mamweb.css index 62d4bd44..b42aa615 100644 --- a/mamweb/static/css/mamweb.css +++ b/mamweb/static/css/mamweb.css @@ -1149,11 +1149,13 @@ div.gdpr { } /* tabulka odevzdaných řešení */ -.dosla_reseni tr th { - text-align: center; -} .dosla_reseni tr th, .dosla_reseni tr td { border: 1px solid black; padding: 1px 10px 1px 10px; border-collapse: collapse; + text-align: center; +} + +.dosla_reseni tr td#problem { + text-align: left; } \ No newline at end of file diff --git a/seminar/templates/seminar/odevzdavatko/resitel_prehled.html b/seminar/templates/seminar/odevzdavatko/resitel_prehled.html index 03614b77..6a24123f 100644 --- a/seminar/templates/seminar/odevzdavatko/resitel_prehled.html +++ b/seminar/templates/seminar/odevzdavatko/resitel_prehled.html @@ -3,6 +3,13 @@ {% load deadliny %} {% block content %} +

Označení deadlinů

+ + {% for rocnik, hodnoceni in podle_rocniku %}

Ročník {{ rocnik }}

@@ -14,8 +21,8 @@ {% for hodn in hodnoceni %} - - + + diff --git a/seminar/templatetags/deadliny.py b/seminar/templatetags/deadliny.py index c58d4cba..7251f92c 100644 --- a/seminar/templatetags/deadliny.py +++ b/seminar/templatetags/deadliny.py @@ -18,12 +18,12 @@ def deadline_text(datum): @register.filter(name='deadline_kratseji') def deadline_kratsi_text(datum): if deadline(datum) is None: - return 'Neznámý deadline' + return 'NONE' typ, cislo, dl = deadline(datum) strings = { - TypDeadline.PredDeadline: f"1. deadline {cislo}", - TypDeadline.SousDeadline: f"Soustřeďkový deadline {cislo}", - TypDeadline.FinalDeadline: f"Finální deadline {cislo}", + TypDeadline.PredDeadline: f"{cislo} ♲", + TypDeadline.SousDeadline: f"{cislo} Ⓢ", + TypDeadline.FinalDeadline: f"{cislo} ✓", } return strings[typ]
{{ hodn.reseni.cas_doruceni }}{{ hodn.problem }}{{ hodn.reseni.cas_doruceni | date:"d.m.Y H:i"}}{{ hodn.problem }} {{ hodn.body|default_if_none:"---" }} {{ hodn.reseni.cas_doruceni | deadline_html }}