edit.html.twig 3.7 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485
  1. {% extends 'admin/base.html.twig' %}
  2. {% form_theme form 'admin/form/custom_theme.html.twig' %}
  3. {% block content %}
  4. {% set languages = global_service.languages %}
  5. <div class="content">
  6. <div class="container-fluid">
  7. <div class="row">
  8. <div id="elfinder"></div>
  9. <div class="col-md-12">
  10. <div class="card">
  11. <div class="card-header">
  12. <h4 class="card-title">{{ title }}</h4>
  13. </div>
  14. <div class="card-body">
  15. {{ form_start(form) }}
  16. <div class="row">
  17. <div class="col-md-4">
  18. {{ form_row(form.is_active) }}
  19. </div>
  20. <div class="col-md-4">
  21. {{ form_row(form.publish_date) }}
  22. </div>
  23. <div class="col-md-4">
  24. </div>
  25. </div>
  26. <div class="row">
  27. <div class="col-md-12">
  28. {{ form_row(form.image) }}
  29. </div>
  30. </div>
  31. <div class="row">
  32. <div class="col-md-12">
  33. {{ form_row(form.tags) }}
  34. </div>
  35. </div>
  36. {% for language in languages %}
  37. <div class="card">
  38. <div class="card-header">
  39. <h5 class="form-lang-header">
  40. <a href="#collapse-{{ language.code }}" data-toggle="collapse">
  41. <span class="language left lang-{{ language.code }}"></span>
  42. {{ language.title }}
  43. </a>
  44. </h5>
  45. </div>
  46. <div id="collapse-{{ language.code }}" class="collapse {% if language.code == 'ru' or language.code == 'en' %}show{% else %}hide{% endif %}">
  47. <div class="card-body">
  48. <div class="row">
  49. <div class="col-md-12">
  50. {{ form_row(form["lang_#{language.id}_title"]) }}
  51. </div>
  52. </div>
  53. <div class="row">
  54. <div class="col-md-12">
  55. {{ form_row(form["lang_#{language.id}_text"]) }}
  56. </div>
  57. </div>
  58. </div>
  59. </div>
  60. </div>
  61. {% endfor %}
  62. <p class="text-center">
  63. <button type="submit" class="btn btn-primary btn-fill">Сохранить</button>
  64. </p>
  65. {{ form_end(form) }}
  66. </div>
  67. </div>
  68. </div>
  69. </div>
  70. </div>
  71. </div>
  72. {% endblock %}