větší tabulka odevzdaných řešení větším displeji
This commit is contained in:
parent
9a8bb26997
commit
a8af72df1d
3 changed files with 38 additions and 7 deletions
|
@ -490,6 +490,10 @@ div.odpocet {
|
|||
text-align: center;
|
||||
}
|
||||
|
||||
.odevzdanareseni_mid, .odevzdanareseni_small, .odevzdanareseni_mini {
|
||||
display: none;
|
||||
}
|
||||
|
||||
/**********************
|
||||
* Zmenšování displeje
|
||||
***********************/
|
||||
|
@ -536,6 +540,14 @@ div.odpocet {
|
|||
margin-top: 8px; /* mezera mezi hlavním menu a submenu */
|
||||
}
|
||||
|
||||
.odevzdanareseni_big {
|
||||
display: none;
|
||||
}
|
||||
|
||||
.odevzdanareseni_mid {
|
||||
display: table-cell;
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
/* stránka přes celý menší displej, větší mobil, tablet */
|
||||
|
@ -604,6 +616,14 @@ div.odpocet {
|
|||
.zjistit_vic hr {
|
||||
display: flex;
|
||||
}
|
||||
|
||||
.odevzdanareseni_mid {
|
||||
display: none;
|
||||
}
|
||||
|
||||
.odevzdanareseni_small {
|
||||
display: table-cell;
|
||||
}
|
||||
}
|
||||
|
||||
/* malý tablet, mobil */
|
||||
|
@ -778,6 +798,14 @@ div.odpocet {
|
|||
padding: 10px;
|
||||
}
|
||||
|
||||
.odevzdanareseni_small {
|
||||
display: none;
|
||||
}
|
||||
|
||||
.odevzdanareseni_mini {
|
||||
display: table-cell;
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
/*stránka organizátorů*/
|
||||
|
|
|
@ -24,7 +24,10 @@
|
|||
{% for hodn in hodnoceni %}
|
||||
<tr>
|
||||
<td><a href="{% url 'odevzdavatko_resitel_reseni' hodn.reseni.id %}">{{ hodn.reseni.cas_doruceni | date:"d.m.Y H:i"}}</a></td>
|
||||
<td id="problem"><span title="{{ hodn.problem.nazev }}">{{ hodn.problem.nazev | zkrat_nazev_problemu }}</span></td>
|
||||
<td id="problem" class="odevzdanareseni_big"><span title="{{ hodn.problem.nazev }}">{{ hodn.problem.nazev | zkrat_nazev_problemu:76 }}</span></td>
|
||||
<td id="problem" class="odevzdanareseni_mid"><span title="{{ hodn.problem.nazev }}">{{ hodn.problem.nazev | zkrat_nazev_problemu:50 }}</span></td>
|
||||
<td id="problem" class="odevzdanareseni_small"><span title="{{ hodn.problem.nazev }}">{{ hodn.problem.nazev | zkrat_nazev_problemu:27 }}</span></td>
|
||||
<td id="problem" class="odevzdanareseni_mini"><span title="{{ hodn.problem.nazev }}">{{ hodn.problem.nazev | zkrat_nazev_problemu:10 }}</span></td>
|
||||
<td>{{ hodn.body|default_if_none:"---" }}</td>
|
||||
<td>{{ hodn.reseni.cas_doruceni | deadline_html }}</td>
|
||||
</tr>
|
||||
|
|
|
@ -41,10 +41,10 @@ def deadline_html(datum):
|
|||
return mark_safe(f'<span class="{classes[typ]}">{text}</span>')
|
||||
|
||||
@register.filter(name='zkrat_nazev_problemu')
|
||||
def zkrat_nazev_problemu(nazev):
|
||||
if len(nazev) > 10:
|
||||
if nazev[9] == " ":
|
||||
nazev = nazev[:9] + "..."
|
||||
def zkrat_nazev_problemu(nazev,width):
|
||||
if len(nazev) > width:
|
||||
if nazev[width-1] == " ":
|
||||
nazev = nazev[:width-1] + "..."
|
||||
else:
|
||||
nazev = nazev[:10] + "..."
|
||||
return nazev
|
||||
nazev = nazev[:width] + "..."
|
||||
return nazev
|
Loading…
Reference in a new issue