2023-07-19 21:42:28 +02:00
|
|
|
{% set is_disabled = is_disabled|default(false) %}
|
|
|
|
{% set disabled_class = is_disabled ? 'text-muted' : '' %}
|
|
|
|
|
|
|
|
{% set icon %}
|
|
|
|
<span class="{{ icon }} {{ disabled_class }}"></span>
|
|
|
|
{% endset %}
|
2022-03-13 19:32:32 +01:00
|
|
|
|
2023-07-19 21:42:28 +02:00
|
|
|
{% set label %}
|
|
|
|
<span class="nav-item-label {{ disabled_class }}">
|
|
|
|
{{- label|trans -}}
|
|
|
|
</span>
|
|
|
|
{% endset %}
|
|
|
|
|
|
|
|
{% block item %}
|
|
|
|
{% if is_disabled|default(false) %}
|
|
|
|
<li class="nav-item">
|
|
|
|
<span class="nav-link {% if id == section %}active{% endif %}">
|
|
|
|
{{- (icon ~ label)|raw -}}
|
|
|
|
</span>
|
|
|
|
</li>
|
|
|
|
{% else %}
|
|
|
|
<li class="nav-item">
|
|
|
|
<a class="nav-link {% if id == section %}active{% endif %}" href="{{ route }}">
|
|
|
|
{{- (icon ~ label)|raw -}}
|
|
|
|
</a>
|
|
|
|
</li>
|
|
|
|
{% endif %}
|
2022-03-13 19:32:32 +01:00
|
|
|
{% endblock %}
|