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