|
|
@@ -38,40 +38,22 @@
|
|
|
{{ item.link_text }}
|
|
|
</a>
|
|
|
|
|
|
+ {# Menu item buttons (if any) #}
|
|
|
{% if item.buttons %}
|
|
|
<div class="btn-group ps-1">
|
|
|
-
|
|
|
{% for button in item.buttons %}
|
|
|
-
|
|
|
{% if request.user|has_perms:button.permissions %}
|
|
|
<a class="btn btn-sm btn-{{ button.color }} lh-1" href="{% url button.link %}" title="{{ button.title }}">
|
|
|
<i class="{{ button.icon_class }}"></i>
|
|
|
</a>
|
|
|
{% endif %}
|
|
|
-
|
|
|
{% endfor %}
|
|
|
-
|
|
|
- </div>
|
|
|
- {% endif %}
|
|
|
-
|
|
|
- {# Add & Import Buttons #}
|
|
|
- {% if item.has_add or item.has_import %}
|
|
|
- <div class="btn-group ps-1">
|
|
|
- {% if item.has_add %}
|
|
|
- <a class="btn btn-sm btn-success lh-1" href="{% url item.add_url %}" title="Add {{ item.label }}">
|
|
|
- <i class="mdi mdi-plus-thick"></i>
|
|
|
- </a>
|
|
|
- {% endif %}
|
|
|
- {% if item.has_import %}
|
|
|
- <a class="btn btn-sm btn-outline-success lh-1" href="{% url item.import_url %}" title="Import {{ item.label }}">
|
|
|
- <i class="mdi mdi-upload"></i>
|
|
|
- </a>
|
|
|
- {% endif %}
|
|
|
</div>
|
|
|
{% endif %}
|
|
|
|
|
|
{% else %}
|
|
|
|
|
|
+ {# Display a disabled link (no permission) #}
|
|
|
<a class="nav-link flex-grow-1 disabled">
|
|
|
{{ item.link_text }}
|
|
|
</a>
|