47be0e8591879156261534aa27debfc490fb5b01492a2b2565a798c1382ef405.php 101 KB

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