ebb26371377726351e39fa62042644bee39971ef14fc2417888368101fc8bfea.php 95 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192939495969798991001011021031041051061071081091101111121131141151161171181191201211221231241251261271281291301311321331341351361371381391401411421431441451461471481491501511521531541551561571581591601611621631641651661671681691701711721731741751761771781791801811821831841851861871881891901911921931941951961971981992002012022032042052062072082092102112122132142152162172182192202212222232242252262272282292302312322332342352362372382392402412422432442452462472482492502512522532542552562572582592602612622632642652662672682692702712722732742752762772782792802812822832842852862872882892902912922932942952962972982993003013023033043053063073083093103113123133143153163173183193203213223233243253263273283293303313323333343353363373383393403413423433443453463473483493503513523533543553563573583593603613623633643653663673683693703713723733743753763773783793803813823833843853863873883893903913923933943953963973983994004014024034044054064074084094104114124134144154164174184194204214224234244254264274284294304314324334344354364374384394404414424434444454464474484494504514524534544554564574584594604614624634644654664674684694704714724734744754764774784794804814824834844854864874884894904914924934944954964974984995005015025035045055065075085095105115125135145155165175185195205215225235245255265275285295305315325335345355365375385395405415425435445455465475485495505515525535545555565575585595605615625635645655665675685695705715725735745755765775785795805815825835845855865875885895905915925935945955965975985996006016026036046056066076086096106116126136146156166176186196206216226236246256266276286296306316326336346356366376386396406416426436446456466476486496506516526536546556566576586596606616626636646656666676686696706716726736746756766776786796806816826836846856866876886896906916926936946956966976986997007017027037047057067077087097107117127137147157167177187197207217227237247257267277287297307317327337347357367377387397407417427437447457467477487497507517527537547557567577587597607617627637647657667677687697707717727737747757767777787797807817827837847857867877887897907917927937947957967977987998008018028038048058068078088098108118128138148158168178188198208218228238248258268278288298308318328338348358368378388398408418428438448458468478488498508518528538548558568578588598608618628638648658668678688698708718728738748758768778788798808818828838848858868878888898908918928938948958968978988999009019029039049059069079089099109119129139149159169179189199209219229239249259269279289299309319329339349359369379389399409419429439449459469479489499509519529539549559569579589599609619629639649659669679689699709719729739749759769779789799809819829839849859869879889899909919929939949959969979989991000100110021003100410051006100710081009101010111012101310141015101610171018101910201021102210231024102510261027102810291030103110321033103410351036103710381039104010411042104310441045104610471048104910501051105210531054105510561057105810591060106110621063106410651066106710681069107010711072107310741075107610771078107910801081108210831084108510861087108810891090109110921093109410951096109710981099110011011102110311041105110611071108110911101111111211131114111511161117111811191120112111221123112411251126112711281129113011311132113311341135113611371138113911401141114211431144114511461147114811491150115111521153115411551156115711581159116011611162116311641165116611671168116911701171117211731174117511761177117811791180118111821183118411851186118711881189119011911192119311941195119611971198119912001201120212031204120512061207120812091210121112121213121412151216121712181219122012211222122312241225122612271228122912301231123212331234123512361237123812391240124112421243124412451246124712481249125012511252125312541255125612571258125912601261126212631264126512661267126812691270127112721273127412751276127712781279128012811282128312841285128612871288128912901291129212931294129512961297129812991300130113021303130413051306130713081309131013111312131313141315131613171318131913201321132213231324132513261327132813291330133113321333133413351336133713381339134013411342134313441345134613471348134913501351135213531354135513561357135813591360136113621363136413651366136713681369137013711372137313741375137613771378137913801381138213831384138513861387138813891390139113921393139413951396139713981399140014011402140314041405140614071408140914101411141214131414141514161417141814191420142114221423142414251426142714281429143014311432143314341435143614371438143914401441144214431444144514461447144814491450145114521453145414551456145714581459146014611462146314641465146614671468146914701471147214731474147514761477147814791480148114821483148414851486148714881489149014911492149314941495149614971498149915001501150215031504150515061507150815091510151115121513151415151516151715181519152015211522152315241525152615271528152915301531153215331534153515361537153815391540154115421543154415451546154715481549155015511552155315541555155615571558155915601561156215631564156515661567
  1. <?php
  2. /* pages.html.twig */
  3. class __TwigTemplate_595debcc4b340cb1cbb4c52b820ffc56923fb2d39a4bcfb77a0c4e59c7bc90ab extends Twig_Template
  4. {
  5. public function __construct(Twig_Environment $env)
  6. {
  7. parent::__construct($env);
  8. // line 1
  9. $this->parent = $this->loadTemplate("partials/base.html.twig", "pages.html.twig", 1);
  10. $this->blocks = array(
  11. 'stylesheets' => array($this, 'block_stylesheets'),
  12. 'javascripts' => array($this, 'block_javascripts'),
  13. 'titlebar' => array($this, 'block_titlebar'),
  14. 'content' => array($this, 'block_content'),
  15. 'bottom' => array($this, 'block_bottom'),
  16. );
  17. }
  18. protected function doGetParent(array $context)
  19. {
  20. return "partials/base.html.twig";
  21. }
  22. protected function doDisplay(array $context, array $blocks = array())
  23. {
  24. // line 7
  25. if ($this->getAttribute(($context["admin"] ?? null), "route", array())) {
  26. // line 8
  27. $context["context"] = $this->getAttribute(($context["admin"] ?? null), "page", array(0 => true), "method");
  28. }
  29. // line 11
  30. if ($this->getAttribute(($context["uri"] ?? null), "param", array(0 => "new"), "method")) {
  31. // line 12
  32. $context["mode"] = "new";
  33. } elseif ( // line 13
  34. ($context["context"] ?? null)) {
  35. // line 14
  36. $context["mode"] = "edit";
  37. // line 15
  38. if ($this->getAttribute(($context["context"] ?? null), "exists", array())) {
  39. // line 16
  40. $context["page_url"] = ((($context["base_url"] ?? null) . "/pages") . (($this->getAttribute($this->getAttribute($this->getAttribute(($context["context"] ?? null), "header", array()), "routes", array()), "default", array())) ? ($this->getAttribute($this->getAttribute($this->getAttribute(($context["context"] ?? null), "header", array()), "routes", array()), "default", array())) : ($this->getAttribute(($context["context"] ?? null), "rawRoute", array()))));
  41. // line 17
  42. $context["exists"] = true;
  43. // line 18
  44. $context["title"] = (((($this->getAttribute(($context["context"] ?? null), "exists", array())) ? ($this->env->getExtension('Grav\Plugin\Admin\AdminTwigExtension')->tuFilter("PLUGIN_ADMIN.EDIT")) : ($this->env->getExtension('Grav\Plugin\Admin\AdminTwigExtension')->tuFilter("PLUGIN_ADMIN.CREATE"))) . " ") . (($this->getAttribute($this->getAttribute(($context["context"] ?? null), "header", array()), "title", array())) ? ($this->getAttribute($this->getAttribute(($context["context"] ?? null), "header", array()), "title", array())) : ($this->getAttribute(($context["context"] ?? null), "title", array()))));
  45. } else {
  46. // line 20
  47. $context["title"] = $this->env->getExtension('Grav\Plugin\Admin\AdminTwigExtension')->tuFilter("PLUGIN_ADMIN.ADD_PAGE");
  48. }
  49. } else {
  50. // line 23
  51. $context["mode"] = "list";
  52. // line 24
  53. $context["title"] = $this->env->getExtension('Grav\Plugin\Admin\AdminTwigExtension')->tuFilter("PLUGIN_ADMIN.PAGES");
  54. }
  55. // line 27
  56. $context["modular"] = (($this->getAttribute(($context["context"] ?? null), "modular", array())) ? ("modular_") : (""));
  57. // line 28
  58. $context["warn"] = $this->getAttribute($this->getAttribute($this->getAttribute($this->getAttribute(($context["config"] ?? null), "plugins", array()), "admin", array()), "warnings", array()), "delete_page", array());
  59. // line 29
  60. $context["admin_lang"] = (($this->getAttribute($this->getAttribute(($context["admin"] ?? null), "session", array()), "admin_lang", array())) ? ($this->getAttribute($this->getAttribute(($context["admin"] ?? null), "session", array()), "admin_lang", array())) : ("en"));
  61. // line 30
  62. $context["page_lang"] = $this->getAttribute(($context["context"] ?? null), "language", array());
  63. // line 31
  64. $context["type"] = "page";
  65. // line 44
  66. $context["preview_html"] = ((($this->env->getExtension('Grav\Common\Twig\TwigExtension')->rtrimFilter(($context["base_url_relative_frontend"] ?? null), "/") . (($this->getAttribute(($context["context"] ?? null), "home", array())) ? ("") : ($this->getAttribute(($context["context"] ?? null), "route", array()))))) ? (($this->env->getExtension('Grav\Common\Twig\TwigExtension')->rtrimFilter(($context["base_url_relative_frontend"] ?? null), "/") . (($this->getAttribute(($context["context"] ?? null), "home", array())) ? ("") : ($this->getAttribute(($context["context"] ?? null), "route", array()))))) : ("/"));
  67. // line 45
  68. $context["preview_target"] = $this->getAttribute($this->getAttribute($this->getAttribute(($context["config"] ?? null), "plugins", array()), "admin", array()), "frontend_pages_target", array());
  69. // line 46
  70. $context["preview_link"] = (($this->getAttribute(($context["context"] ?? null), "routable", array())) ? ((((((("<a class=\"button\" target=\"" . ($context["preview_target"] ?? null)) . "\" href=\"") . ($context["preview_html"] ?? null)) . "\" title=\"") . $this->env->getExtension('Grav\Plugin\Admin\AdminTwigExtension')->tuFilter("PLUGIN_ADMIN.PREVIEW")) . "\"> <i class=\"fa fa-fw fa-eye\" style=\"font-size:18px;margin-right:0;\"></i></a>")) : (""));
  71. // line 1
  72. $this->parent->display($context, array_merge($this->blocks, $blocks));
  73. }
  74. // line 33
  75. public function block_stylesheets($context, array $blocks = array())
  76. {
  77. // line 34
  78. echo " ";
  79. if ((($context["mode"] ?? null) == "edit")) {
  80. // line 35
  81. echo " ";
  82. $this->getAttribute(($context["assets"] ?? null), "addCss", array(0 => (($context["theme_url"] ?? null) . "/css/codemirror/codemirror.css")), "method");
  83. // line 36
  84. echo " ";
  85. }
  86. // line 37
  87. echo " ";
  88. $this->displayParentBlock("stylesheets", $context, $blocks);
  89. echo "
  90. ";
  91. }
  92. // line 40
  93. public function block_javascripts($context, array $blocks = array())
  94. {
  95. // line 41
  96. echo " ";
  97. $this->displayParentBlock("javascripts", $context, $blocks);
  98. echo "
  99. ";
  100. }
  101. // line 121
  102. public function block_titlebar($context, array $blocks = array())
  103. {
  104. // line 122
  105. echo " <div class=\"button-bar\">
  106. ";
  107. // line 123
  108. if ((($context["mode"] ?? null) == "list")) {
  109. // line 124
  110. echo " <a class=\"button\" href=\"";
  111. echo twig_escape_filter($this->env, ($context["base_url"] ?? null), "html", null, true);
  112. echo "\"><i class=\"fa fa-reply\"></i> ";
  113. echo twig_escape_filter($this->env, $this->env->getExtension('Grav\Plugin\Admin\AdminTwigExtension')->tuFilter("PLUGIN_ADMIN.BACK"), "html", null, true);
  114. echo "</a>
  115. ";
  116. // line 126
  117. $context['_parent'] = $context;
  118. $context['_seq'] = twig_ensure_traversable($this->getAttribute($this->getAttribute($this->getAttribute(($context["config"] ?? null), "plugins", array()), "admin", array()), "add_modals", array()));
  119. foreach ($context['_seq'] as $context["key"] => $context["add_modal"]) {
  120. // line 127
  121. echo " ";
  122. if (($this->env->getExtension('Grav\Common\Twig\TwigExtension')->definedDefaultFilter($this->getAttribute($context["add_modal"], "show_in", array()), "bar") == "bar")) {
  123. // line 128
  124. echo " <a class=\"button ";
  125. echo twig_escape_filter($this->env, $this->getAttribute($context["add_modal"], "link_classes", array()), "html", null, true);
  126. echo "\" href=\"#modal-add_modal-";
  127. echo twig_escape_filter($this->env, $context["key"], "html", null, true);
  128. echo "\" data-remodal-target=\"modal-add_modal-";
  129. echo twig_escape_filter($this->env, $context["key"], "html", null, true);
  130. echo "\"><i class=\"fa fa-plus\"></i> ";
  131. echo twig_escape_filter($this->env, $this->getAttribute($context["add_modal"], "label", array()), "html", null, true);
  132. echo "</a>
  133. ";
  134. }
  135. // line 130
  136. echo " ";
  137. }
  138. $_parent = $context['_parent'];
  139. unset($context['_seq'], $context['_iterated'], $context['key'], $context['add_modal'], $context['_parent'], $context['loop']);
  140. $context = array_intersect_key($context, $_parent) + $_parent;
  141. // line 131
  142. echo "
  143. <div class=\"button-group\">
  144. <button type=\"button\" class=\"button disabled\" href=\"#modal\" data-remodal-target=\"modal\">
  145. <i class=\"fa fa-plus\"></i> ";
  146. // line 134
  147. echo twig_escape_filter($this->env, $this->env->getExtension('Grav\Plugin\Admin\AdminTwigExtension')->tuFilter("PLUGIN_ADMIN.ADD"), "html", null, true);
  148. echo "
  149. </button>
  150. <button type=\"button\" class=\"button dropdown-toggle\" data-toggle=\"dropdown\">
  151. <i class=\"fa fa-caret-down\"></i>
  152. </button>
  153. <ul class=\"dropdown-menu\">
  154. <li><a class=\"button\" href=\"#modal\" data-remodal-target=\"modal\">";
  155. // line 140
  156. echo twig_escape_filter($this->env, $this->env->getExtension('Grav\Plugin\Admin\AdminTwigExtension')->tuFilter("PLUGIN_ADMIN.ADD_PAGE"), "html", null, true);
  157. echo "</a></li>
  158. <li><a class=\"button\" href=\"#modal-folder\" data-remodal-target=\"modal-folder\">";
  159. // line 141
  160. echo twig_escape_filter($this->env, $this->env->getExtension('Grav\Plugin\Admin\AdminTwigExtension')->tuFilter("PLUGIN_ADMIN.ADD_FOLDER"), "html", null, true);
  161. echo "</a></li>
  162. ";
  163. // line 142
  164. if ( !twig_test_empty($this->getAttribute(($context["admin"] ?? null), "modularTypes", array()))) {
  165. // line 143
  166. echo " <li><a class=\"button\" href=\"#modular\" data-remodal-target=\"modular\">";
  167. echo twig_escape_filter($this->env, $this->env->getExtension('Grav\Plugin\Admin\AdminTwigExtension')->tuFilter("PLUGIN_ADMIN.ADD_MODULAR"), "html", null, true);
  168. echo "</a></li>
  169. ";
  170. }
  171. // line 145
  172. echo " ";
  173. $context['_parent'] = $context;
  174. $context['_seq'] = twig_ensure_traversable($this->getAttribute($this->getAttribute($this->getAttribute(($context["config"] ?? null), "plugins", array()), "admin", array()), "add_modals", array()));
  175. foreach ($context['_seq'] as $context["key"] => $context["add_modal"]) {
  176. // line 146
  177. echo " ";
  178. if (($this->env->getExtension('Grav\Common\Twig\TwigExtension')->definedDefaultFilter($this->getAttribute($context["add_modal"], "show_in", array()), "bar") == "dropdown")) {
  179. // line 147
  180. echo " <li><a class=\"button ";
  181. echo twig_escape_filter($this->env, $this->getAttribute($context["add_modal"], "link_classes", array()), "html", null, true);
  182. echo "\" href=\"#modal-add_modal-";
  183. echo twig_escape_filter($this->env, $context["key"], "html", null, true);
  184. echo "\" data-remodal-target=\"modal-add_modal-";
  185. echo twig_escape_filter($this->env, $context["key"], "html", null, true);
  186. echo "\">";
  187. echo twig_escape_filter($this->env, $this->getAttribute($context["add_modal"], "label", array()), "html", null, true);
  188. echo "</a></li>
  189. ";
  190. }
  191. // line 149
  192. echo " ";
  193. }
  194. $_parent = $context['_parent'];
  195. unset($context['_seq'], $context['_iterated'], $context['key'], $context['add_modal'], $context['_parent'], $context['loop']);
  196. $context = array_intersect_key($context, $_parent) + $_parent;
  197. // line 150
  198. echo " </ul>
  199. </div>
  200. ";
  201. // line 153
  202. if ($this->getAttribute(($context["admin"] ?? null), "multilang", array())) {
  203. // line 154
  204. echo " <div class=\"button-group\">
  205. <button type=\"button\" class=\"button disabled\">
  206. <i class=\"fa fa-flag-o\"></i>
  207. ";
  208. // line 157
  209. $context["langName"] = $this->getAttribute($this->getAttribute(($context["admin"] ?? null), "siteLanguages", array()), ($context["admin_lang"] ?? null), array(), "array");
  210. // line 158
  211. echo " ";
  212. echo twig_escape_filter($this->env, (twig_upper_filter($this->env, twig_slice($this->env, ($context["langName"] ?? null), 0, 1)) . twig_slice($this->env, ($context["langName"] ?? null), 1, null)), "html", null, true);
  213. echo "
  214. </button>
  215. ";
  216. // line 160
  217. if ((twig_length_filter($this->env, $this->getAttribute(($context["admin"] ?? null), "languages_enabled", array())) > 1)) {
  218. // line 161
  219. echo " <button type=\"button\" class=\"button dropdown-toggle\" data-toggle=\"dropdown\">
  220. <i class=\"fa fa-caret-down\"></i>
  221. </button>
  222. <ul class=\"dropdown-menu language-switcher\">
  223. ";
  224. // line 165
  225. $context['_parent'] = $context;
  226. $context['_seq'] = twig_ensure_traversable($this->getAttribute(($context["admin"] ?? null), "languages_enabled", array()));
  227. foreach ($context['_seq'] as $context["_key"] => $context["langCode"]) {
  228. // line 166
  229. echo " ";
  230. $context["langName"] = $this->getAttribute($this->getAttribute(($context["admin"] ?? null), "siteLanguages", array()), $context["langCode"], array(), "array");
  231. // line 167
  232. echo " ";
  233. if (($context["langCode"] != ($context["admin_lang"] ?? null))) {
  234. // line 168
  235. echo " <li><a href=\"";
  236. echo twig_escape_filter($this->env, $this->getAttribute(($context["uri"] ?? null), "addNonce", array(0 => ((((((($context["base_url_relative"] ?? null) . $this->getAttribute(($context["theme"] ?? null), "slug", array())) . "/pages/task") . $this->getAttribute($this->getAttribute(($context["config"] ?? null), "system", array()), "param_sep", array())) . "switchlanguage/lang") . $this->getAttribute($this->getAttribute(($context["config"] ?? null), "system", array()), "param_sep", array())) . $context["langCode"]), 1 => "admin-form", 2 => "admin-nonce"), "method"), "html", null, true);
  237. echo "\">";
  238. echo twig_escape_filter($this->env, (twig_upper_filter($this->env, twig_slice($this->env, ($context["langName"] ?? null), 0, 1)) . twig_slice($this->env, ($context["langName"] ?? null), 1, null)), "html", null, true);
  239. echo "</a></li>
  240. ";
  241. }
  242. // line 170
  243. echo " ";
  244. }
  245. $_parent = $context['_parent'];
  246. unset($context['_seq'], $context['_iterated'], $context['_key'], $context['langCode'], $context['_parent'], $context['loop']);
  247. $context = array_intersect_key($context, $_parent) + $_parent;
  248. // line 171
  249. echo " </ul>
  250. ";
  251. }
  252. // line 173
  253. echo " </div>
  254. ";
  255. }
  256. // line 175
  257. echo "
  258. ";
  259. } elseif (( // line 176
  260. ($context["mode"] ?? null) == "edit")) {
  261. // line 177
  262. echo "
  263. ";
  264. // line 178
  265. echo ($context["preview_link"] ?? null);
  266. echo "
  267. <a class=\"button\" href=\"";
  268. // line 180
  269. echo twig_escape_filter($this->env, ($context["base_url"] ?? null), "html", null, true);
  270. echo "/pages\" title=\"";
  271. echo twig_escape_filter($this->env, $this->env->getExtension('Grav\Plugin\Admin\AdminTwigExtension')->tuFilter("PLUGIN_ADMIN.BACK"), "html", null, true);
  272. echo "\"><i class=\"fa fa-reply\"></i></a>
  273. ";
  274. // line 182
  275. $context["siblings"] = $this->getAttribute($this->getAttribute(($context["context"] ?? null), "parent", array(), "method"), "children", array(), "method");
  276. // line 183
  277. echo "
  278. ";
  279. // line 184
  280. if ( !$this->getAttribute(($context["siblings"] ?? null), "isFirst", array(0 => $this->getAttribute(($context["context"] ?? null), "path", array())), "method")) {
  281. // line 185
  282. echo " ";
  283. $context["sib"] = $this->getAttribute(($context["siblings"] ?? null), "nextSibling", array(0 => $this->getAttribute(($context["context"] ?? null), "path", array())), "method");
  284. // line 186
  285. echo " ";
  286. $context["sib_url"] = ((($context["base_url"] ?? null) . "/pages") . (($this->getAttribute($this->getAttribute($this->getAttribute(($context["sib"] ?? null), "header", array()), "routes", array()), "default", array())) ? ($this->getAttribute($this->getAttribute($this->getAttribute(($context["sib"] ?? null), "header", array()), "routes", array()), "default", array())) : ($this->getAttribute(($context["sib"] ?? null), "rawRoute", array()))));
  287. // line 187
  288. echo " <a class=\"button hidden-mobile\" href=\"";
  289. echo twig_escape_filter($this->env, ($context["sib_url"] ?? null), "html", null, true);
  290. echo "\" title=\"";
  291. echo twig_escape_filter($this->env, $this->env->getExtension('Grav\Plugin\Admin\AdminTwigExtension')->tuFilter("PLUGIN_ADMIN.PREVIOUS"), "html", null, true);
  292. echo "\"><i class=\"fa fa-chevron-left\"></i></a>
  293. ";
  294. }
  295. // line 189
  296. echo "
  297. ";
  298. // line 190
  299. if ( !$this->getAttribute(($context["siblings"] ?? null), "isLast", array(0 => $this->getAttribute(($context["context"] ?? null), "path", array())), "method")) {
  300. // line 191
  301. echo " ";
  302. $context["sib"] = $this->getAttribute(($context["siblings"] ?? null), "prevSibling", array(0 => $this->getAttribute(($context["context"] ?? null), "path", array())), "method");
  303. // line 192
  304. echo " ";
  305. $context["sib_url"] = ((($context["base_url"] ?? null) . "/pages") . (($this->getAttribute($this->getAttribute($this->getAttribute(($context["sib"] ?? null), "header", array()), "routes", array()), "default", array())) ? ($this->getAttribute($this->getAttribute($this->getAttribute(($context["sib"] ?? null), "header", array()), "routes", array()), "default", array())) : ($this->getAttribute(($context["sib"] ?? null), "rawRoute", array()))));
  306. // line 193
  307. echo " <a class=\"button hidden-mobile\" href=\"";
  308. echo twig_escape_filter($this->env, ($context["sib_url"] ?? null), "html", null, true);
  309. echo "\" title=\"";
  310. echo twig_escape_filter($this->env, $this->env->getExtension('Grav\Plugin\Admin\AdminTwigExtension')->tuFilter("PLUGIN_ADMIN.NEXT"), "html", null, true);
  311. echo "\"><i class=\"fa fa-chevron-right\"></i></a>
  312. ";
  313. }
  314. // line 195
  315. echo "
  316. ";
  317. // line 196
  318. if (($context["exists"] ?? null)) {
  319. // line 197
  320. echo " <div class=\"button-group\">
  321. <button type=\"button\" class=\"button disabled\" href=\"#modal\" data-remodal-target=\"modal\">
  322. <i class=\"fa fa-plus\"></i> ";
  323. // line 199
  324. echo twig_escape_filter($this->env, $this->env->getExtension('Grav\Plugin\Admin\AdminTwigExtension')->tuFilter("PLUGIN_ADMIN.ADD"), "html", null, true);
  325. echo "
  326. </button>
  327. <button type=\"button\" class=\"button dropdown-toggle\" data-toggle=\"dropdown\">
  328. <i class=\"fa fa-caret-down\"></i>
  329. </button>
  330. <ul class=\"dropdown-menu\">
  331. <li><a class=\"button\" href=\"#modal\" data-remodal-target=\"modal\">";
  332. // line 205
  333. echo twig_escape_filter($this->env, $this->env->getExtension('Grav\Plugin\Admin\AdminTwigExtension')->tuFilter("PLUGIN_ADMIN.ADD_PAGE"), "html", null, true);
  334. echo "</a></li>
  335. <li><a class=\"button\" href=\"#modal-folder\" data-remodal-target=\"modal-folder\">";
  336. // line 206
  337. echo twig_escape_filter($this->env, $this->env->getExtension('Grav\Plugin\Admin\AdminTwigExtension')->tuFilter("PLUGIN_ADMIN.ADD_FOLDER"), "html", null, true);
  338. echo "</a></li>
  339. ";
  340. // line 207
  341. if ( !twig_test_empty($this->getAttribute(($context["admin"] ?? null), "modularTypes", array()))) {
  342. // line 208
  343. echo " <li><a class=\"button\" href=\"#modular\" data-remodal-target=\"modular\">";
  344. echo twig_escape_filter($this->env, $this->env->getExtension('Grav\Plugin\Admin\AdminTwigExtension')->tuFilter("PLUGIN_ADMIN.ADD_MODULAR"), "html", null, true);
  345. echo "</a></li>
  346. ";
  347. }
  348. // line 210
  349. echo " </ul>
  350. </div>
  351. <a class=\"button disable-after-click\" href=\"";
  352. // line 213
  353. echo twig_escape_filter($this->env, $this->getAttribute(($context["uri"] ?? null), "addNonce", array(0 => (((($context["page_url"] ?? null) . "/task") . $this->getAttribute($this->getAttribute(($context["config"] ?? null), "system", array()), "param_sep", array())) . "copy"), 1 => "admin-form", 2 => "admin-nonce"), "method"), "html", null, true);
  354. echo "\" class=\"page-copy\" ><i class=\"fa fa-copy\"></i> ";
  355. echo twig_escape_filter($this->env, $this->env->getExtension('Grav\Plugin\Admin\AdminTwigExtension')->tuFilter("PLUGIN_ADMIN.COPY"), "html", null, true);
  356. echo "</a>
  357. <a class=\"button\" href=\"#\" data-remodal-target=\"move\"><i class=\"fa fa-arrows\"></i> ";
  358. // line 214
  359. echo twig_escape_filter($this->env, $this->env->getExtension('Grav\Plugin\Admin\AdminTwigExtension')->tuFilter("PLUGIN_ADMIN.MOVE"), "html", null, true);
  360. echo "</a>
  361. ";
  362. // line 215
  363. if ($this->getAttribute($this->getAttribute($this->getAttribute(($context["config"] ?? null), "plugins", array()), "admin-pro", array(), "array"), "enabled", array())) {
  364. // line 216
  365. echo " <a class=\"button\" href=\"#\" data-remodal-target=\"revisions\"><i class=\"fa fa-history\"></i> ";
  366. echo twig_escape_filter($this->env, $this->env->getExtension('Grav\Plugin\Admin\AdminTwigExtension')->tuFilter("PLUGIN_ADMIN_PRO.REVISIONS"), "html", null, true);
  367. echo "</a>
  368. ";
  369. }
  370. // line 218
  371. echo " ";
  372. if (($context["warn"] ?? null)) {
  373. // line 219
  374. echo " <a class=\"button\" href=\"#delete\" data-remodal-target=\"delete\" data-delete-url=\"";
  375. echo twig_escape_filter($this->env, $this->getAttribute(($context["uri"] ?? null), "addNonce", array(0 => (((($context["page_url"] ?? null) . "/task") . $this->getAttribute($this->getAttribute(($context["config"] ?? null), "system", array()), "param_sep", array())) . "delete"), 1 => "admin-form", 2 => "admin-nonce"), "method"), "html", null, true);
  376. echo "\"><i class=\"fa fa-close\"></i> ";
  377. echo twig_escape_filter($this->env, $this->env->getExtension('Grav\Plugin\Admin\AdminTwigExtension')->tuFilter("PLUGIN_ADMIN.DELETE"), "html", null, true);
  378. echo "</a>
  379. ";
  380. } else {
  381. // line 221
  382. echo " <a class=\"button disable-after-click\" href=\"";
  383. echo twig_escape_filter($this->env, $this->getAttribute(($context["uri"] ?? null), "addNonce", array(0 => ((($this->getAttribute(($context["uri"] ?? null), "route", array(0 => true), "method") . "/task") . $this->getAttribute($this->getAttribute(($context["config"] ?? null), "system", array()), "param_sep", array())) . "delete"), 1 => "admin-form", 2 => "admin-nonce"), "method"), "html", null, true);
  384. echo "\" class=\"page-delete\" ><i class=\"fa fa-close\"></i></a>
  385. ";
  386. }
  387. // line 223
  388. echo " ";
  389. }
  390. // line 224
  391. echo "
  392. <div class=\"button-group\">
  393. <button class=\"button\" name=\"task\" value=\"save\" form=\"blueprints\" type=\"submit\"><i class=\"fa fa-check\"></i> ";
  394. // line 226
  395. echo twig_escape_filter($this->env, $this->env->getExtension('Grav\Plugin\Admin\AdminTwigExtension')->tuFilter("PLUGIN_ADMIN.SAVE"), "html", null, true);
  396. echo "</button>
  397. ";
  398. // line 227
  399. if ((($context["exists"] ?? null) && $this->getAttribute(($context["admin"] ?? null), "multilang", array()))) {
  400. // line 228
  401. echo " ";
  402. if ($this->getAttribute(($context["context"] ?? null), "untranslatedLanguages", array())) {
  403. // line 229
  404. echo " <button type=\"button\" class=\"button dropdown-toggle\" data-toggle=\"dropdown\">
  405. <i class=\"fa fa-caret-down\"></i>
  406. </button>
  407. <ul class=\"dropdown-menu lang-switcher\">
  408. ";
  409. // line 233
  410. $context['_parent'] = $context;
  411. $context['_seq'] = twig_ensure_traversable($this->getAttribute(($context["context"] ?? null), "untranslatedLanguages", array()));
  412. foreach ($context['_seq'] as $context["_key"] => $context["langCode"]) {
  413. // line 234
  414. echo " ";
  415. $context["langName"] = $this->getAttribute($this->getAttribute(($context["admin"] ?? null), "siteLanguages", array()), $context["langCode"], array(), "array");
  416. // line 235
  417. echo " ";
  418. if (($context["langCode"] != ($context["page_lang"] ?? null))) {
  419. // line 236
  420. echo " <li><button class=\"button task\" name=\"task\" value=\"saveas\" lang=\"";
  421. echo twig_escape_filter($this->env, $context["langCode"], "html", null, true);
  422. echo "\" form=\"blueprints\" type=\"submit\">";
  423. echo twig_escape_filter($this->env, $this->env->getExtension('Grav\Plugin\Admin\AdminTwigExtension')->tuFilter("PLUGIN_ADMIN.SAVE_AS"), "html", null, true);
  424. echo " ";
  425. echo twig_escape_filter($this->env, (twig_upper_filter($this->env, twig_slice($this->env, ($context["langName"] ?? null), 0, 1)) . twig_slice($this->env, ($context["langName"] ?? null), 1, null)), "html", null, true);
  426. echo "</button>
  427. ";
  428. }
  429. // line 238
  430. echo " ";
  431. }
  432. $_parent = $context['_parent'];
  433. unset($context['_seq'], $context['_iterated'], $context['_key'], $context['langCode'], $context['_parent'], $context['loop']);
  434. $context = array_intersect_key($context, $_parent) + $_parent;
  435. // line 239
  436. echo " </ul>
  437. ";
  438. }
  439. // line 241
  440. echo " ";
  441. }
  442. // line 242
  443. echo " </div>
  444. ";
  445. }
  446. // line 246
  447. echo " </div>
  448. ";
  449. // line 247
  450. if ((($context["mode"] ?? null) == "new")) {
  451. // line 248
  452. echo " <h1><i class=\"fa fa-fw fa-file-text-o\"></i> ";
  453. echo twig_escape_filter($this->env, $this->env->getExtension('Grav\Plugin\Admin\AdminTwigExtension')->tuFilter("PLUGIN_ADMIN.ADD_PAGE"), "html", null, true);
  454. echo "</h1>
  455. ";
  456. } elseif (( // line 249
  457. ($context["mode"] ?? null) == "edit")) {
  458. // line 250
  459. echo " <h1><i class=\"fa fa-fw fa-file-text-o\"></i>
  460. ";
  461. // line 251
  462. echo twig_escape_filter($this->env, $this->getAttribute(($context["context"] ?? null), "menu", array()), "html", null, true);
  463. echo "
  464. </h1>
  465. ";
  466. } else {
  467. // line 254
  468. echo " <h1><i class=\"fa fa-fw fa-file-text-o\"></i> ";
  469. echo twig_escape_filter($this->env, $this->env->getExtension('Grav\Plugin\Admin\AdminTwigExtension')->tuFilter("PLUGIN_ADMIN.MANAGE_PAGES"), "html", null, true);
  470. echo "</h1>
  471. ";
  472. }
  473. }
  474. // line 258
  475. public function block_content($context, array $blocks = array())
  476. {
  477. // line 259
  478. echo " <div class=\"clear admin-pages\">
  479. ";
  480. // line 260
  481. if ((($context["mode"] ?? null) == "new")) {
  482. // line 261
  483. echo " ";
  484. $this->loadTemplate("partials/blueprints-new.html.twig", "pages.html.twig", 261)->display(array_merge($context, array("blueprints" => $this->getAttribute(($context["admin"] ?? null), "blueprints", array(0 => "pages/page"), "method"), "data" => ($context["context"] ?? null))));
  485. // line 262
  486. echo " ";
  487. } elseif ((($context["mode"] ?? null) == "edit")) {
  488. // line 263
  489. echo " <div class=\"admin-form-wrapper\">
  490. <div id=\"admin-topbar\">
  491. ";
  492. // line 266
  493. if (($this->getAttribute(($context["admin"] ?? null), "multilang", array()) && ($context["page_lang"] ?? null))) {
  494. // line 267
  495. echo " <div id=\"admin-lang-toggle\" class=\"button-group\">
  496. <button type=\"button\" class=\"button disabled\">
  497. ";
  498. // line 269
  499. if (($context["exists"] ?? null)) {
  500. // line 270
  501. echo " ";
  502. echo twig_escape_filter($this->env, ($context["page_lang"] ?? null), "html", null, true);
  503. echo "
  504. ";
  505. } else {
  506. // line 272
  507. echo " ";
  508. echo twig_escape_filter($this->env, ($context["admin_lang"] ?? null), "html", null, true);
  509. echo "
  510. ";
  511. }
  512. // line 274
  513. echo " </button>
  514. ";
  515. // line 275
  516. if ((($context["exists"] ?? null) && (twig_length_filter($this->env, $this->getAttribute(($context["context"] ?? null), "translatedLanguages", array())) > 1))) {
  517. // line 276
  518. echo " <button type=\"button\" class=\"button dropdown-toggle\" data-toggle=\"dropdown\">
  519. <i class=\"fa fa-caret-down\"></i>
  520. </button>
  521. <ul class=\"dropdown-menu language-switcher\">
  522. ";
  523. // line 280
  524. $context['_parent'] = $context;
  525. $context['_seq'] = twig_ensure_traversable($this->getAttribute(($context["context"] ?? null), "translatedLanguages", array()));
  526. foreach ($context['_seq'] as $context["language"] => $context["route"]) {
  527. // line 281
  528. echo " ";
  529. if (($context["language"] != ($context["page_lang"] ?? null))) {
  530. // line 282
  531. echo " <li><button class=\"task\" name=\"task\" value=\"switchlanguage\" lang=\"";
  532. echo twig_escape_filter($this->env, $context["language"], "html", null, true);
  533. echo "\" redirect=\"";
  534. echo twig_escape_filter($this->env, twig_trim_filter($this->getAttribute(($context["context"] ?? null), "rawRoute", array()), "/"), "html", null, true);
  535. echo "\" form=\"blueprints\">";
  536. echo twig_escape_filter($this->env, $context["language"], "html", null, true);
  537. echo "</button>
  538. ";
  539. }
  540. // line 284
  541. echo " ";
  542. }
  543. $_parent = $context['_parent'];
  544. unset($context['_seq'], $context['_iterated'], $context['language'], $context['route'], $context['_parent'], $context['loop']);
  545. $context = array_intersect_key($context, $_parent) + $_parent;
  546. // line 285
  547. echo " </ul>
  548. ";
  549. }
  550. // line 287
  551. echo " </div>
  552. ";
  553. }
  554. // line 289
  555. echo "
  556. ";
  557. // line 290
  558. if ($this->getAttribute($this->getAttribute(($context["context"] ?? null), "blueprints", array()), "fields", array())) {
  559. // line 291
  560. echo " ";
  561. $context["normalText"] = $this->env->getExtension('Grav\Plugin\Admin\AdminTwigExtension')->tuFilter("PLUGIN_ADMIN.NORMAL");
  562. // line 292
  563. echo " ";
  564. $context["expertText"] = $this->env->getExtension('Grav\Plugin\Admin\AdminTwigExtension')->tuFilter("PLUGIN_ADMIN.EXPERT");
  565. // line 293
  566. echo " ";
  567. $context["maxLen"] = max(array(0 => twig_length_filter($this->env, ($context["normalText"] ?? null)), 1 => twig_length_filter($this->env, ($context["expertText"] ?? null))));
  568. // line 294
  569. echo " ";
  570. $context["normalText"] = $this->getAttribute($this, "spanToggle", array(0 => ($context["normalText"] ?? null), 1 => ($context["maxLen"] ?? null)), "method");
  571. // line 295
  572. echo " ";
  573. $context["expertText"] = $this->getAttribute($this, "spanToggle", array(0 => ($context["expertText"] ?? null), 1 => ($context["maxLen"] ?? null)), "method");
  574. // line 296
  575. echo " <form id=\"admin-mode-toggle\">
  576. <div class=\"switch-toggle switch-grav\">
  577. <input type=\"radio\" value=\"normal\" data-leave-url=\"";
  578. // line 298
  579. echo twig_escape_filter($this->env, ($context["base_url"] ?? null), "html", null, true);
  580. echo "/pages/";
  581. echo twig_escape_filter($this->env, twig_trim_filter($this->getAttribute(($context["admin"] ?? null), "route", array()), "/"), "html", null, true);
  582. echo "/mode";
  583. echo twig_escape_filter($this->env, $this->getAttribute($this->getAttribute(($context["config"] ?? null), "system", array()), "param_sep", array()), "html", null, true);
  584. echo "normal\" id=\"normal\" name=\"mode-switch\" class=\"highlight\" ";
  585. if (($this->getAttribute($this->getAttribute(($context["admin"] ?? null), "session", array()), "expert", array()) == "0")) {
  586. echo " checked=\"checked\"";
  587. }
  588. echo ">
  589. <label for=\"normal\">";
  590. // line 299
  591. echo ($context["normalText"] ?? null);
  592. echo "</label>
  593. <input type=\"radio\" value=\"expert\" data-leave-url=\"";
  594. // line 300
  595. echo twig_escape_filter($this->env, ($context["base_url"] ?? null), "html", null, true);
  596. echo "/pages/";
  597. echo twig_escape_filter($this->env, twig_trim_filter($this->getAttribute(($context["admin"] ?? null), "route", array()), "/"), "html", null, true);
  598. echo "/mode";
  599. echo twig_escape_filter($this->env, $this->getAttribute($this->getAttribute(($context["config"] ?? null), "system", array()), "param_sep", array()), "html", null, true);
  600. echo "expert\" id=\"expert\" name=\"mode-switch\" class=\"highlight\" ";
  601. if (($this->getAttribute($this->getAttribute(($context["admin"] ?? null), "session", array()), "expert", array()) == "1")) {
  602. echo " checked=\"checked\"";
  603. }
  604. echo ">
  605. <label for=\"expert\">";
  606. // line 301
  607. echo ($context["expertText"] ?? null);
  608. echo "</label>
  609. <a></a>
  610. </div>
  611. </form>
  612. ";
  613. }
  614. // line 306
  615. echo "
  616. </div>
  617. ";
  618. // line 309
  619. if (($this->getAttribute($this->getAttribute(($context["context"] ?? null), "blueprints", array()), "fields", array()) && ($this->getAttribute($this->getAttribute(($context["admin"] ?? null), "session", array()), "expert", array()) == "0"))) {
  620. // line 310
  621. echo " ";
  622. $this->loadTemplate("partials/blueprints.html.twig", "pages.html.twig", 310)->display(array_merge($context, array("blueprints" => $this->getAttribute(($context["context"] ?? null), "blueprints", array()), "data" => ($context["context"] ?? null))));
  623. // line 311
  624. echo " ";
  625. } else {
  626. // line 312
  627. echo " ";
  628. $this->loadTemplate("partials/blueprints-raw.html.twig", "pages.html.twig", 312)->display(array_merge($context, array("blueprints" => $this->getAttribute(($context["admin"] ?? null), "blueprints", array(0 => (("admin/pages/" . ($context["modular"] ?? null)) . "raw")), "method"), "data" => ($context["context"] ?? null))));
  629. // line 313
  630. echo " ";
  631. }
  632. // line 314
  633. echo " </div>
  634. ";
  635. } else {
  636. // line 316
  637. echo " <form id=\"page-filtering\">
  638. <div class=\"page-filters\">
  639. <input type=\"text\" data-filter-labels=\"";
  640. // line 318
  641. echo twig_escape_filter($this->env, twig_jsonencode_filter(array(0 => array("id" => "mode", "name" => $this->env->getExtension('Grav\Plugin\Admin\AdminTwigExtension')->tuFilter("PLUGIN_ADMIN.PAGE_MODES")), 1 => array("id" => "type", "name" => $this->env->getExtension('Grav\Plugin\Admin\AdminTwigExtension')->tuFilter("PLUGIN_ADMIN.PAGE_TYPES")), 2 => array("id" => "access", "name" => $this->env->getExtension('Grav\Plugin\Admin\AdminTwigExtension')->tuFilter("PLUGIN_ADMIN.ACCESS_LEVELS")))), "html_attr");
  642. echo "\" data-filter-types=\"";
  643. echo twig_escape_filter($this->env, twig_jsonencode_filter(twig_array_merge($this->getAttribute(($context["admin"] ?? null), "types", array()), $this->getAttribute(($context["admin"] ?? null), "modularTypes", array()))), "html_attr");
  644. echo "\" data-filter-access-levels=\"";
  645. echo twig_escape_filter($this->env, twig_jsonencode_filter($this->getAttribute(($context["admin"] ?? null), "accessLevels", array())), "html_attr");
  646. echo "\" placeholder=\"";
  647. echo twig_escape_filter($this->env, $this->env->getExtension('Grav\Plugin\Admin\AdminTwigExtension')->tuFilter("PLUGIN_ADMIN.ADD_FILTERS"), "html", null, true);
  648. echo "\" class=\"page-filter\" name=\"page-filter\" />
  649. </div>
  650. <div class=\"page-search\">
  651. <input type=\"text\" placeholder=\"";
  652. // line 321
  653. echo twig_escape_filter($this->env, $this->env->getExtension('Grav\Plugin\Admin\AdminTwigExtension')->tuFilter("PLUGIN_ADMIN.SEARCH_PAGES"), "html", null, true);
  654. echo "\" name=\"page-search\" />
  655. </div>
  656. <div class=\"page-shortcuts\">
  657. <span class=\"button button-x-small\" data-page-toggleall=\"expand\"><i class=\"fa fa-fw fa-plus-circle\"></i> ";
  658. // line 324
  659. echo twig_escape_filter($this->env, $this->env->getExtension('Grav\Plugin\Admin\AdminTwigExtension')->tuFilter("PLUGIN_ADMIN.EXPAND_ALL"), "html", null, true);
  660. echo "</span>
  661. <span class=\"button button-x-small\" data-page-toggleall=\"collapse\"><i class=\"fa fa-fw fa-minus-circle\"></i> ";
  662. // line 325
  663. echo twig_escape_filter($this->env, $this->env->getExtension('Grav\Plugin\Admin\AdminTwigExtension')->tuFilter("PLUGIN_ADMIN.COLLAPSE_ALL"), "html", null, true);
  664. echo "</span>
  665. </div>
  666. </form>
  667. <div class=\"pages-list\">
  668. <ul class=\"depth-0\">
  669. ";
  670. // line 330
  671. echo $this->getAttribute($this, "loop", array(0 => ($context["pages"] ?? null), 1 => 0, 2 => $context), "method");
  672. echo "
  673. </ul>
  674. ";
  675. // line 332
  676. $this->loadTemplate("partials/page-legend.html.twig", "pages.html.twig", 332)->display($context);
  677. // line 333
  678. echo " </div>
  679. ";
  680. }
  681. // line 335
  682. echo " </div>
  683. ";
  684. // line 337
  685. if (($context["context"] ?? null)) {
  686. // line 338
  687. echo " ";
  688. $context["obj_data"] = $this->env->getExtension('Grav\Plugin\Admin\AdminTwigExtension')->cloneFunc(($context["context"] ?? null));
  689. // line 339
  690. echo "
  691. ";
  692. // line 340
  693. if ((($context["mode"] ?? null) == "edit")) {
  694. // line 341
  695. echo " ";
  696. $this->getAttribute(($context["obj_data"] ?? null), "folder", array(0 => ""), "method");
  697. // line 342
  698. echo " ";
  699. }
  700. // line 343
  701. echo " ";
  702. }
  703. // line 344
  704. echo "
  705. ";
  706. // line 345
  707. if (((($context["mode"] ?? null) == "list") || (($context["mode"] ?? null) == "edit"))) {
  708. // line 346
  709. echo " <div class=\"remodal\" data-remodal-id=\"modal\" data-remodal-options=\"hashTracking: false\">
  710. ";
  711. // line 347
  712. $this->loadTemplate("partials/blueprints-new.html.twig", "pages.html.twig", 347)->display(array_merge($context, array("blueprints" => $this->getAttribute(($context["admin"] ?? null), "blueprints", array(0 => "admin/pages/new"), "method"), "data" => ($context["obj_data"] ?? null), "form_id" => "new-page")));
  713. // line 348
  714. echo " </div>
  715. <div class=\"remodal\" data-remodal-id=\"modal-folder\" data-remodal-options=\"hashTracking: false\">
  716. ";
  717. // line 351
  718. $this->loadTemplate("partials/blueprints-new-folder.html.twig", "pages.html.twig", 351)->display(array_merge($context, array("blueprints" => $this->getAttribute(($context["admin"] ?? null), "blueprints", array(0 => "admin/pages/new_folder"), "method"), "data" => ($context["obj_data"] ?? null), "form_id" => "new-folder")));
  719. // line 352
  720. echo " </div>
  721. <div class=\"remodal\" data-remodal-id=\"modular\" data-remodal-options=\"hashTracking: false\">
  722. ";
  723. // line 355
  724. $this->loadTemplate("partials/blueprints-new.html.twig", "pages.html.twig", 355)->display(array_merge($context, array("blueprints" => $this->getAttribute(($context["admin"] ?? null), "blueprints", array(0 => "admin/pages/modular_new"), "method"), "data" => ($context["obj_data"] ?? null), "form_id" => "new-modular")));
  725. // line 356
  726. echo " </div>
  727. ";
  728. // line 358
  729. $context['_parent'] = $context;
  730. $context['_seq'] = twig_ensure_traversable($this->getAttribute($this->getAttribute($this->getAttribute(($context["config"] ?? null), "plugins", array()), "admin", array()), "add_modals", array()));
  731. $context['loop'] = array(
  732. 'parent' => $context['_parent'],
  733. 'index0' => 0,
  734. 'index' => 1,
  735. 'first' => true,
  736. );
  737. if (is_array($context['_seq']) || (is_object($context['_seq']) && $context['_seq'] instanceof Countable)) {
  738. $length = count($context['_seq']);
  739. $context['loop']['revindex0'] = $length - 1;
  740. $context['loop']['revindex'] = $length;
  741. $context['loop']['length'] = $length;
  742. $context['loop']['last'] = 1 === $length;
  743. }
  744. foreach ($context['_seq'] as $context["key"] => $context["add_modal"]) {
  745. // line 359
  746. echo " <div class=\"remodal ";
  747. echo twig_escape_filter($this->env, $this->env->getExtension('Grav\Common\Twig\TwigExtension')->definedDefaultFilter($this->getAttribute($context["add_modal"], "modal_classes", array()), ""), "html", null, true);
  748. echo "\" data-remodal-id=\"modal-add_modal-";
  749. echo twig_escape_filter($this->env, $context["key"], "html", null, true);
  750. echo "\" data-remodal-options=\"hashTracking: false\">
  751. ";
  752. // line 360
  753. $this->loadTemplate($this->env->getExtension('Grav\Common\Twig\TwigExtension')->definedDefaultFilter($this->getAttribute($context["add_modal"], "template", array()), "partials/blueprints-new.html.twig"), "pages.html.twig", 360)->display(array_merge($context, twig_array_merge(array("blueprints" => $this->getAttribute(($context["admin"] ?? null), "blueprints", array(0 => $this->getAttribute($context["add_modal"], "blueprint", array())), "method"), "data" => ($context["context"] ?? null), "form_id" => "add-modal"), $this->env->getExtension('Grav\Common\Twig\TwigExtension')->definedDefaultFilter($this->getAttribute($context["add_modal"], "with", array()), array()))));
  754. // line 361
  755. echo " </div>
  756. ";
  757. ++$context['loop']['index0'];
  758. ++$context['loop']['index'];
  759. $context['loop']['first'] = false;
  760. if (isset($context['loop']['length'])) {
  761. --$context['loop']['revindex0'];
  762. --$context['loop']['revindex'];
  763. $context['loop']['last'] = 0 === $context['loop']['revindex0'];
  764. }
  765. }
  766. $_parent = $context['_parent'];
  767. unset($context['_seq'], $context['_iterated'], $context['key'], $context['add_modal'], $context['_parent'], $context['loop']);
  768. $context = array_intersect_key($context, $_parent) + $_parent;
  769. // line 363
  770. echo " ";
  771. }
  772. // line 364
  773. echo "
  774. ";
  775. // line 366
  776. if ((($context["mode"] ?? null) == "edit")) {
  777. // line 367
  778. echo " <div class=\"remodal\" data-remodal-id=\"move\" data-remodal-options=\"hashTracking: false\">
  779. ";
  780. // line 369
  781. $this->loadTemplate("partials/page-move.html.twig", "pages.html.twig", 369)->display(array_merge($context, array("blueprints" => $this->getAttribute(($context["admin"] ?? null), "blueprints", array(0 => "admin/pages/move"), "method"), "data" => ($context["context"] ?? null))));
  782. // line 370
  783. echo " </div>
  784. <div class=\"remodal\" data-remodal-id=\"revisions\" data-remodal-options=\"hashTracking: false\">
  785. ";
  786. // line 372
  787. try {
  788. $this->loadTemplate(array(0 => "partials/page-revisions.html.twig", 1 => "empty.html.twig"), "pages.html.twig", 372)->display(array_merge($context, array("data" => ($context["context"] ?? null))));
  789. } catch (Twig_Error_Loader $e) {
  790. // ignore missing template
  791. }
  792. // line 373
  793. echo " </div>
  794. ";
  795. }
  796. // line 375
  797. echo "
  798. ";
  799. // line 376
  800. $this->loadTemplate("partials/modal-changes-detected.html.twig", "pages.html.twig", 376)->display($context);
  801. // line 377
  802. echo "
  803. <div class=\"remodal\" data-remodal-id=\"delete\" data-remodal-options=\"hashTracking: false\">
  804. <form>
  805. <h1>";
  806. // line 380
  807. echo twig_escape_filter($this->env, $this->env->getExtension('Grav\Plugin\Admin\AdminTwigExtension')->tuFilter("PLUGIN_ADMIN.MODAL_DELETE_PAGE_CONFIRMATION_REQUIRED_TITLE"), "html", null, true);
  808. echo "</h1>
  809. <p class=\"bigger\">
  810. ";
  811. // line 382
  812. if (($context["context"] ?? null)) {
  813. // line 383
  814. echo " <strong>";
  815. echo twig_escape_filter($this->env, $this->env->getExtension('Grav\Plugin\Admin\AdminTwigExtension')->tuFilter("PLUGIN_ADMIN.PAGE"), "html", null, true);
  816. echo ": ";
  817. echo twig_escape_filter($this->env, $this->getAttribute(($context["context"] ?? null), "title", array()), "html", null, true);
  818. echo "</strong>
  819. ";
  820. }
  821. // line 385
  822. echo " </p>
  823. <p class=\"bigger\">
  824. ";
  825. // line 387
  826. echo twig_escape_filter($this->env, $this->env->getExtension('Grav\Plugin\Admin\AdminTwigExtension')->tuFilter("PLUGIN_ADMIN.MODAL_DELETE_PAGE_CONFIRMATION_REQUIRED_DESC"), "html", null, true);
  827. echo "
  828. </p>
  829. <br>
  830. <div class=\"button-bar\">
  831. <button data-remodal-action=\"cancel\" class=\"button secondary remodal-cancel\"><i class=\"fa fa-fw fa-close\"></i> ";
  832. // line 391
  833. echo twig_escape_filter($this->env, $this->env->getExtension('Grav\Plugin\Admin\AdminTwigExtension')->tuFilter("PLUGIN_ADMIN.CANCEL"), "html", null, true);
  834. echo "</button>
  835. <a class=\"button disable-after-click\" data-delete-action href=\"#\"><i class=\"fa fa-fw fa-check\"></i> ";
  836. // line 392
  837. echo twig_escape_filter($this->env, $this->env->getExtension('Grav\Plugin\Admin\AdminTwigExtension')->tuFilter("PLUGIN_ADMIN.CONTINUE"), "html", null, true);
  838. echo "</a>
  839. </div>
  840. </form>
  841. </div>
  842. ";
  843. // line 397
  844. try {
  845. $this->loadTemplate("partials/admin-pro-pages-addons.html.twig", "pages.html.twig", 397)->display($context);
  846. } catch (Twig_Error_Loader $e) {
  847. // ignore missing template
  848. }
  849. // line 398
  850. echo "
  851. ";
  852. }
  853. // line 401
  854. public function block_bottom($context, array $blocks = array())
  855. {
  856. // line 402
  857. echo "<script>
  858. \$('.admin-pages .form-tabs .tabs-nav').css('margin-right', (\$('#admin-topbar').width() + 20) + 'px');
  859. </script>
  860. ";
  861. }
  862. // line 3
  863. public function getspanToggle($__input__ = null, $__length__ = null, ...$__varargs__)
  864. {
  865. $context = $this->env->mergeGlobals(array(
  866. "input" => $__input__,
  867. "length" => $__length__,
  868. "varargs" => $__varargs__,
  869. ));
  870. $blocks = array();
  871. ob_start();
  872. try {
  873. // line 4
  874. echo " ";
  875. echo (($this->env->getExtension('Grav\Common\Twig\TwigExtension')->repeatFunc("&nbsp;&nbsp;", ((($context["length"] ?? null) - twig_length_filter($this->env, ($context["input"] ?? null))) / 2)) . ($context["input"] ?? null)) . $this->env->getExtension('Grav\Common\Twig\TwigExtension')->repeatFunc("&nbsp;&nbsp;", ((($context["length"] ?? null) - twig_length_filter($this->env, ($context["input"] ?? null))) / 2)));
  876. echo "
  877. ";
  878. } catch (Exception $e) {
  879. ob_end_clean();
  880. throw $e;
  881. } catch (Throwable $e) {
  882. ob_end_clean();
  883. throw $e;
  884. }
  885. return ('' === $tmp = ob_get_clean()) ? '' : new Twig_Markup($tmp, $this->env->getCharset());
  886. }
  887. // line 48
  888. public function getloop($__page__ = null, $__depth__ = null, $__twig_vars__ = null, ...$__varargs__)
  889. {
  890. $context = $this->env->mergeGlobals(array(
  891. "page" => $__page__,
  892. "depth" => $__depth__,
  893. "twig_vars" => $__twig_vars__,
  894. "varargs" => $__varargs__,
  895. ));
  896. $blocks = array();
  897. ob_start();
  898. try {
  899. // line 49
  900. echo " ";
  901. $context["separator"] = $this->getAttribute($this->getAttribute($this->getAttribute(($context["twig_vars"] ?? null), "config", array(), "array"), "system", array()), "param_sep", array());
  902. // line 50
  903. echo " ";
  904. $context["display_field"] = $this->getAttribute($this->getAttribute($this->getAttribute($this->getAttribute(($context["twig_vars"] ?? null), "config", array(), "array"), "plugins", array()), "admin", array()), "pages_list_display_field", array());
  905. // line 51
  906. echo " ";
  907. $context["base_url"] = $this->getAttribute(($context["twig_vars"] ?? null), "base_url_relative", array(), "array");
  908. // line 52
  909. echo " ";
  910. $context["base_url_simple"] = $this->getAttribute(($context["twig_vars"] ?? null), "base_url_simple", array(), "array");
  911. // line 53
  912. echo " ";
  913. $context["admin_route"] = $this->getAttribute(($context["twig_vars"] ?? null), "admin_route", array(), "array");
  914. // line 54
  915. echo " ";
  916. $context["admin_lang"] = $this->getAttribute(($context["twig_vars"] ?? null), "admin_lang", array(), "array");
  917. // line 55
  918. echo " ";
  919. $context["warn"] = $this->getAttribute(($context["twig_vars"] ?? null), "warn", array(), "array");
  920. // line 56
  921. echo " ";
  922. $context["uri"] = $this->getAttribute(($context["twig_vars"] ?? null), "uri", array(), "array");
  923. // line 57
  924. echo "
  925. ";
  926. // line 58
  927. if ((($this->getAttribute($this->getAttribute($this->getAttribute(($context["page"] ?? null), "header", array()), "admin", array()), "children_display_order", array()) == "collection") && $this->getAttribute($this->getAttribute($this->getAttribute($this->getAttribute(($context["page"] ?? null), "header", array()), "content", array()), "order", array()), "by", array()))) {
  928. // line 59
  929. echo " ";
  930. if ($this->getAttribute($this->getAttribute($this->getAttribute($this->getAttribute(($context["page"] ?? null), "header", array()), "content", array()), "order", array()), "custom", array())) {
  931. // line 60
  932. echo " ";
  933. $context["pcol"] = $this->getAttribute($this->getAttribute(($context["page"] ?? null), "children", array(), "method"), "order", array(0 => $this->getAttribute($this->getAttribute($this->getAttribute($this->getAttribute(($context["page"] ?? null), "header", array()), "content", array()), "order", array()), "by", array()), 1 => (($this->getAttribute($this->getAttribute($this->getAttribute($this->getAttribute(($context["page"] ?? null), "header", array(), "any", false, true), "content", array(), "any", false, true), "order", array(), "any", false, true), "dir", array(), "any", true, true)) ? (_twig_default_filter($this->getAttribute($this->getAttribute($this->getAttribute($this->getAttribute(($context["page"] ?? null), "header", array(), "any", false, true), "content", array(), "any", false, true), "order", array(), "any", false, true), "dir", array()), "asc")) : ("asc")), 2 => $this->getAttribute($this->getAttribute($this->getAttribute($this->getAttribute(($context["page"] ?? null), "header", array()), "content", array()), "order", array()), "custom", array())), "method");
  934. // line 61
  935. echo " ";
  936. } else {
  937. // line 62
  938. echo " ";
  939. $context["pcol"] = $this->getAttribute($this->getAttribute(($context["page"] ?? null), "children", array(), "method"), "order", array(0 => $this->getAttribute($this->getAttribute($this->getAttribute($this->getAttribute(($context["page"] ?? null), "header", array()), "content", array()), "order", array()), "by", array()), 1 => (($this->getAttribute($this->getAttribute($this->getAttribute($this->getAttribute(($context["page"] ?? null), "header", array(), "any", false, true), "content", array(), "any", false, true), "order", array(), "any", false, true), "dir", array(), "any", true, true)) ? (_twig_default_filter($this->getAttribute($this->getAttribute($this->getAttribute($this->getAttribute(($context["page"] ?? null), "header", array(), "any", false, true), "content", array(), "any", false, true), "order", array(), "any", false, true), "dir", array()), "asc")) : ("asc"))), "method");
  940. // line 63
  941. echo " ";
  942. }
  943. // line 64
  944. echo " ";
  945. } else {
  946. // line 65
  947. echo " ";
  948. $context["pcol"] = $this->getAttribute(($context["page"] ?? null), "children", array(), "method");
  949. // line 66
  950. echo " ";
  951. }
  952. // line 67
  953. echo "
  954. ";
  955. // line 68
  956. $context['_parent'] = $context;
  957. $context['_seq'] = twig_ensure_traversable(($context["pcol"] ?? null));
  958. foreach ($context['_seq'] as $context["_key"] => $context["p"]) {
  959. // line 69
  960. echo " ";
  961. $context["description"] = (((((( !$this->getAttribute($context["p"], "page", array())) ? (($this->env->getExtension('Grav\Plugin\Admin\AdminTwigExtension')->tuFilter("PLUGIN_ADMIN.FOLDER") . " &bull; ")) : (($this->env->getExtension('Grav\Plugin\Admin\AdminTwigExtension')->tuFilter("PLUGIN_ADMIN.PAGE") . " &bull; "))) . (($this->getAttribute( // line 70
  962. $context["p"], "modular", array())) ? (($this->env->getExtension('Grav\Plugin\Admin\AdminTwigExtension')->tuFilter("PLUGIN_ADMIN.MODULAR") . " &bull; ")) : (""))) . (($this->getAttribute( // line 71
  963. $context["p"], "routable", array())) ? (($this->env->getExtension('Grav\Plugin\Admin\AdminTwigExtension')->tuFilter("PLUGIN_ADMIN.ROUTABLE") . " &bull; ")) : (($this->env->getExtension('Grav\Plugin\Admin\AdminTwigExtension')->tuFilter("PLUGIN_ADMIN.NON_ROUTABLE") . " &bull; ")))) . (($this->getAttribute( // line 72
  964. $context["p"], "visible", array())) ? (($this->env->getExtension('Grav\Plugin\Admin\AdminTwigExtension')->tuFilter("PLUGIN_ADMIN.VISIBLE") . " &bull; ")) : (($this->env->getExtension('Grav\Plugin\Admin\AdminTwigExtension')->tuFilter("PLUGIN_ADMIN.NON_VISIBLE") . " &bull; ")))) . (($this->getAttribute( // line 73
  965. $context["p"], "published", array())) ? (($this->env->getExtension('Grav\Plugin\Admin\AdminTwigExtension')->tuFilter("PLUGIN_ADMIN.PUBLISHED") . " &bull; ")) : (($this->env->getExtension('Grav\Plugin\Admin\AdminTwigExtension')->tuFilter("PLUGIN_ADMIN.NON_PUBLISHED") . " &bull; "))));
  966. // line 74
  967. echo " ";
  968. // line 75
  969. echo " ";
  970. // line 76
  971. echo " ";
  972. // line 77
  973. echo " ";
  974. // line 78
  975. echo " ";
  976. // line 79
  977. echo " ";
  978. // line 80
  979. echo "
  980. ";
  981. // line 81
  982. $context["page_url"] = $this->env->getExtension('Grav\Plugin\Admin\AdminTwigExtension')->getPageUrl($context, $context["p"]);
  983. // line 82
  984. echo "
  985. <li class=\"page-item\" data-nav-id=\"";
  986. // line 83
  987. echo twig_escape_filter($this->env, $this->getAttribute($context["p"], "route", array()), "html", null, true);
  988. echo "\">
  989. <div class=\"row page-item__row\">
  990. <span class=\"page-item__toggle\" ";
  991. // line 85
  992. echo ((($this->getAttribute($this->getAttribute($context["p"], "children", array(0 => 0), "method"), "count", array()) > 0)) ? ("data-toggle=\"children\"") : (""));
  993. echo ">
  994. <i class=\"page-icon fa fa-fw fa-circle-o ";
  995. // line 86
  996. echo ((($this->getAttribute($this->getAttribute($context["p"], "children", array(0 => 0), "method"), "count", array()) > 0)) ? ("children-closed") : (""));
  997. echo " ";
  998. echo (($this->getAttribute($context["p"], "modular", array())) ? ("modular") : ((( !$this->getAttribute($context["p"], "routable", array())) ? ("not-routable") : ((( !$this->getAttribute($context["p"], "visible", array())) ? ("not-visible") : ((( !$this->getAttribute($context["p"], "page", array())) ? ("folder") : (""))))))));
  999. echo "\"></i>
  1000. </span>
  1001. <div class=\"page-item__content\">
  1002. <div class=\"page-item__content-name\">
  1003. <span data-hint=\"";
  1004. // line 90
  1005. echo twig_trim_filter(($context["description"] ?? null), " &bull; ");
  1006. echo "\" class=\"hint--top page-item__content-hint\">
  1007. ";
  1008. // line 91
  1009. $context["page_label"] = $this->env->getExtension('Grav\Common\Twig\TwigExtension')->definedDefaultFilter($this->env->getExtension('Grav\Common\Twig\TwigExtension')->definedDefaultFilter($this->getAttribute($this->getAttribute($context["p"], "header", array()), ($context["display_field"] ?? null)), $this->getAttribute($context["p"], ($context["display_field"] ?? null))), $this->getAttribute($context["p"], "title", array()));
  1010. // line 92
  1011. echo " <a href=\"";
  1012. echo twig_escape_filter($this->env, ($context["page_url"] ?? null), "html", null, true);
  1013. echo "\" class=\"page-edit\">";
  1014. echo twig_escape_filter($this->env, ($context["page_label"] ?? null));
  1015. echo "</a>
  1016. </span>
  1017. ";
  1018. // line 94
  1019. if ($this->getAttribute($context["p"], "language", array())) {
  1020. // line 95
  1021. echo " <span class=\"badge lang ";
  1022. if (($this->getAttribute($context["p"], "language", array()) == ($context["admin_lang"] ?? null))) {
  1023. echo "info";
  1024. }
  1025. echo "\">";
  1026. echo twig_escape_filter($this->env, $this->getAttribute($context["p"], "language", array()), "html", null, true);
  1027. echo "</span>
  1028. ";
  1029. }
  1030. // line 97
  1031. echo " ";
  1032. if ($this->getAttribute($context["p"], "home", array())) {
  1033. // line 98
  1034. echo " <span class=\"page-home\"><i class=\"fa fa-home\"></i></span>
  1035. ";
  1036. }
  1037. // line 100
  1038. echo " </div>
  1039. <p class=\"page-route\">";
  1040. // line 101
  1041. echo twig_escape_filter($this->env, (($this->getAttribute($this->getAttribute($this->getAttribute($context["p"], "header", array()), "routes", array()), "default", array())) ? ($this->getAttribute($this->getAttribute($this->getAttribute($context["p"], "header", array()), "routes", array()), "default", array())) : ($this->getAttribute($context["p"], "route", array()))), "html", null, true);
  1042. echo " <span class=\"spacer\"><i class=\"fa fa-long-arrow-right\"></i></span> ";
  1043. echo twig_escape_filter($this->env, $this->getAttribute($context["p"], "template", array(), "method"), "html", null, true);
  1044. echo "</p>
  1045. </div>
  1046. <span class=\"page-item__tools\">
  1047. ";
  1048. // line 104
  1049. if (($context["warn"] ?? null)) {
  1050. // line 105
  1051. echo " <a href=\"#delete\" data-remodal-target=\"delete\" data-delete-url=\"";
  1052. echo twig_escape_filter($this->env, $this->getAttribute(($context["uri"] ?? null), "addNonce", array(0 => (((($context["page_url"] ?? null) . "/task") . ($context["separator"] ?? null)) . "delete"), 1 => "admin-form", 2 => "admin-nonce"), "method"), "html", null, true);
  1053. echo "\" class=\"page-delete\" ><i class=\"fa fa-close\"></i></a>
  1054. ";
  1055. } else {
  1056. // line 107
  1057. echo " <a href=\"";
  1058. echo twig_escape_filter($this->env, $this->getAttribute(($context["uri"] ?? null), "addNonce", array(0 => (((($context["page_url"] ?? null) . "/task") . ($context["separator"] ?? null)) . "delete"), 1 => "admin-form", 2 => "admin-nonce"), "method"), "html", null, true);
  1059. echo "\" class=\"page-delete\" ><i class=\"fa fa-close\"></i></a>
  1060. ";
  1061. }
  1062. // line 109
  1063. echo " </span>
  1064. </div>
  1065. ";
  1066. // line 111
  1067. if (($this->getAttribute($this->getAttribute($context["p"], "children", array(), "method"), "count", array()) > 0)) {
  1068. // line 112
  1069. echo " <ul class=\"depth-";
  1070. echo twig_escape_filter($this->env, (($context["depth"] ?? null) + 1), "html", null, true);
  1071. echo "\" style=\"display:none;\">
  1072. ";
  1073. // line 113
  1074. echo $this->getAttribute($this, "loop", array(0 => $context["p"], 1 => (($context["depth"] ?? null) + 1), 2 => ($context["twig_vars"] ?? null)), "method");
  1075. echo "
  1076. </ul>
  1077. ";
  1078. }
  1079. // line 116
  1080. echo " </li>
  1081. ";
  1082. }
  1083. $_parent = $context['_parent'];
  1084. unset($context['_seq'], $context['_iterated'], $context['_key'], $context['p'], $context['_parent'], $context['loop']);
  1085. $context = array_intersect_key($context, $_parent) + $_parent;
  1086. } catch (Exception $e) {
  1087. ob_end_clean();
  1088. throw $e;
  1089. } catch (Throwable $e) {
  1090. ob_end_clean();
  1091. throw $e;
  1092. }
  1093. return ('' === $tmp = ob_get_clean()) ? '' : new Twig_Markup($tmp, $this->env->getCharset());
  1094. }
  1095. public function getTemplateName()
  1096. {
  1097. return "pages.html.twig";
  1098. }
  1099. public function isTraitable()
  1100. {
  1101. return false;
  1102. }
  1103. public function getDebugInfo()
  1104. {
  1105. return array ( 1116 => 116, 1110 => 113, 1105 => 112, 1103 => 111, 1099 => 109, 1093 => 107, 1087 => 105, 1085 => 104, 1077 => 101, 1074 => 100, 1070 => 98, 1067 => 97, 1057 => 95, 1055 => 94, 1047 => 92, 1045 => 91, 1041 => 90, 1032 => 86, 1028 => 85, 1023 => 83, 1020 => 82, 1018 => 81, 1015 => 80, 1013 => 79, 1011 => 78, 1009 => 77, 1007 => 76, 1005 => 75, 1003 => 74, 1001 => 73, 1000 => 72, 999 => 71, 998 => 70, 996 => 69, 992 => 68, 989 => 67, 986 => 66, 983 => 65, 980 => 64, 977 => 63, 974 => 62, 971 => 61, 968 => 60, 965 => 59, 963 => 58, 960 => 57, 957 => 56, 954 => 55, 951 => 54, 948 => 53, 945 => 52, 942 => 51, 939 => 50, 936 => 49, 922 => 48, 904 => 4, 891 => 3, 884 => 402, 881 => 401, 876 => 398, 869 => 397, 861 => 392, 857 => 391, 850 => 387, 846 => 385, 838 => 383, 836 => 382, 831 => 380, 826 => 377, 824 => 376, 821 => 375, 817 => 373, 810 => 372, 806 => 370, 804 => 369, 800 => 367, 798 => 366, 794 => 364, 791 => 363, 776 => 361, 774 => 360, 767 => 359, 750 => 358, 746 => 356, 744 => 355, 739 => 352, 737 => 351, 732 => 348, 730 => 347, 727 => 346, 725 => 345, 722 => 344, 719 => 343, 716 => 342, 713 => 341, 711 => 340, 708 => 339, 705 => 338, 703 => 337, 699 => 335, 695 => 333, 693 => 332, 688 => 330, 680 => 325, 676 => 324, 670 => 321, 658 => 318, 654 => 316, 650 => 314, 647 => 313, 644 => 312, 641 => 311, 638 => 310, 636 => 309, 631 => 306, 623 => 301, 611 => 300, 607 => 299, 595 => 298, 591 => 296, 588 => 295, 585 => 294, 582 => 293, 579 => 292, 576 => 291, 574 => 290, 571 => 289, 567 => 287, 563 => 285, 557 => 284, 547 => 282, 544 => 281, 540 => 280, 534 => 276, 532 => 275, 529 => 274, 523 => 272, 517 => 270, 515 => 269, 511 => 267, 509 => 266, 504 => 263, 501 => 262, 498 => 261, 496 => 260, 493 => 259, 490 => 258, 482 => 254, 476 => 251, 473 => 250, 471 => 249, 466 => 248, 464 => 247, 461 => 246, 455 => 242, 452 => 241, 448 => 239, 442 => 238, 432 => 236, 429 => 235, 426 => 234, 422 => 233, 416 => 229, 413 => 228, 411 => 227, 407 => 226, 403 => 224, 400 => 223, 394 => 221, 386 => 219, 383 => 218, 377 => 216, 375 => 215, 371 => 214, 365 => 213, 360 => 210, 354 => 208, 352 => 207, 348 => 206, 344 => 205, 335 => 199, 331 => 197, 329 => 196, 326 => 195, 318 => 193, 315 => 192, 312 => 191, 310 => 190, 307 => 189, 299 => 187, 296 => 186, 293 => 185, 291 => 184, 288 => 183, 286 => 182, 279 => 180, 274 => 178, 271 => 177, 269 => 176, 266 => 175, 262 => 173, 258 => 171, 252 => 170, 244 => 168, 241 => 167, 238 => 166, 234 => 165, 228 => 161, 226 => 160, 220 => 158, 218 => 157, 213 => 154, 211 => 153, 206 => 150, 200 => 149, 188 => 147, 185 => 146, 180 => 145, 174 => 143, 172 => 142, 168 => 141, 164 => 140, 155 => 134, 150 => 131, 144 => 130, 132 => 128, 129 => 127, 125 => 126, 117 => 124, 115 => 123, 112 => 122, 109 => 121, 102 => 41, 99 => 40, 92 => 37, 89 => 36, 86 => 35, 83 => 34, 80 => 33, 76 => 1, 74 => 46, 72 => 45, 70 => 44, 68 => 31, 66 => 30, 64 => 29, 62 => 28, 60 => 27, 57 => 24, 55 => 23, 51 => 20, 48 => 18, 46 => 17, 44 => 16, 42 => 15, 40 => 14, 38 => 13, 36 => 12, 34 => 11, 31 => 8, 29 => 7, 11 => 1,);
  1106. }
  1107. /** @deprecated since 1.27 (to be removed in 2.0). Use getSourceContext() instead */
  1108. public function getSource()
  1109. {
  1110. @trigger_error('The '.__METHOD__.' method is deprecated since version 1.27 and will be removed in 2.0. Use getSourceContext() instead.', E_USER_DEPRECATED);
  1111. return $this->getSourceContext()->getCode();
  1112. }
  1113. public function getSourceContext()
  1114. {
  1115. return new Twig_Source("{% extends 'partials/base.html.twig' %}
  1116. {% macro spanToggle(input, length) %}
  1117. {{ (repeat('&nbsp;&nbsp;', (length - input|length) / 2) ~ input ~ repeat('&nbsp;&nbsp;', (length - input|length) / 2))|raw }}
  1118. {% endmacro %}
  1119. {% if admin.route %}
  1120. {% set context = admin.page(true) %}
  1121. {% endif %}
  1122. {% if uri.param('new') %}
  1123. {% set mode = 'new' %}
  1124. {% elseif context %}
  1125. {% set mode = 'edit' %}
  1126. {% if context.exists %}
  1127. {% set page_url = base_url ~ '/pages' ~ (context.header.routes.default ?: context.rawRoute) %}
  1128. {% set exists = true %}
  1129. {% set title = (context.exists ? \"PLUGIN_ADMIN.EDIT\"|tu : \"PLUGIN_ADMIN.CREATE\"|tu ) ~ \" \" ~ (context.header.title ?: context.title) %}
  1130. {% else %}
  1131. {% set title = \"PLUGIN_ADMIN.ADD_PAGE\"|tu %}
  1132. {% endif %}
  1133. {% else %}
  1134. {% set mode = 'list' %}
  1135. {% set title = \"PLUGIN_ADMIN.PAGES\"|tu %}
  1136. {% endif %}
  1137. {% set modular = context.modular ? 'modular_' : '' %}
  1138. {% set warn = config.plugins.admin.warnings.delete_page %}
  1139. {% set admin_lang = admin.session.admin_lang ?: 'en' %}
  1140. {% set page_lang = context.language %}
  1141. {% set type = 'page' %}
  1142. {% block stylesheets %}
  1143. {% if mode == 'edit' %}
  1144. {% do assets.addCss(theme_url~'/css/codemirror/codemirror.css') %}
  1145. {% endif %}
  1146. {{ parent() }}
  1147. {% endblock %}
  1148. {% block javascripts %}
  1149. {{ parent() }}
  1150. {% endblock %}
  1151. {% set preview_html = (base_url_relative_frontend|rtrim('/') ~ (context.home ? '' : context.route)) ?: '/' %}
  1152. {% set preview_target = config.plugins.admin.frontend_pages_target %}
  1153. {% 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>' : '' %}
  1154. {% macro loop(page, depth, twig_vars) %}
  1155. {% set separator = twig_vars['config'].system.param_sep %}
  1156. {% set display_field = twig_vars['config'].plugins.admin.pages_list_display_field %}
  1157. {% set base_url = twig_vars['base_url_relative'] %}
  1158. {% set base_url_simple = twig_vars['base_url_simple'] %}
  1159. {% set admin_route = twig_vars['admin_route'] %}
  1160. {% set admin_lang = twig_vars['admin_lang'] %}
  1161. {% set warn = twig_vars['warn'] %}
  1162. {% set uri = twig_vars['uri'] %}
  1163. {% if page.header.admin.children_display_order == 'collection' and page.header.content.order.by %}
  1164. {% if page.header.content.order.custom %}
  1165. {% set pcol = page.children().order(page.header.content.order.by, page.header.content.order.dir|default('asc'), page.header.content.order.custom) %}
  1166. {% else %}
  1167. {% set pcol = page.children().order(page.header.content.order.by, page.header.content.order.dir|default('asc')) %}
  1168. {% endif %}
  1169. {% else %}
  1170. {% set pcol = page.children() %}
  1171. {% endif %}
  1172. {% for p in pcol %}
  1173. {% set description = (not p.page ? \"PLUGIN_ADMIN.FOLDER\"|tu ~ ' &bull; ' : \"PLUGIN_ADMIN.PAGE\"|tu ~ ' &bull; ') ~
  1174. (p.modular ? \"PLUGIN_ADMIN.MODULAR\"|tu ~ ' &bull; ' : '') ~
  1175. (p.routable ? \"PLUGIN_ADMIN.ROUTABLE\"|tu ~ ' &bull; ' : \"PLUGIN_ADMIN.NON_ROUTABLE\"|tu ~ ' &bull; ') ~
  1176. (p.visible ? \"PLUGIN_ADMIN.VISIBLE\"|tu ~ ' &bull; ' : \"PLUGIN_ADMIN.NON_VISIBLE\"|tu ~ ' &bull; ') ~
  1177. (p.published ? \"PLUGIN_ADMIN.PUBLISHED\"|tu ~ ' &bull; ' : \"PLUGIN_ADMIN.NON_PUBLISHED\"|tu ~ ' &bull; ') %}
  1178. {#{% set page_route = p.rawRoute|trim('/') %}#}
  1179. {#{% if p.language and p.language != admin_lang %}#}
  1180. {#{% set page_url = base_url_simple ~ '/' ~ p.language ~ '/' ~ admin_route ~ '/pages/' ~ page_route %}#}
  1181. {#{% else %}#}
  1182. {#{% set page_url = base_url ~ '/pages/' ~ page_route %}#}
  1183. {#{% endif %}#}
  1184. {% set page_url = getPageUrl(p) %}
  1185. <li class=\"page-item\" data-nav-id=\"{{ p.route }}\">
  1186. <div class=\"row page-item__row\">
  1187. <span class=\"page-item__toggle\" {{ p.children(0).count > 0 ? 'data-toggle=\"children\"' : ''}}>
  1188. <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>
  1189. </span>
  1190. <div class=\"page-item__content\">
  1191. <div class=\"page-item__content-name\">
  1192. <span data-hint=\"{{ description|trim(' &bull; ')|raw }}\" class=\"hint--top page-item__content-hint\">
  1193. {% set page_label = attribute(p.header, display_field)|defined(attribute(p, display_field))|defined(p.title) %}
  1194. <a href=\"{{ page_url }}\" class=\"page-edit\">{{ page_label|e }}</a>
  1195. </span>
  1196. {% if p.language %}
  1197. <span class=\"badge lang {% if p.language == admin_lang %}info{% endif %}\">{{p.language}}</span>
  1198. {% endif %}
  1199. {% if p.home %}
  1200. <span class=\"page-home\"><i class=\"fa fa-home\"></i></span>
  1201. {% endif %}
  1202. </div>
  1203. <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>
  1204. </div>
  1205. <span class=\"page-item__tools\">
  1206. {% if warn %}
  1207. <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>
  1208. {% else %}
  1209. <a href=\"{{ uri.addNonce(page_url ~ '/task' ~ separator ~ 'delete', 'admin-form', 'admin-nonce') }}\" class=\"page-delete\" ><i class=\"fa fa-close\"></i></a>
  1210. {% endif %}
  1211. </span>
  1212. </div>
  1213. {% if p.children().count > 0 %}
  1214. <ul class=\"depth-{{ depth + 1 }}\" style=\"display:none;\">
  1215. {{ _self.loop(p, depth + 1, twig_vars) }}
  1216. </ul>
  1217. {% endif %}
  1218. </li>
  1219. {% endfor %}
  1220. {% endmacro %}
  1221. {% block titlebar %}
  1222. <div class=\"button-bar\">
  1223. {% if mode == 'list' %}
  1224. <a class=\"button\" href=\"{{ base_url }}\"><i class=\"fa fa-reply\"></i> {{ \"PLUGIN_ADMIN.BACK\"|tu }}</a>
  1225. {% for key, add_modal in config.plugins.admin.add_modals %}
  1226. {% if add_modal.show_in|defined('bar') == 'bar' %}
  1227. <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 }}</a>
  1228. {% endif %}
  1229. {% endfor %}
  1230. <div class=\"button-group\">
  1231. <button type=\"button\" class=\"button disabled\" href=\"#modal\" data-remodal-target=\"modal\">
  1232. <i class=\"fa fa-plus\"></i> {{ \"PLUGIN_ADMIN.ADD\"|tu }}
  1233. </button>
  1234. <button type=\"button\" class=\"button dropdown-toggle\" data-toggle=\"dropdown\">
  1235. <i class=\"fa fa-caret-down\"></i>
  1236. </button>
  1237. <ul class=\"dropdown-menu\">
  1238. <li><a class=\"button\" href=\"#modal\" data-remodal-target=\"modal\">{{ \"PLUGIN_ADMIN.ADD_PAGE\"|tu }}</a></li>
  1239. <li><a class=\"button\" href=\"#modal-folder\" data-remodal-target=\"modal-folder\">{{ \"PLUGIN_ADMIN.ADD_FOLDER\"|tu }}</a></li>
  1240. {% if admin.modularTypes is not empty %}
  1241. <li><a class=\"button\" href=\"#modular\" data-remodal-target=\"modular\">{{ \"PLUGIN_ADMIN.ADD_MODULAR\"|tu }}</a></li>
  1242. {% endif %}
  1243. {% for key, add_modal in config.plugins.admin.add_modals %}
  1244. {% if add_modal.show_in|defined('bar') == 'dropdown' %}
  1245. <li><a class=\"button {{ add_modal.link_classes }}\" href=\"#modal-add_modal-{{ key }}\" data-remodal-target=\"modal-add_modal-{{ key }}\">{{ add_modal.label }}</a></li>
  1246. {% endif %}
  1247. {% endfor %}
  1248. </ul>
  1249. </div>
  1250. {% if admin.multilang %}
  1251. <div class=\"button-group\">
  1252. <button type=\"button\" class=\"button disabled\">
  1253. <i class=\"fa fa-flag-o\"></i>
  1254. {% set langName = admin.siteLanguages[admin_lang] %}
  1255. {{ langName[:1]|upper ~ langName[1:] }}
  1256. </button>
  1257. {% if admin.languages_enabled|length > 1 %}
  1258. <button type=\"button\" class=\"button dropdown-toggle\" data-toggle=\"dropdown\">
  1259. <i class=\"fa fa-caret-down\"></i>
  1260. </button>
  1261. <ul class=\"dropdown-menu language-switcher\">
  1262. {% for langCode in admin.languages_enabled %}
  1263. {% set langName = admin.siteLanguages[langCode] %}
  1264. {% if langCode != admin_lang %}
  1265. <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>
  1266. {% endif %}
  1267. {% endfor %}
  1268. </ul>
  1269. {% endif %}
  1270. </div>
  1271. {% endif %}
  1272. {% elseif mode == 'edit' %}
  1273. {{ preview_link|raw }}
  1274. <a class=\"button\" href=\"{{ base_url }}/pages\" title=\"{{ \"PLUGIN_ADMIN.BACK\"|tu }}\"><i class=\"fa fa-reply\"></i></a>
  1275. {% set siblings = context.parent().children() %}
  1276. {% if not siblings.isFirst(context.path) %}
  1277. {% set sib = siblings.nextSibling(context.path) %}
  1278. {% set sib_url = base_url ~ '/pages' ~ (sib.header.routes.default ?: sib.rawRoute) %}
  1279. <a class=\"button hidden-mobile\" href=\"{{ sib_url }}\" title=\"{{ \"PLUGIN_ADMIN.PREVIOUS\"|tu }}\"><i class=\"fa fa-chevron-left\"></i></a>
  1280. {% endif %}
  1281. {% if not siblings.isLast(context.path) %}
  1282. {% set sib = siblings.prevSibling(context.path) %}
  1283. {% set sib_url = base_url ~ '/pages' ~ (sib.header.routes.default ?: sib.rawRoute) %}
  1284. <a class=\"button hidden-mobile\" href=\"{{ sib_url }}\" title=\"{{ \"PLUGIN_ADMIN.NEXT\"|tu }}\"><i class=\"fa fa-chevron-right\"></i></a>
  1285. {% endif %}
  1286. {% if exists %}
  1287. <div class=\"button-group\">
  1288. <button type=\"button\" class=\"button disabled\" href=\"#modal\" data-remodal-target=\"modal\">
  1289. <i class=\"fa fa-plus\"></i> {{ \"PLUGIN_ADMIN.ADD\"|tu }}
  1290. </button>
  1291. <button type=\"button\" class=\"button dropdown-toggle\" data-toggle=\"dropdown\">
  1292. <i class=\"fa fa-caret-down\"></i>
  1293. </button>
  1294. <ul class=\"dropdown-menu\">
  1295. <li><a class=\"button\" href=\"#modal\" data-remodal-target=\"modal\">{{ \"PLUGIN_ADMIN.ADD_PAGE\"|tu }}</a></li>
  1296. <li><a class=\"button\" href=\"#modal-folder\" data-remodal-target=\"modal-folder\">{{ \"PLUGIN_ADMIN.ADD_FOLDER\"|tu }}</a></li>
  1297. {% if admin.modularTypes is not empty %}
  1298. <li><a class=\"button\" href=\"#modular\" data-remodal-target=\"modular\">{{ \"PLUGIN_ADMIN.ADD_MODULAR\"|tu }}</a></li>
  1299. {% endif %}
  1300. </ul>
  1301. </div>
  1302. <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>
  1303. <a class=\"button\" href=\"#\" data-remodal-target=\"move\"><i class=\"fa fa-arrows\"></i> {{ \"PLUGIN_ADMIN.MOVE\"|tu }}</a>
  1304. {% if config.plugins['admin-pro'].enabled %}
  1305. <a class=\"button\" href=\"#\" data-remodal-target=\"revisions\"><i class=\"fa fa-history\"></i> {{ \"PLUGIN_ADMIN_PRO.REVISIONS\"|tu }}</a>
  1306. {% endif %}
  1307. {% if warn %}
  1308. <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>
  1309. {% else %}
  1310. <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>
  1311. {% endif %}
  1312. {% endif %}
  1313. <div class=\"button-group\">
  1314. <button class=\"button\" name=\"task\" value=\"save\" form=\"blueprints\" type=\"submit\"><i class=\"fa fa-check\"></i> {{ \"PLUGIN_ADMIN.SAVE\"|tu }}</button>
  1315. {% if exists and admin.multilang %}
  1316. {% if context.untranslatedLanguages %}
  1317. <button type=\"button\" class=\"button dropdown-toggle\" data-toggle=\"dropdown\">
  1318. <i class=\"fa fa-caret-down\"></i>
  1319. </button>
  1320. <ul class=\"dropdown-menu lang-switcher\">
  1321. {% for langCode in context.untranslatedLanguages %}
  1322. {% set langName = admin.siteLanguages[langCode] %}
  1323. {% if langCode != page_lang %}
  1324. <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>
  1325. {% endif %}
  1326. {% endfor %}
  1327. </ul>
  1328. {% endif %}
  1329. {% endif %}
  1330. </div>
  1331. {% endif %}
  1332. </div>
  1333. {% if mode == 'new' %}
  1334. <h1><i class=\"fa fa-fw fa-file-text-o\"></i> {{ \"PLUGIN_ADMIN.ADD_PAGE\"|tu }}</h1>
  1335. {% elseif mode == 'edit' %}
  1336. <h1><i class=\"fa fa-fw fa-file-text-o\"></i>
  1337. {{ context.menu }}
  1338. </h1>
  1339. {% else %}
  1340. <h1><i class=\"fa fa-fw fa-file-text-o\"></i> {{ \"PLUGIN_ADMIN.MANAGE_PAGES\"|tu }}</h1>
  1341. {% endif %}
  1342. {% endblock %}
  1343. {% block content %}
  1344. <div class=\"clear admin-pages\">
  1345. {% if mode == 'new' %}
  1346. {% include 'partials/blueprints-new.html.twig' with { blueprints: admin.blueprints('pages/page'), data: context } %}
  1347. {% elseif mode == 'edit' %}
  1348. <div class=\"admin-form-wrapper\">
  1349. <div id=\"admin-topbar\">
  1350. {% if admin.multilang and page_lang %}
  1351. <div id=\"admin-lang-toggle\" class=\"button-group\">
  1352. <button type=\"button\" class=\"button disabled\">
  1353. {% if exists %}
  1354. {{ page_lang }}
  1355. {% else %}
  1356. {{ admin_lang }}
  1357. {% endif %}
  1358. </button>
  1359. {% if exists and context.translatedLanguages|length > 1 %}
  1360. <button type=\"button\" class=\"button dropdown-toggle\" data-toggle=\"dropdown\">
  1361. <i class=\"fa fa-caret-down\"></i>
  1362. </button>
  1363. <ul class=\"dropdown-menu language-switcher\">
  1364. {% for language, route in context.translatedLanguages %}
  1365. {% if language != page_lang %}
  1366. <li><button class=\"task\" name=\"task\" value=\"switchlanguage\" lang=\"{{language}}\" redirect=\"{{context.rawRoute|trim('/')}}\" form=\"blueprints\">{{ language }}</button>
  1367. {% endif %}
  1368. {% endfor %}
  1369. </ul>
  1370. {% endif %}
  1371. </div>
  1372. {% endif %}
  1373. {% if context.blueprints.fields %}
  1374. {% set normalText = \"PLUGIN_ADMIN.NORMAL\"|tu %}
  1375. {% set expertText = \"PLUGIN_ADMIN.EXPERT\"|tu %}
  1376. {% set maxLen = max([normalText|length, expertText|length]) %}
  1377. {% set normalText = _self.spanToggle(normalText, maxLen) %}
  1378. {% set expertText = _self.spanToggle(expertText, maxLen) %}
  1379. <form id=\"admin-mode-toggle\">
  1380. <div class=\"switch-toggle switch-grav\">
  1381. <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 %}>
  1382. <label for=\"normal\">{{ normalText|raw }}</label>
  1383. <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 %}>
  1384. <label for=\"expert\">{{ expertText|raw }}</label>
  1385. <a></a>
  1386. </div>
  1387. </form>
  1388. {% endif %}
  1389. </div>
  1390. {% if context.blueprints.fields and admin.session.expert == '0' %}
  1391. {% include 'partials/blueprints.html.twig' with { blueprints: context.blueprints, data: context } %}
  1392. {% else %}
  1393. {% include 'partials/blueprints-raw.html.twig' with { blueprints: admin.blueprints('admin/pages/'~modular~'raw'), data: context } %}
  1394. {% endif %}
  1395. </div>
  1396. {% else %}
  1397. <form id=\"page-filtering\">
  1398. <div class=\"page-filters\">
  1399. <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\" />
  1400. </div>
  1401. <div class=\"page-search\">
  1402. <input type=\"text\" placeholder=\"{{ \"PLUGIN_ADMIN.SEARCH_PAGES\"|tu }}\" name=\"page-search\" />
  1403. </div>
  1404. <div class=\"page-shortcuts\">
  1405. <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>
  1406. <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>
  1407. </div>
  1408. </form>
  1409. <div class=\"pages-list\">
  1410. <ul class=\"depth-0\">
  1411. {{ _self.loop(pages, 0, _context) }}
  1412. </ul>
  1413. {% include 'partials/page-legend.html.twig' %}
  1414. </div>
  1415. {% endif %}
  1416. </div>
  1417. {% if context %}
  1418. {% set obj_data = clone(context) %}
  1419. {% if mode == 'edit' %}
  1420. {% do obj_data.folder('') %}
  1421. {% endif %}
  1422. {% endif %}
  1423. {% if mode == 'list' or mode == 'edit' %}
  1424. <div class=\"remodal\" data-remodal-id=\"modal\" data-remodal-options=\"hashTracking: false\">
  1425. {% include 'partials/blueprints-new.html.twig' with { blueprints: admin.blueprints('admin/pages/new'), data: obj_data, form_id:'new-page' } %}
  1426. </div>
  1427. <div class=\"remodal\" data-remodal-id=\"modal-folder\" data-remodal-options=\"hashTracking: false\">
  1428. {% include 'partials/blueprints-new-folder.html.twig' with { blueprints: admin.blueprints('admin/pages/new_folder'), data: obj_data, form_id:'new-folder' } %}
  1429. </div>
  1430. <div class=\"remodal\" data-remodal-id=\"modular\" data-remodal-options=\"hashTracking: false\">
  1431. {% include 'partials/blueprints-new.html.twig' with { blueprints: admin.blueprints('admin/pages/modular_new'), data: obj_data, form_id:'new-modular' } %}
  1432. </div>
  1433. {% for key, add_modal in config.plugins.admin.add_modals %}
  1434. <div class=\"remodal {{ add_modal.modal_classes|defined('') }}\" data-remodal-id=\"modal-add_modal-{{ key }}\" data-remodal-options=\"hashTracking: false\">
  1435. {% 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({})) %}
  1436. </div>
  1437. {% endfor %}
  1438. {% endif %}
  1439. {% if mode == 'edit' %}
  1440. <div class=\"remodal\" data-remodal-id=\"move\" data-remodal-options=\"hashTracking: false\">
  1441. {% include 'partials/page-move.html.twig' with { blueprints: admin.blueprints('admin/pages/move'), data: context } %}
  1442. </div>
  1443. <div class=\"remodal\" data-remodal-id=\"revisions\" data-remodal-options=\"hashTracking: false\">
  1444. {% include ['partials/page-revisions.html.twig', 'empty.html.twig'] ignore missing with { data: context } %}
  1445. </div>
  1446. {% endif %}
  1447. {% include 'partials/modal-changes-detected.html.twig' %}
  1448. <div class=\"remodal\" data-remodal-id=\"delete\" data-remodal-options=\"hashTracking: false\">
  1449. <form>
  1450. <h1>{{ \"PLUGIN_ADMIN.MODAL_DELETE_PAGE_CONFIRMATION_REQUIRED_TITLE\"|tu }}</h1>
  1451. <p class=\"bigger\">
  1452. {% if context %}
  1453. <strong>{{ \"PLUGIN_ADMIN.PAGE\"|tu }}: {{ context.title }}</strong>
  1454. {% endif %}
  1455. </p>
  1456. <p class=\"bigger\">
  1457. {{ \"PLUGIN_ADMIN.MODAL_DELETE_PAGE_CONFIRMATION_REQUIRED_DESC\"|tu }}
  1458. </p>
  1459. <br>
  1460. <div class=\"button-bar\">
  1461. <button data-remodal-action=\"cancel\" class=\"button secondary remodal-cancel\"><i class=\"fa fa-fw fa-close\"></i> {{ \"PLUGIN_ADMIN.CANCEL\"|tu }}</button>
  1462. <a class=\"button disable-after-click\" data-delete-action href=\"#\"><i class=\"fa fa-fw fa-check\"></i> {{ \"PLUGIN_ADMIN.CONTINUE\"|tu }}</a>
  1463. </div>
  1464. </form>
  1465. </div>
  1466. {% include 'partials/admin-pro-pages-addons.html.twig' ignore missing %}
  1467. {% endblock %}
  1468. {% block bottom %}
  1469. <script>
  1470. \$('.admin-pages .form-tabs .tabs-nav').css('margin-right', (\$('#admin-topbar').width() + 20) + 'px');
  1471. </script>
  1472. {% endblock %}
  1473. ", "pages.html.twig", "/mnt/data/Sites/static-ethica.net/user/plugins/admin/themes/grav/templates/pages.html.twig");
  1474. }
  1475. }