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í */
|
/* tabulka odevzdaných řešení */
|
||||||
.dosla_reseni tr th {
|
|
||||||
text-align: center;
|
|
||||||
}
|
|
||||||
.dosla_reseni tr th, .dosla_reseni tr td {
|
.dosla_reseni tr th, .dosla_reseni tr td {
|
||||||
border: 1px solid black;
|
border: 1px solid black;
|
||||||
padding: 1px 10px 1px 10px;
|
padding: 1px 10px 1px 10px;
|
||||||
border-collapse: collapse;
|
border-collapse: collapse;
|
||||||
|
text-align: center;
|
||||||
|
}
|
||||||
|
|
||||||
|
.dosla_reseni tr td#problem {
|
||||||
|
text-align: left;
|
||||||
}
|
}
|
|
@ -3,6 +3,13 @@
|
||||||
{% load deadliny %}
|
{% load deadliny %}
|
||||||
|
|
||||||
{% block content %}
|
{% 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 %}
|
{% for rocnik, hodnoceni in podle_rocniku %}
|
||||||
<h1>Ročník {{ rocnik }}</h1>
|
<h1>Ročník {{ rocnik }}</h1>
|
||||||
<table class="dosla_reseni">
|
<table class="dosla_reseni">
|
||||||
|
@ -14,8 +21,8 @@
|
||||||
</tr>
|
</tr>
|
||||||
{% for hodn in hodnoceni %}
|
{% for hodn in hodnoceni %}
|
||||||
<tr>
|
<tr>
|
||||||
<td>{{ hodn.reseni.cas_doruceni }}</td>
|
<td>{{ hodn.reseni.cas_doruceni | date:"d.m.Y H:i"}}</td>
|
||||||
<td>{{ hodn.problem }}</td>
|
<td id="problem">{{ hodn.problem }}</td>
|
||||||
<td>{{ hodn.body|default_if_none:"---" }}</td>
|
<td>{{ hodn.body|default_if_none:"---" }}</td>
|
||||||
<td>{{ hodn.reseni.cas_doruceni | deadline_html }}</td>
|
<td>{{ hodn.reseni.cas_doruceni | deadline_html }}</td>
|
||||||
</tr>
|
</tr>
|
||||||
|
|
|
@ -18,12 +18,12 @@ def deadline_text(datum):
|
||||||
@register.filter(name='deadline_kratseji')
|
@register.filter(name='deadline_kratseji')
|
||||||
def deadline_kratsi_text(datum):
|
def deadline_kratsi_text(datum):
|
||||||
if deadline(datum) is None:
|
if deadline(datum) is None:
|
||||||
return 'Neznámý deadline'
|
return 'NONE'
|
||||||
typ, cislo, dl = deadline(datum)
|
typ, cislo, dl = deadline(datum)
|
||||||
strings = {
|
strings = {
|
||||||
TypDeadline.PredDeadline: f"1. deadline {cislo}",
|
TypDeadline.PredDeadline: f"{cislo} ♲",
|
||||||
TypDeadline.SousDeadline: f"Soustřeďkový deadline {cislo}",
|
TypDeadline.SousDeadline: f"{cislo} Ⓢ",
|
||||||
TypDeadline.FinalDeadline: f"Finální deadline {cislo}",
|
TypDeadline.FinalDeadline: f"{cislo} ✓",
|
||||||
}
|
}
|
||||||
return strings[typ]
|
return strings[typ]
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue