{% load trans from i18n %} {% comment "rst" %} config_label ============ This is used in list views, along the header line of each item. This is meant to describe how the item is configured, where the second line in these list views describes metadata about the item, if any. This include takes several optional arguments on the include call: .. describe:: icon The icon class to use in the label .. describe:: text The text of the label, should be translated .. describe:: url URL that the lable can lead to .. describe:: popup The text in the popup, also used for ARIA labels .. describe:: classes Additional classes to apply to the label {% endcomment %} {% with tag_name=url|yesno:"a,span" %} <{{ tag_name }} {% if popup %}data-content="{{ popup }}" aria-label="{{ popup }}"{% endif %} {% if url %}href="{{ url }}"{% endif %} class="ui {% if classes %} {{ classes }} {% else %} {% if not text %}icon{% endif %} {% endif %} label"> {% if icon %}{% endif %} {{ text }} {% endwith %}