Styl přehledu řešení
This commit is contained in:
parent
757d3189e7
commit
adef6c6627
2 changed files with 25 additions and 2 deletions
|
@ -2,10 +2,23 @@
|
|||
{% load static %}
|
||||
{% load deadliny %}
|
||||
|
||||
{% block custom_css %}
|
||||
<style type=text/css>
|
||||
.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;
|
||||
}
|
||||
</style>
|
||||
{% endblock custom_css %}
|
||||
|
||||
{% block content %}
|
||||
{% for rocnik, hodnoceni in podle_rocniku %}
|
||||
<h1>Ročník {{ rocnik }}</h1>
|
||||
<table>
|
||||
<table class="dosla_reseni">
|
||||
<tr>
|
||||
<th>Doručeno</th>
|
||||
<th>Problém</th>
|
||||
|
|
|
@ -13,10 +13,20 @@ def deadline_text(datum):
|
|||
}
|
||||
return strings[typ]
|
||||
|
||||
@register.filter(name='deadline_kratseji')
|
||||
def deadline_kratsi_text(datum):
|
||||
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}",
|
||||
}
|
||||
return strings[typ]
|
||||
|
||||
@register.filter(name='deadline_html')
|
||||
def deadline_html(datum):
|
||||
typ, _, _ = deadline(datum)
|
||||
text = deadline_text(datum)
|
||||
text = deadline_kratsi_text(datum)
|
||||
classes = {
|
||||
TypDeadline.PredDeadline: 'preddeadline',
|
||||
TypDeadline.SousDeadline: 'sous_deadline',
|
||||
|
|
Loading…
Reference in a new issue