lots of fixes

This commit is contained in:
artus
2018-10-14 21:49:38 +02:00
parent 65a31c0a1b
commit 456cdf3704
11 changed files with 42 additions and 80 deletions

View File

@@ -1,4 +1,4 @@
<table class="table table-striped table-borderless shadow">
<table class="table table-borderless shadow">
{% if header %}<tr>
<th colspan="{{ cols_number }}" class="thead-dark text-center">{{ header }}</th>
</tr>{% endif %}

View File

@@ -4,11 +4,11 @@ register = template.Library()
@register.filter
def as_icon(value):
icons = {True: "ok",
False: "remove",
None: "asterisk"
icons = {True: "circle-check",
False: "circle-x",
None: "question-mark"
}
if not value in icons:
raise ValueError(value, 'is not a boolean or empty value !')
else:
return format_html('<span class="glyphicon glyphicon-{}"></span>', icons[value])
return format_html('<span class="oi oi-{}" aria-hidden="true"></span>', icons[value])