You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

53 lines
2.1KB

  1. {% embed '@LcSov/adminlte/embed/tabs/tabs.html.twig' %}
  2. {# items menu #}
  3. {% import '@LcSov/adminlte/macro/tabs.html.twig' as mtabs %}
  4. {% block menu_items %}
  5. {% for index, category in setting_definition.getCategories() %}
  6. {{ mtabs.menu_item(category, loop.first, ('setting_definition.'~trans_category~'.categories.'~category)|trans({}, 'admin')) }}
  7. {% endfor %}
  8. {% endblock %}
  9. {# content #}
  10. {% block content %}
  11. {% form_theme form '@LcSov/adminlte/crud/form_theme.html.twig' %}
  12. {{ form_start(form) }}
  13. {# panes #}
  14. {% for index, category in setting_definition.getCategories() %}
  15. {% embed '@LcSov/adminlte/embed/tabs/pane.html.twig' %}
  16. {% block class %}{{ index == 0 ? 'active' }}{% endblock %}
  17. {% block id %}{{ category }}{% endblock %}
  18. {% block content %}
  19. {% set count = 0 %}
  20. {% for name, setting in setting_definition.getSettingsByCategory(category) %}
  21. {% for child in form.settings %}
  22. {% if child.children.name.vars.value == name %}
  23. {{ form_widget(child) }}
  24. {% set count = count + 1 %}
  25. {% endif %}
  26. {% endfor %}
  27. {% endfor %}
  28. {% if count == 0 %}
  29. {% import '@LcSov/adminlte/macro/callout.html.twig' as mcallout %}
  30. {{ mcallout.callout_warning('Aucun paramètre disponible dans cet onglet.') }}
  31. {% endif %}
  32. {% endblock %}
  33. {% endembed %}
  34. {% endfor %}
  35. {# form footer #}
  36. {% embed '@LcSov/adminlte/embed/form_footer.html.twig' %}
  37. {% block width %}12{% endblock %}
  38. {% block content %}
  39. {{ form_widget(form.submit) }}
  40. {% endblock %}
  41. {% endembed %}
  42. {# {% for child in form.settings %}#}
  43. {# {% do child.setRendered() %}#}
  44. {# {% endfor %}#}
  45. {{ form_end(form) }}
  46. {% endblock %}
  47. {% endembed %}