|
|
@ -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', |
|
|
|