{% embed '@LcSov/adminlte/embed/tabs/tabs.html.twig' %} {# items menu #} {% import '@LcSov/adminlte/macro/tabs.html.twig' as mtabs %} {% block menu_items %} {% for index, category in setting_definition.getCategories() %} {{ mtabs.menu_item(category, loop.first, ('setting_definition.'~trans_category~'.categories.'~category)|trans({}, 'admin')) }} {% endfor %} {% endblock %} {# content #} {% block content %} {% form_theme form '@LcSov/adminlte/crud/form_theme.html.twig' %} {{ form_start(form) }} {# panes #} {% for index, category in setting_definition.getCategories() %} {% embed '@LcSov/adminlte/embed/tabs/pane.html.twig' %} {% block class %}{{ index == 0 ? 'active' }}{% endblock %} {% block id %}{{ category }}{% endblock %} {% block content %} {% set count = 0 %} {% for name, setting in setting_definition.getSettingsByCategory(category) %} {% for child in form.settings %} {% if child.children.name.vars.value == name %} {{ form_widget(child) }} {% set count = count + 1 %} {% endif %} {% endfor %} {% endfor %} {% if count == 0 %} {% import '@LcSov/adminlte/macro/callout.html.twig' as mcallout %} {{ mcallout.callout_warning('Aucun paramètre disponible dans cet onglet.') }} {% endif %} {% endblock %} {% endembed %} {% endfor %} {# form footer #} {% embed '@LcSov/adminlte/embed/form_footer.html.twig' %} {% block width %}12{% endblock %} {% block content %} {{ form_widget(form.submit) }} {% endblock %} {% endembed %} {% do form.settings.setRendered %} {{ form_end(form) }} {% endblock %} {% endembed %}