Label tooltip support

This commit is contained in:
Samuel Shifterovich 2018-12-15 12:16:20 +01:00
parent 2c411b6150
commit 5b0a56691b

View File

@ -15,7 +15,14 @@
{% assign label_data = label | split:":" %}
{% assign color = label_data[0] %}
{% assign text = label_data[1] %}
<span class="badge badge-{{color}}">{{text}}</span>
{% assign tooltip = label_data[2] | default: "" %}
{% assign help_icon = '<i class="far fa-question-circle"></i>' %}
<span class="badge badge-{{color}}" {% if tooltip %} data-toggle="tooltip" title="{{ tooltip }}">{{text}} {{ help_icon
}}
{% else %}
>{{text}}
{% endif %}
</span>
{% endfor %}
</div>
{% endif %}