zkrášlování tabulky odevzdaných řešení
This commit is contained in:
parent
7237300562
commit
826c0a67fa
3 changed files with 18 additions and 9 deletions
|
@ -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;
|
||||
}
|
|
@ -3,6 +3,13 @@
|
|||
{% load deadliny %}
|
||||
|
||||
{% block content %}
|
||||
<h3>Označení deadlinů</h3>
|
||||
<ul>
|
||||
<li>Ⓢ deadline pro účast na soustředění</li>
|
||||
<li>♲ 1. deadline</li>
|
||||
<li>✓ 2. deadline</li>
|
||||
</ul>
|
||||
|
||||
{% for rocnik, hodnoceni in podle_rocniku %}
|
||||
<h1>Ročník {{ rocnik }}</h1>
|
||||
<table class="dosla_reseni">
|
||||
|
@ -14,8 +21,8 @@
|
|||
</tr>
|
||||
{% for hodn in hodnoceni %}
|
||||
<tr>
|
||||
<td>{{ hodn.reseni.cas_doruceni }}</td>
|
||||
<td>{{ hodn.problem }}</td>
|
||||
<td>{{ hodn.reseni.cas_doruceni | date:"d.m.Y H:i"}}</td>
|
||||
<td id="problem">{{ hodn.problem }}</td>
|
||||
<td>{{ hodn.body|default_if_none:"---" }}</td>
|
||||
<td>{{ hodn.reseni.cas_doruceni | deadline_html }}</td>
|
||||
</tr>
|
||||
|
|
|
@ -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]
|
||||
|
||||
|
|
Loading…
Reference in a new issue