|
|
@ -5,6 +5,8 @@ register = template.Library() |
|
|
|
|
|
|
|
@register.filter(name='deadline') |
|
|
|
def deadline_text(datum): |
|
|
|
if deadline(datum) is None: |
|
|
|
return 'Neznámý deadline' |
|
|
|
typ, cislo, dl = deadline(datum) |
|
|
|
strings = { |
|
|
|
TypDeadline.PredDeadline: f"1. deadline čísla {cislo} ({dl})", |
|
|
@ -15,6 +17,8 @@ def deadline_text(datum): |
|
|
|
|
|
|
|
@register.filter(name='deadline_kratseji') |
|
|
|
def deadline_kratsi_text(datum): |
|
|
|
if deadline(datum) is None: |
|
|
|
return 'Neznámý deadline' |
|
|
|
typ, cislo, dl = deadline(datum) |
|
|
|
strings = { |
|
|
|
TypDeadline.PredDeadline: f"1. deadline {cislo}", |
|
|
@ -25,6 +29,8 @@ def deadline_kratsi_text(datum): |
|
|
|
|
|
|
|
@register.filter(name='deadline_html') |
|
|
|
def deadline_html(datum): |
|
|
|
if deadline(datum) is None: |
|
|
|
return 'Neznámý deadline' |
|
|
|
typ, _, _ = deadline(datum) |
|
|
|
text = deadline_kratsi_text(datum) |
|
|
|
classes = { |
|
|
|