Du kan inte välja fler än 25 ämnen Ämnen måste starta med en bokstav eller siffra, kan innehålla bindestreck ('-') och vara max 35 tecken långa.

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. {% trans_default_domain 'admin' %}
  13. {{ form_start(form) }}
  14. {# panes #}
  15. {% for index, category in setting_definition.getCategories() %}
  16. {% embed '@LcSov/adminlte/embed/tabs/pane.html.twig' %}
  17. {% block class %}{{ index == 0 ? 'active' }}{% endblock %}
  18. {% block id %}{{ category }}{% endblock %}
  19. {% block content %}
  20. {% set count = 0 %}
  21. {% for name, setting in setting_definition.getSettingsByCategory(category) %}
  22. {% for child in form.settings %}
  23. {% if child.children.name.vars.value == name %}
  24. {{ form_widget(child) }}
  25. {% set count = count + 1 %}
  26. {% endif %}
  27. {% endfor %}
  28. {% endfor %}
  29. {% if count == 0 %}
  30. {% import '@LcSov/adminlte/macro/callout.html.twig' as mcallout %}
  31. {{ mcallout.callout_warning('Aucun paramètre disponible dans cet onglet.') }}
  32. {% endif %}
  33. {% endblock %}
  34. {% endembed %}
  35. {% endfor %}
  36. {# form footer #}
  37. {% embed '@LcSov/adminlte/embed/form_footer.html.twig' %}
  38. {% block width %}12{% endblock %}
  39. {% block content %}
  40. {{ form_widget(form.submit) }}
  41. {% endblock %}
  42. {% endembed %}
  43. {% do form.settings.setRendered %}
  44. {{ form_end(form) }}
  45. {% endblock %}
  46. {% endembed %}