diff --git a/seminar/templates/seminar/odevzdavatko/resitel_prehled.html b/seminar/templates/seminar/odevzdavatko/resitel_prehled.html
index 6a24123f..4f23a0a2 100644
--- a/seminar/templates/seminar/odevzdavatko/resitel_prehled.html
+++ b/seminar/templates/seminar/odevzdavatko/resitel_prehled.html
@@ -10,6 +10,8 @@
✓ 2. deadline
+
+
{% for rocnik, hodnoceni in podle_rocniku %}
Ročník {{ rocnik }}
@@ -22,11 +24,14 @@
{% for hodn in hodnoceni %}
{{ hodn.reseni.cas_doruceni | date:"d.m.Y H:i"}} |
- {{ hodn.problem }} |
+ {{ hodn.problem.nazev | zkrat_nazev_problemu }} |
{{ hodn.body|default_if_none:"---" }} |
{{ hodn.reseni.cas_doruceni | deadline_html }} |
{% endfor %}
+
+
+
{% endfor %}
{% endblock %}
diff --git a/seminar/templatetags/deadliny.py b/seminar/templatetags/deadliny.py
index 7251f92c..37cf77af 100644
--- a/seminar/templatetags/deadliny.py
+++ b/seminar/templatetags/deadliny.py
@@ -39,3 +39,12 @@ def deadline_html(datum):
TypDeadline.FinalDeadline: 'final_deadline',
}
return mark_safe(f'{text}')
+
+@register.filter(name='zkrat_nazev_problemu')
+def zkrat_nazev_problemu(nazev):
+ if len(nazev) > 10:
+ if nazev[9] == " ":
+ nazev = nazev[:9] + "..."
+ else:
+ nazev = nazev[:10] + "..."
+ return nazev