cmsmanage/dashboard/templates/dashboard/links_card.dj.html
2024-02-06 00:42:14 -05:00

29 lines
1.2 KiB
HTML

<div class="accordion accordion-flush" id="{{ app|slugify }}-dash">
{% for link in ctx.links %}
{% if link.permission is None or link.permission in perms %}
<div class="accordion-item">
<div class="accordion-header d-flex align-items-center">
<a {% if link.tooltip is not None %}data-bs-toggle="tooltip" title="{{ link.tooltip }}"{% endif %}
href="{{ link.href }}"
class="text-nowrap mx-3 p-1">{{ link.text }}</a>
{% if link.body is not None %}
<button class="accordion-button collapsed bg-transparent shadow-none py-1"
type="button"
data-bs-toggle="collapse"
data-bs-target="#{{ app|slugify }}-{{ forloop.counter }}"
aria-expanded="false"
aria-controls="{{ app|slugify }}-{{ forloop.counter }}"></button>
{% endif %}
</div>
{% if link.body is not None %}
<div id="{{ app|slugify }}-{{ forloop.counter }}"
class="accordion-collapse collapse"
data-bs-parent="#{{ app|slugify }}-dash">
<div class="accordion-body">{{ link.body }}</div>
</div>
{% endif %}
</div>
{% endif %}
{% endfor %}
</div>