pages.html.twig 23 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416
  1. {% extends 'partials/base.html.twig' %}
  2. {% macro spanToggle(input, length) %}
  3. {{ (repeat('  ', (length - input|length) / 2) ~ input ~ repeat('  ', (length - input|length) / 2))|raw }}
  4. {% endmacro %}
  5. {% if admin.route %}
  6. {% set context = admin.page(true) %}
  7. {% endif %}
  8. {% if uri.param('new') %}
  9. {% set mode = 'new' %}
  10. {% elseif context %}
  11. {% set mode = 'edit' %}
  12. {% if context.exists %}
  13. {% set page_url = base_url ~ '/pages' ~ (context.header.routes.default ?: context.rawRoute) %}
  14. {% set exists = true %}
  15. {% set title = (context.exists ? "PLUGIN_ADMIN.EDIT"|tu : "PLUGIN_ADMIN.CREATE"|tu ) ~ " " ~ (context.header.title ?: context.title) %}
  16. {% else %}
  17. {% set title = "PLUGIN_ADMIN.ADD_PAGE"|tu %}
  18. {% endif %}
  19. {% else %}
  20. {% set mode = 'list' %}
  21. {% set title = "PLUGIN_ADMIN.PAGES"|tu %}
  22. {% endif %}
  23. {% set modular = context.modular ? 'modular_' : '' %}
  24. {% set warn = config.plugins.admin.warnings.delete_page %}
  25. {% set admin_lang = admin.session.admin_lang ?: 'en' %}
  26. {% set page_lang = context.language %}
  27. {% set type = 'page' %}
  28. {% block stylesheets %}
  29. {% if mode == 'edit' %}
  30. {% do assets.addCss(theme_url~'/css/codemirror/codemirror.css') %}
  31. {% endif %}
  32. {{ parent() }}
  33. {% endblock %}
  34. {% block javascripts %}
  35. {{ parent() }}
  36. {% endblock %}
  37. {% if config.plugins.admin.frontend_preview_target != 'inline' %}
  38. {% set preview_html = (base_url_relative_frontend|rtrim('/') ~ (context.home ? '' : context.route)) ?: '/' %}
  39. {% set preview_target = config.plugins.admin.frontend_preview_target %}
  40. {% set preview_link = context.routable ? '<a class="button" target="' ~ preview_target ~ '" href="' ~ preview_html ~ '" title="' ~ "PLUGIN_ADMIN.PREVIEW"|tu ~ '"> <i class="fa fa-fw fa-eye" style="font-size:18px;margin-right:0;"></i></a>' : '' %}
  41. {% else %}
  42. {% set preview_html = (base_url|rtrim('/') ~ '/preview' ~ (context.home ? '' : context.route)) ?: '/' %}
  43. {% set preview_link = context.routable ? '<a class="button" href="' ~ preview_html ~ '" title="' ~ "PLUGIN_ADMIN.PREVIEW"|tu ~ '"> <i class="fa fa-fw fa-eye" style="font-size:18px;margin-right:0;"></i></a>' : '' %}
  44. {% endif %}
  45. {% macro loop(page, depth, twig_vars) %}
  46. {% set config = twig_vars['config'] %}
  47. {% set separator = config.system.param_sep %}
  48. {% set display_field = config.plugins.admin.pages_list_display_field %}
  49. {% set base_url = twig_vars['base_url_relative'] %}
  50. {% set base_url_relative_frontend = twig_vars['base_url_relative_frontend'] %}
  51. {% set base_url_simple = twig_vars['base_url_simple'] %}
  52. {% set admin_route = twig_vars['admin_route'] %}
  53. {% set admin_lang = twig_vars['admin_lang'] %}
  54. {% set warn = twig_vars['warn'] %}
  55. {% set uri = twig_vars['uri'] %}
  56. {% if page.header.admin.children_display_order == 'collection' and page.header.content.order.by %}
  57. {% if page.header.content.order.custom %}
  58. {% set pcol = page.children().order(page.header.content.order.by, page.header.content.order.dir|default('asc'), page.header.content.order.custom) %}
  59. {% else %}
  60. {% set pcol = page.children().order(page.header.content.order.by, page.header.content.order.dir|default('asc')) %}
  61. {% endif %}
  62. {% else %}
  63. {% set pcol = page.children() %}
  64. {% endif %}
  65. {% for p in pcol %}
  66. {% set description = (not p.page ? "PLUGIN_ADMIN.FOLDER"|tu ~ ' &bull; ' : "PLUGIN_ADMIN.PAGE"|tu ~ ' &bull; ') ~
  67. (p.modular ? "PLUGIN_ADMIN.MODULAR"|tu ~ ' &bull; ' : '') ~
  68. (p.routable ? "PLUGIN_ADMIN.ROUTABLE"|tu ~ ' &bull; ' : "PLUGIN_ADMIN.NON_ROUTABLE"|tu ~ ' &bull; ') ~
  69. (p.visible ? "PLUGIN_ADMIN.VISIBLE"|tu ~ ' &bull; ' : "PLUGIN_ADMIN.NON_VISIBLE"|tu ~ ' &bull; ') ~
  70. (p.published ? "PLUGIN_ADMIN.PUBLISHED"|tu ~ ' &bull; ' : "PLUGIN_ADMIN.NON_PUBLISHED"|tu ~ ' &bull; ') %}
  71. {% set page_url = getPageUrl(p) %}
  72. <li class="page-item" data-nav-id="{{ p.route }}">
  73. <div class="row page-item__row">
  74. <span class="page-item__toggle" {{ p.children(0).count > 0 ? 'data-toggle="children"' : ''}}>
  75. <i class="page-icon fa fa-fw fa-circle-o {{ p.children(0).count > 0 ? 'children-closed' : ''}} {{ p.modular ? 'modular' : (not p.routable ? 'not-routable' : (not p.visible ? 'not-visible' : (not p.page ? 'folder' : ''))) }}"></i>
  76. </span>
  77. <div class="page-item__content">
  78. <div class="page-item__content-name">
  79. <span data-hint="{{ description|trim(' &bull; ')|raw }}" class="hint--top page-item__content-hint">
  80. {% set page_label = attribute(p.header, display_field)|defined(attribute(p, display_field))|defined(p.title) %}
  81. <a href="{{ page_url }}" class="page-edit">{{ page_label|e }}</a>
  82. </span>
  83. {% if p.language %}
  84. <span class="badge lang {% if p.language == admin_lang %}info{% endif %}">{{p.language}}</span>
  85. {% endif %}
  86. {% if p.home %}
  87. <span class="page-home"><i class="fa fa-home"></i></span>
  88. {% endif %}
  89. </div>
  90. <p class="page-route">{{ p.header.routes.default ?: p.route }} <span class="spacer"><i class="fa fa-long-arrow-right"></i></span> {{ p.template() }}</p>
  91. </div>
  92. <span class="page-item__tools">
  93. {% if config.plugins.admin.frontend_preview_target != 'inline' %}
  94. {% set preview_target = config.plugins.admin.frontend_preview_target %}
  95. {% set preview_html = (base_url_relative_frontend|rtrim('/') ~ (p.home ? '' : p.route)) ?: '/' %}
  96. {% set preview_link = p.routable ? '<a class="page-view" target="' ~ preview_target ~ '" href="' ~ preview_html ~ '" title="' ~ "PLUGIN_ADMIN.PREVIEW"|tu ~ '"> <i class="fa fa-fw fa-eye"></i></a>' : '' %}
  97. {% else %}
  98. {% set preview_html = (base_url|rtrim('/') ~ '/preview' ~ (p.home ? '' : p.route)) ?: '/' %}
  99. {% set preview_link = p.routable ? '<a class="page-view" href="' ~ preview_html ~ '" title="' ~ "PLUGIN_ADMIN.PREVIEW"|tu ~ '"> <i class="fa fa-fw fa-eye"></i></a>' : '' %}
  100. {% endif %}
  101. {{ preview_link|raw }}
  102. {% if warn %}
  103. <a href="#delete" data-remodal-target="delete" data-delete-url="{{ uri.addNonce(page_url ~ '/task' ~ separator ~ 'delete', 'admin-form', 'admin-nonce') }}" class="page-delete" ><i class="fa fa-close"></i></a>
  104. {% else %}
  105. <a href="{{ uri.addNonce(page_url ~ '/task' ~ separator ~ 'delete', 'admin-form', 'admin-nonce') }}" class="page-delete" ><i class="fa fa-close"></i></a>
  106. {% endif %}
  107. </span>
  108. </div>
  109. {% if p.children().count > 0 %}
  110. <ul class="depth-{{ depth + 1 }}" style="display:none;">
  111. {{ _self.loop(p, depth + 1, twig_vars) }}
  112. </ul>
  113. {% endif %}
  114. </li>
  115. {% endfor %}
  116. {% endmacro %}
  117. {% block titlebar %}
  118. <div class="button-bar">
  119. {% if mode == 'list' %}
  120. <a class="button" href="{{ base_url }}"><i class="fa fa-reply"></i> {{ "PLUGIN_ADMIN.BACK"|tu }}</a>
  121. {% for key, add_modal in config.plugins.admin.add_modals %}
  122. {% if add_modal.show_in|defined('bar') == 'bar' %}
  123. <a class="button {{ add_modal.link_classes }}" href="#modal-add_modal-{{ key }}" data-remodal-target="modal-add_modal-{{ key }}"><i class="fa fa-plus"></i> {{ add_modal.label|tu }}</a>
  124. {% endif %}
  125. {% endfor %}
  126. <div class="button-group">
  127. <button type="button" class="button disabled" href="#modal" data-remodal-target="modal">
  128. <i class="fa fa-plus"></i> {{ "PLUGIN_ADMIN.ADD"|tu }}
  129. </button>
  130. <button type="button" class="button dropdown-toggle" data-toggle="dropdown">
  131. <i class="fa fa-caret-down"></i>
  132. </button>
  133. <ul class="dropdown-menu">
  134. <li><a class="button" href="#modal" data-remodal-target="modal">{{ "PLUGIN_ADMIN.ADD_PAGE"|tu }}</a></li>
  135. <li><a class="button" href="#modal-folder" data-remodal-target="modal-folder">{{ "PLUGIN_ADMIN.ADD_FOLDER"|tu }}</a></li>
  136. {% if admin.modularTypes is not empty %}
  137. <li><a class="button" href="#modular" data-remodal-target="modular">{{ "PLUGIN_ADMIN.ADD_MODULAR"|tu }}</a></li>
  138. {% endif %}
  139. {% for key, add_modal in config.plugins.admin.add_modals %}
  140. {% if add_modal.show_in|defined('bar') == 'dropdown' %}
  141. <li><a class="button {{ add_modal.link_classes }}" href="#modal-add_modal-{{ key }}" data-remodal-target="modal-add_modal-{{ key }}">{{ add_modal.label|tu }}</a></li>
  142. {% endif %}
  143. {% endfor %}
  144. </ul>
  145. </div>
  146. {% if admin.multilang %}
  147. <div class="button-group">
  148. <button type="button" class="button disabled">
  149. <i class="fa fa-flag-o"></i>
  150. {% set langName = admin.siteLanguages[admin_lang] %}
  151. {{ langName[:1]|upper ~ langName[1:] }}
  152. </button>
  153. {% if admin.languages_enabled|length > 1 %}
  154. <button type="button" class="button dropdown-toggle" data-toggle="dropdown">
  155. <i class="fa fa-caret-down"></i>
  156. </button>
  157. <ul class="dropdown-menu language-switcher">
  158. {% for langCode in admin.languages_enabled %}
  159. {% set langName = admin.siteLanguages[langCode] %}
  160. {% if langCode != admin_lang %}
  161. <li><a href="{{ uri.addNonce(base_url_relative ~ theme.slug ~ '/pages/task' ~ config.system.param_sep ~ 'switchlanguage/lang' ~ config.system.param_sep ~ langCode, 'admin-form', 'admin-nonce') }}">{{ langName[:1]|upper ~ langName[1:] }}</a></li>
  162. {% endif %}
  163. {% endfor %}
  164. </ul>
  165. {% endif %}
  166. </div>
  167. {% endif %}
  168. {% elseif mode == 'edit' %}
  169. {{ preview_link|raw }}
  170. <a class="button" href="{{ base_url }}/pages" title="{{ "PLUGIN_ADMIN.BACK"|tu }}"><i class="fa fa-reply"></i></a>
  171. {% set siblings = context.parent().children() %}
  172. {% if not siblings.isFirst(context.path) %}
  173. {% set sib = siblings.nextSibling(context.path) %}
  174. {% set sib_url = base_url ~ '/pages' ~ (sib.header.routes.default ?: sib.rawRoute) %}
  175. <a class="button hidden-mobile" href="{{ sib_url }}" title="{{ "PLUGIN_ADMIN.PREVIOUS"|tu }}"><i class="fa fa-chevron-left"></i></a>
  176. {% endif %}
  177. {% if not siblings.isLast(context.path) %}
  178. {% set sib = siblings.prevSibling(context.path) %}
  179. {% set sib_url = base_url ~ '/pages' ~ (sib.header.routes.default ?: sib.rawRoute) %}
  180. <a class="button hidden-mobile" href="{{ sib_url }}" title="{{ "PLUGIN_ADMIN.NEXT"|tu }}"><i class="fa fa-chevron-right"></i></a>
  181. {% endif %}
  182. {% if exists %}
  183. <div class="button-group">
  184. <button type="button" class="button disabled" href="#modal" data-remodal-target="modal">
  185. <i class="fa fa-plus"></i> {{ "PLUGIN_ADMIN.ADD"|tu }}
  186. </button>
  187. <button type="button" class="button dropdown-toggle" data-toggle="dropdown">
  188. <i class="fa fa-caret-down"></i>
  189. </button>
  190. <ul class="dropdown-menu">
  191. <li><a class="button" href="#modal" data-remodal-target="modal">{{ "PLUGIN_ADMIN.ADD_PAGE"|tu }}</a></li>
  192. <li><a class="button" href="#modal-folder" data-remodal-target="modal-folder">{{ "PLUGIN_ADMIN.ADD_FOLDER"|tu }}</a></li>
  193. {% if admin.modularTypes is not empty %}
  194. <li><a class="button" href="#modular" data-remodal-target="modular">{{ "PLUGIN_ADMIN.ADD_MODULAR"|tu }}</a></li>
  195. {% endif %}
  196. </ul>
  197. </div>
  198. <a class="button disable-after-click" href="{{ uri.addNonce(page_url ~ '/task' ~ config.system.param_sep ~ 'copy', 'admin-form', 'admin-nonce') }}" class="page-copy" ><i class="fa fa-copy"></i> {{ "PLUGIN_ADMIN.COPY"|tu }}</a>
  199. <a class="button" href="#" data-remodal-target="move"><i class="fa fa-arrows"></i> {{ "PLUGIN_ADMIN.MOVE"|tu }}</a>
  200. {% if config.plugins['admin-pro'].enabled %}
  201. <a class="button" href="#" data-remodal-target="revisions"><i class="fa fa-history"></i> {{ "PLUGIN_ADMIN_PRO.REVISIONS"|tu }}</a>
  202. {% endif %}
  203. {% if warn %}
  204. <a class="button" href="#delete" data-remodal-target="delete" data-delete-url="{{ uri.addNonce(page_url ~ '/task' ~ config.system.param_sep ~ 'delete', 'admin-form', 'admin-nonce') }}"><i class="fa fa-close"></i> {{ "PLUGIN_ADMIN.DELETE"|tu }}</a>
  205. {% else %}
  206. <a class="button disable-after-click" href="{{ uri.addNonce(uri.route(true) ~ '/task' ~ config.system.param_sep ~ 'delete', 'admin-form', 'admin-nonce') }}" class="page-delete" ><i class="fa fa-close"></i></a>
  207. {% endif %}
  208. {% endif %}
  209. <div class="button-group">
  210. <button class="button" name="task" value="save" form="blueprints" type="submit"><i class="fa fa-check"></i> {{ "PLUGIN_ADMIN.SAVE"|tu }}</button>
  211. {% if exists and admin.multilang %}
  212. {% if context.untranslatedLanguages %}
  213. <button type="button" class="button dropdown-toggle" data-toggle="dropdown">
  214. <i class="fa fa-caret-down"></i>
  215. </button>
  216. <ul class="dropdown-menu lang-switcher">
  217. {% for langCode in context.untranslatedLanguages %}
  218. {% set langName = admin.siteLanguages[langCode] %}
  219. {% if langCode != page_lang %}
  220. <li><button class="button task" name="task" value="saveas" lang="{{langCode}}" form="blueprints" type="submit">{{ "PLUGIN_ADMIN.SAVE_AS"|tu }} {{ langName[:1]|upper ~ langName[1:] }}</button>
  221. {% endif %}
  222. {% endfor %}
  223. </ul>
  224. {% endif %}
  225. {% endif %}
  226. </div>
  227. {% endif %}
  228. </div>
  229. {% if mode == 'new' %}
  230. <h1><i class="fa fa-fw fa-file-text-o"></i> {{ "PLUGIN_ADMIN.ADD_PAGE"|tu }}</h1>
  231. {% elseif mode == 'edit' %}
  232. <h1><i class="fa fa-fw fa-file-text-o"></i>
  233. {{ context.menu }}
  234. </h1>
  235. {% else %}
  236. <h1><i class="fa fa-fw fa-file-text-o"></i> {{ "PLUGIN_ADMIN.MANAGE_PAGES"|tu }}</h1>
  237. {% endif %}
  238. {% endblock %}
  239. {% block content %}
  240. <div class="clear admin-pages">
  241. {% if mode == 'new' %}
  242. {% include 'partials/blueprints-new.html.twig' with { blueprints: admin.blueprints('pages/page'), data: context } %}
  243. {% elseif mode == 'edit' %}
  244. <div class="admin-form-wrapper">
  245. <div id="admin-topbar">
  246. {% if admin.multilang and page_lang %}
  247. <div id="admin-lang-toggle" class="button-group">
  248. <button type="button" class="button disabled">
  249. {% if exists %}
  250. {{ page_lang }}
  251. {% else %}
  252. {{ admin_lang }}
  253. {% endif %}
  254. </button>
  255. {% if exists and context.translatedLanguages|length > 1 %}
  256. <button type="button" class="button dropdown-toggle" data-toggle="dropdown">
  257. <i class="fa fa-caret-down"></i>
  258. </button>
  259. <ul class="dropdown-menu language-switcher">
  260. {% for language, route in context.translatedLanguages %}
  261. {% if language != page_lang %}
  262. <li><button class="task" name="task" value="switchlanguage" lang="{{language}}" redirect="{{context.rawRoute|trim('/')}}" form="blueprints">{{ language }}</button>
  263. {% endif %}
  264. {% endfor %}
  265. </ul>
  266. {% endif %}
  267. </div>
  268. {% endif %}
  269. {% if context.blueprints.fields %}
  270. {% set normalText = "PLUGIN_ADMIN.NORMAL"|tu %}
  271. {% set expertText = "PLUGIN_ADMIN.EXPERT"|tu %}
  272. {% set maxLen = max([normalText|length, expertText|length]) %}
  273. {% set normalText = _self.spanToggle(normalText, maxLen) %}
  274. {% set expertText = _self.spanToggle(expertText, maxLen) %}
  275. <form id="admin-mode-toggle">
  276. <div class="switch-toggle switch-grav">
  277. <input type="radio" value="normal" data-leave-url="{{ base_url }}/pages/{{ admin.route|trim('/') }}/mode{{ config.system.param_sep }}normal" id="normal" name="mode-switch" class="highlight" {% if admin.session.expert == '0' %} checked="checked"{% endif %}>
  278. <label for="normal">{{ normalText|raw }}</label>
  279. <input type="radio" value="expert" data-leave-url="{{ base_url }}/pages/{{ admin.route|trim('/') }}/mode{{ config.system.param_sep }}expert" id="expert" name="mode-switch" class="highlight" {% if admin.session.expert == '1' %} checked="checked"{% endif %}>
  280. <label for="expert">{{ expertText|raw }}</label>
  281. <a></a>
  282. </div>
  283. </form>
  284. {% endif %}
  285. </div>
  286. {% if context.blueprints.fields and admin.session.expert == '0' %}
  287. {% include 'partials/blueprints.html.twig' with { blueprints: context.blueprints, data: context } %}
  288. {% else %}
  289. {% include 'partials/blueprints-raw.html.twig' with { blueprints: admin.blueprints('admin/pages/'~modular~'raw'), data: context } %}
  290. {% endif %}
  291. </div>
  292. {% else %}
  293. <form id="page-filtering">
  294. <div class="page-filters">
  295. <input type="text" data-filter-labels="{{ [{'id': 'mode', 'name': 'PLUGIN_ADMIN.PAGE_MODES'|tu}, {'id': 'type', 'name': 'PLUGIN_ADMIN.PAGE_TYPES'|tu}, {'id': 'access', 'name': 'PLUGIN_ADMIN.ACCESS_LEVELS'|tu}] |json_encode|e('html_attr')}}" data-filter-types="{{ admin.types|merge(admin.modularTypes)|json_encode|e('html_attr') }}" data-filter-access-levels="{{ admin.accessLevels|json_encode|e('html_attr') }}" placeholder="{{ "PLUGIN_ADMIN.ADD_FILTERS"|tu }}" class="page-filter" name="page-filter" />
  296. </div>
  297. <div class="page-search">
  298. <input type="text" placeholder="{{ "PLUGIN_ADMIN.SEARCH_PAGES"|tu }}" name="page-search" />
  299. </div>
  300. <div class="page-shortcuts">
  301. <span class="button button-x-small" data-page-toggleall="expand"><i class="fa fa-fw fa-plus-circle"></i> {{ "PLUGIN_ADMIN.EXPAND_ALL"|tu }}</span>
  302. <span class="button button-x-small" data-page-toggleall="collapse"><i class="fa fa-fw fa-minus-circle"></i> {{ "PLUGIN_ADMIN.COLLAPSE_ALL"|tu }}</span>
  303. </div>
  304. </form>
  305. <div class="pages-list">
  306. <ul class="depth-0">
  307. {{ _self.loop(pages, 0, _context) }}
  308. </ul>
  309. {% include 'partials/page-legend.html.twig' %}
  310. </div>
  311. {% endif %}
  312. </div>
  313. {% if context %}
  314. {% set obj_data = clone(context) %}
  315. {% if mode == 'edit' %}
  316. {% do obj_data.folder('') %}
  317. {% endif %}
  318. {% endif %}
  319. {% if mode == 'list' or mode == 'edit' %}
  320. <div class="remodal" data-remodal-id="modal" data-remodal-options="hashTracking: false">
  321. {% include 'partials/blueprints-new.html.twig' with { blueprints: admin.blueprints('admin/pages/new'), data: obj_data, form_id:'new-page' } %}
  322. </div>
  323. <div class="remodal" data-remodal-id="modal-folder" data-remodal-options="hashTracking: false">
  324. {% include 'partials/blueprints-new-folder.html.twig' with { blueprints: admin.blueprints('admin/pages/new_folder'), data: obj_data, form_id:'new-folder' } %}
  325. </div>
  326. <div class="remodal" data-remodal-id="modular" data-remodal-options="hashTracking: false">
  327. {% include 'partials/blueprints-new.html.twig' with { blueprints: admin.blueprints('admin/pages/modular_new'), data: obj_data, form_id:'new-modular' } %}
  328. </div>
  329. {% for key, add_modal in config.plugins.admin.add_modals %}
  330. <div class="remodal {{ add_modal.modal_classes|defined('') }}" data-remodal-id="modal-add_modal-{{ key }}" data-remodal-options="hashTracking: false">
  331. {% include add_modal.template|defined('partials/blueprints-new.html.twig') with { blueprints: admin.blueprints(add_modal.blueprint), data: context, form_id:'add-modal' }|merge(add_modal.with|defined({})) %}
  332. </div>
  333. {% endfor %}
  334. {% endif %}
  335. {% if mode == 'edit' %}
  336. <div class="remodal" data-remodal-id="move" data-remodal-options="hashTracking: false">
  337. {% include 'partials/page-move.html.twig' with { blueprints: admin.blueprints('admin/pages/move'), data: context } %}
  338. </div>
  339. <div class="remodal" data-remodal-id="revisions" data-remodal-options="hashTracking: false">
  340. {% include ['partials/page-revisions.html.twig', 'empty.html.twig'] ignore missing with { data: context } %}
  341. </div>
  342. {% endif %}
  343. {% include 'partials/modal-changes-detected.html.twig' %}
  344. <div class="remodal" data-remodal-id="delete" data-remodal-options="hashTracking: false">
  345. <form>
  346. <h1>{{ "PLUGIN_ADMIN.MODAL_DELETE_PAGE_CONFIRMATION_REQUIRED_TITLE"|tu }}</h1>
  347. <p class="bigger">
  348. {% if context %}
  349. <strong>{{ "PLUGIN_ADMIN.PAGE"|tu }}: {{ context.title }}</strong>
  350. {% endif %}
  351. </p>
  352. <p class="bigger">
  353. {{ "PLUGIN_ADMIN.MODAL_DELETE_PAGE_CONFIRMATION_REQUIRED_DESC"|tu }}
  354. </p>
  355. <br>
  356. <div class="button-bar">
  357. <button data-remodal-action="cancel" class="button secondary remodal-cancel"><i class="fa fa-fw fa-close"></i> {{ "PLUGIN_ADMIN.CANCEL"|tu }}</button>
  358. <a class="button disable-after-click" data-delete-action href="#"><i class="fa fa-fw fa-check"></i> {{ "PLUGIN_ADMIN.CONTINUE"|tu }}</a>
  359. </div>
  360. </form>
  361. </div>
  362. {% include 'partials/admin-pro-pages-addons.html.twig' ignore missing %}
  363. {% endblock %}
  364. {% block bottom %}
  365. <script>
  366. {{ parent() }}
  367. $('.admin-pages .form-tabs .tabs-nav').css('margin-right', ($('#admin-topbar').width() + 20) + 'px');
  368. </script>
  369. {% endblock %}