combo/combo/public/templates/combo/link-list-cell.html

35 lines
1.4 KiB
HTML

{% load i18n %}
{% block cell-content %}
{% spaceless %}
{% block cell-header %}
{% if title %}<h2>{{ title }}</h2>{% endif %}
{% include "combo/asset_picture_fragment.html" %}
{% endblock cell-header %}
<div class="links-list">
{% block cell-top-content %}{% endblock cell-top-content %}
<ul>
{% for link in links %}
<li class="{{ link.css_classes|default:""|join:" " }}{% if link.cell.extra_css_class %} {{ link.cell.extra_css_class }}{% endif %}">{% if link.is_form %}
{% include "combo/wcs/form_link_fragment.html" with form=link %}
{% else %}
<a href="{{ link.url }}">{{ link.title }}</a>
{% endif %}</li>
{% endfor %}
{% if more_links %}
<li class="add-more-items">
<a role="button" tabindex="0" aria-expanded="false" aria-controls="more-items-{{ cell.get_reference }}" aria-label="{% trans 'More items' %}" id="btn-more-items-{{ cell.get_reference }}" class="add-more-items--button">{% block cell-more-items-btn-label %}+{% endblock %}</a>
</li>
{% endif %}
</ul>
{% if more_links %}
<ul style="display: none" class="more-items" id="more-items-{{ cell.get_reference }}" aria-labelledby="btn-more-items-{{ cell.get_reference }}">
{% for link in more_links %}
<li class="more-items--item {{ link.css_classes|default:""|join:" " }}"><a href="{{ link.url }}">{{ link.title }}</a></li>
{% endfor %}
{% endif %}
</ul>
</div>
{% endspaceless %}
{% endblock %}