Commit f3554ce8 authored by Nicolas Joyard's avatar Nicolas Joyard

Add group_icon tag

parent 36ba7e4d
......@@ -22,6 +22,16 @@ def chamber_icon(chamber):
abbr=chamber.abbreviation.lower()))
@register.filter
def group_icon(main_mandate):
return mark_safe(
u'<span class="group-icon ' +
u'group-icon-{abbr}"></span> {role} of {name}'.format(
role=main_mandate.role,
name=main_mandate.group.name,
abbr=main_mandate.group.abbreviation.lower()))
@register.filter
def mandate_date(date, arg=None):
if date is None or date.year == 9999:
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment