openclassify/addons/default/visiosoft/defaultadmin-theme/resources/views/macros/sections.twig
2019-06-22 13:59:18 +03:00

27 lines
828 B
Twig

{% macro sections(sections, section) %}
{% import _self as self %}
<li class="{{ section.highlighted ? 'highlighted' }} {{ section.active ? 'active' }} {{ section.class }}">
<a {{ html_attributes(section.attributes) }}>
{{ section.icon ? icon(section.icon)|raw }}
{{ trans(section.title)|raw }}
{% if section.label %}
<span class="tag tag-{{ section.context }}">
{{ trans(section.label)|raw }}
</span>
{% endif %}
</a>
{% if section.highlighted %}
<ul>
{% for child in sections.children(section.slug).visible() %}
{{ self.sections(sections, child) }}
{% endfor %}
</ul>
{% endif %}
</li>
{% endmacro %}