using font awesome icon to render color dot (#1656)
This commit is contained in:
@@ -119,20 +119,20 @@
|
||||
|
||||
{% macro label_color_dot(type, isVisible, name, url, color) %}
|
||||
<span class="label-{{ type }}{{ isVisible ? '' : ' label-invisible' }}">
|
||||
<span class="dot"{% if color is not empty %} style="background-color:{{ color }}"{% endif %}></span>
|
||||
<span class="name">
|
||||
{% if url is not empty %}
|
||||
<i class="dot {{ 'dot'|icon }} fa-fw"{% if color is not empty %} style="color:{{ color }}"{% endif %}></i>
|
||||
{%- if url is not empty -%}
|
||||
<a href="{{ url }}">{{ name }}</a>
|
||||
{% else %}
|
||||
{%- else -%}
|
||||
{{ name }}
|
||||
{% endif %}
|
||||
{%- endif -%}
|
||||
</span>
|
||||
</span>
|
||||
{% endmacro %}
|
||||
|
||||
{% macro color_dot(color, tooltip) %}
|
||||
<span class="label-color" data-toggle="tooltip" data-placement="top" title="{{ tooltip }}">
|
||||
<span class="dot" style="background-color:{{ color }}"></span>
|
||||
<i class="dot {{ 'dot'|icon }} fa-fw"{% if color is not empty %} style="color:{{ color }}"{% endif %}></i>
|
||||
</span>
|
||||
{% endmacro %}
|
||||
|
||||
@@ -159,7 +159,7 @@
|
||||
{% endmacro %}
|
||||
|
||||
{% macro badge(title, color) %}
|
||||
<span class="badge" style="background-color:{{ color|default('#dd4b39') }}">{{ title|trans }}</span>
|
||||
<span class="badge" style="background-color:{{ color }}">{{ title|trans }}</span>
|
||||
{% endmacro %}
|
||||
|
||||
{% macro alert(type, description, title, icon) %}
|
||||
|
||||
@@ -39,8 +39,7 @@
|
||||
<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 class="{{ tables.data_table_column_class(tableName, columns, 'name') }}">
|
||||
{{ widgets.color_dot(tag.color|default('#00a65a')) }}
|
||||
{{ tag.name }}
|
||||
{{ widgets.label_color_dot('tag', true, tag.name, null, tag.color|default('#00a65a')) }}
|
||||
</td>
|
||||
<td class="{{ tables.data_table_column_class(tableName, columns, 'amount') }}">{{ widgets.label(tag.amount, type) }}</td>
|
||||
<td class="{{ tables.data_table_column_class(tableName, columns, 'actions') }}">
|
||||
|
||||
Reference in New Issue
Block a user