added colors to tags (#1631)

This commit is contained in:
jojoemade
2020-04-14 14:18:11 +02:00
committed by GitHub
parent 1dfceeea99
commit 0bc9e74853
9 changed files with 55 additions and 7 deletions

View File

@@ -159,8 +159,7 @@
{% endmacro %}
{% macro badge(title, color) %}
{# black, green, blue, yellow #}
<span class="badge bg-{{ color|default('red') }}">{{ title|trans }}</span>
<span class="badge" style="background-color:{{ color|default('#dd4b39') }}">{{ title|trans }}</span>
{% endmacro %}
{% macro alert(type, description, title, icon) %}
@@ -369,7 +368,7 @@
{% macro tag_list(taglist) %}
{% import _self as macro %}
{% for tag in taglist %}
{{ macro.badge(tag.name , 'green') }}
{{ macro.badge(tag.name, tag.color|default('#00a65a')) }}
{% endfor %}
{% endmacro %}

View File

@@ -38,7 +38,10 @@
<tr{% if manageAllowed %} class="modal-ajax-form open-edit" data-href="{{ path('tags_edit', {'id': tag.id}) }}"{% endif %}>
<td class="text-nowrap">{{ tables.datatable_multiupdate_row(tag.id) }}</td>
<td>{{ tag.name }}</td>
<td>
{{ widgets.color_dot(tag.color|default('#00a65a')) }}
{{ tag.name }}
</td>
<td>{{ widgets.label(tag.amount, type) }}</td>
<td class="actions">
{{ actions.tag(tag, 'index') }}