1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192939495969798991001011021031041051061071081091101111121131141151161171181191201211221231241251261271281291301311321331341351361371381391401411421431441451461471481491501511521531541551561571581591601611621631641651661671681691701711721731741751761771781791801811821831841851861871881891901911921931941951961971981992002012022032042052062072082092102112122132142152162172182192202212222232242252262272282292302312322332342352362372382392402412422432442452462472482492502512522532542552562572582592602612622632642652662672682692702712722732742752762772782792802812822832842852862872882892902912922932942952962972982993003013023033043053063073083093103113123133143153163173183193203213223233243253263273283293303313323333343353363373383393403413423433443453463473483493503513523533543553563573583593603613623633643653663673683693703713723733743753763773783793803813823833843853863873883893903913923933943953963973983994004014024034044054064074084094104114124134144154164174184194204214224234244254264274284294304314324334344354364374384394404414424434444454464474484494504514524534544554564574584594604614624634644654664674684694704714724734744754764774784794804814824834844854864874884894904914924934944954964974984995005015025035045055065075085095105115125135145155165175185195205215225235245255265275285295305315325335345355365375385395405415425435445455465475485495505515525535545555565575585595605615625635645655665675685695705715725735745755765775785795805815825835845855865875885895905915925935945955965975985996006016026036046056066076086096106116126136146156166176186196206216226236246256266276286296306316326336346356366376386396406416426436446456466476486496506516526536546556566576586596606616626636646656666676686696706716726736746756766776786796806816826836846856866876886896906916926936946956966976986997007017027037047057067077087097107117127137147157167177187197207217227237247257267277287297307317327337347357367377387397407417427437447457467477487497507517527537547557567577587597607617627637647657667677687697707717727737747757767777787797807817827837847857867877887897907917927937947957967977987998008018028038048058068078088098108118128138148158168178188198208218228238248258268278288298308318328338348358368378388398408418428438448458468478488498508518528538548558568578588598608618628638648658668678688698708718728738748758768778788798808818828838848858868878888898908918928938948958968978988999009019029039049059069079089099109119129139149159169179189199209219229239249259269279289299309319329339349359369379389399409419429439449459469479489499509519529539549559569579589599609619629639649659669679689699709719729739749759769779789799809819829839849859869879889899909919929939949959969979989991000100110021003100410051006100710081009101010111012101310141015101610171018101910201021102210231024102510261027102810291030103110321033103410351036103710381039104010411042104310441045104610471048104910501051105210531054105510561057105810591060106110621063106410651066106710681069107010711072107310741075107610771078107910801081108210831084108510861087108810891090109110921093109410951096109710981099110011011102110311041105110611071108110911101111111211131114111511161117111811191120112111221123112411251126112711281129113011311132113311341135113611371138113911401141114211431144114511461147114811491150115111521153115411551156115711581159116011611162116311641165116611671168116911701171117211731174117511761177117811791180118111821183118411851186118711881189119011911192119311941195119611971198119912001201120212031204120512061207120812091210121112121213121412151216121712181219122012211222122312241225122612271228122912301231123212331234123512361237123812391240124112421243124412451246124712481249125012511252125312541255125612571258125912601261126212631264126512661267126812691270127112721273127412751276127712781279128012811282128312841285128612871288128912901291129212931294129512961297129812991300130113021303130413051306130713081309131013111312131313141315131613171318131913201321132213231324132513261327132813291330133113321333133413351336133713381339134013411342134313441345134613471348134913501351135213531354135513561357135813591360136113621363136413651366136713681369137013711372137313741375137613771378137913801381138213831384138513861387138813891390139113921393139413951396139713981399140014011402140314041405140614071408140914101411141214131414141514161417141814191420142114221423142414251426142714281429143014311432143314341435143614371438143914401441144214431444144514461447144814491450145114521453145414551456145714581459146014611462146314641465146614671468146914701471147214731474147514761477147814791480148114821483148414851486148714881489149014911492149314941495149614971498149915001501150215031504150515061507150815091510151115121513151415151516151715181519152015211522152315241525152615271528152915301531153215331534153515361537153815391540154115421543154415451546154715481549155015511552155315541555155615571558155915601561156215631564156515661567 |
- <?php
- /* pages.html.twig */
- class __TwigTemplate_595debcc4b340cb1cbb4c52b820ffc56923fb2d39a4bcfb77a0c4e59c7bc90ab extends Twig_Template
- {
- public function __construct(Twig_Environment $env)
- {
- parent::__construct($env);
- // line 1
- $this->parent = $this->loadTemplate("partials/base.html.twig", "pages.html.twig", 1);
- $this->blocks = array(
- 'stylesheets' => array($this, 'block_stylesheets'),
- 'javascripts' => array($this, 'block_javascripts'),
- 'titlebar' => array($this, 'block_titlebar'),
- 'content' => array($this, 'block_content'),
- 'bottom' => array($this, 'block_bottom'),
- );
- }
- protected function doGetParent(array $context)
- {
- return "partials/base.html.twig";
- }
- protected function doDisplay(array $context, array $blocks = array())
- {
- // line 7
- if ($this->getAttribute(($context["admin"] ?? null), "route", array())) {
- // line 8
- $context["context"] = $this->getAttribute(($context["admin"] ?? null), "page", array(0 => true), "method");
- }
- // line 11
- if ($this->getAttribute(($context["uri"] ?? null), "param", array(0 => "new"), "method")) {
- // line 12
- $context["mode"] = "new";
- } elseif ( // line 13
- ($context["context"] ?? null)) {
- // line 14
- $context["mode"] = "edit";
- // line 15
- if ($this->getAttribute(($context["context"] ?? null), "exists", array())) {
- // line 16
- $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()))));
- // line 17
- $context["exists"] = true;
- // line 18
- $context["title"] = (((($this->getAttribute(($context["context"] ?? null), "exists", array())) ? ($this->env->getExtension('Grav\Plugin\Admin\AdminTwigExtension')->tuFilter("PLUGIN_ADMIN.EDIT")) : ($this->env->getExtension('Grav\Plugin\Admin\AdminTwigExtension')->tuFilter("PLUGIN_ADMIN.CREATE"))) . " ") . (($this->getAttribute($this->getAttribute(($context["context"] ?? null), "header", array()), "title", array())) ? ($this->getAttribute($this->getAttribute(($context["context"] ?? null), "header", array()), "title", array())) : ($this->getAttribute(($context["context"] ?? null), "title", array()))));
- } else {
- // line 20
- $context["title"] = $this->env->getExtension('Grav\Plugin\Admin\AdminTwigExtension')->tuFilter("PLUGIN_ADMIN.ADD_PAGE");
- }
- } else {
- // line 23
- $context["mode"] = "list";
- // line 24
- $context["title"] = $this->env->getExtension('Grav\Plugin\Admin\AdminTwigExtension')->tuFilter("PLUGIN_ADMIN.PAGES");
- }
- // line 27
- $context["modular"] = (($this->getAttribute(($context["context"] ?? null), "modular", array())) ? ("modular_") : (""));
- // line 28
- $context["warn"] = $this->getAttribute($this->getAttribute($this->getAttribute($this->getAttribute(($context["config"] ?? null), "plugins", array()), "admin", array()), "warnings", array()), "delete_page", array());
- // line 29
- $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"));
- // line 30
- $context["page_lang"] = $this->getAttribute(($context["context"] ?? null), "language", array());
- // line 31
- $context["type"] = "page";
- // line 44
- $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()))))) : ("/"));
- // line 45
- $context["preview_target"] = $this->getAttribute($this->getAttribute($this->getAttribute(($context["config"] ?? null), "plugins", array()), "admin", array()), "frontend_pages_target", array());
- // line 46
- $context["preview_link"] = (($this->getAttribute(($context["context"] ?? null), "routable", array())) ? ((((((("<a class=\"button\" target=\"" . ($context["preview_target"] ?? null)) . "\" href=\"") . ($context["preview_html"] ?? null)) . "\" title=\"") . $this->env->getExtension('Grav\Plugin\Admin\AdminTwigExtension')->tuFilter("PLUGIN_ADMIN.PREVIEW")) . "\"> <i class=\"fa fa-fw fa-eye\" style=\"font-size:18px;margin-right:0;\"></i></a>")) : (""));
- // line 1
- $this->parent->display($context, array_merge($this->blocks, $blocks));
- }
- // line 33
- public function block_stylesheets($context, array $blocks = array())
- {
- // line 34
- echo " ";
- if ((($context["mode"] ?? null) == "edit")) {
- // line 35
- echo " ";
- $this->getAttribute(($context["assets"] ?? null), "addCss", array(0 => (($context["theme_url"] ?? null) . "/css/codemirror/codemirror.css")), "method");
- // line 36
- echo " ";
- }
- // line 37
- echo " ";
- $this->displayParentBlock("stylesheets", $context, $blocks);
- echo "
- ";
- }
- // line 40
- public function block_javascripts($context, array $blocks = array())
- {
- // line 41
- echo " ";
- $this->displayParentBlock("javascripts", $context, $blocks);
- echo "
- ";
- }
- // line 121
- public function block_titlebar($context, array $blocks = array())
- {
- // line 122
- echo " <div class=\"button-bar\">
- ";
- // line 123
- if ((($context["mode"] ?? null) == "list")) {
- // line 124
- echo " <a class=\"button\" href=\"";
- echo twig_escape_filter($this->env, ($context["base_url"] ?? null), "html", null, true);
- echo "\"><i class=\"fa fa-reply\"></i> ";
- echo twig_escape_filter($this->env, $this->env->getExtension('Grav\Plugin\Admin\AdminTwigExtension')->tuFilter("PLUGIN_ADMIN.BACK"), "html", null, true);
- echo "</a>
- ";
- // line 126
- $context['_parent'] = $context;
- $context['_seq'] = twig_ensure_traversable($this->getAttribute($this->getAttribute($this->getAttribute(($context["config"] ?? null), "plugins", array()), "admin", array()), "add_modals", array()));
- foreach ($context['_seq'] as $context["key"] => $context["add_modal"]) {
- // line 127
- echo " ";
- if (($this->env->getExtension('Grav\Common\Twig\TwigExtension')->definedDefaultFilter($this->getAttribute($context["add_modal"], "show_in", array()), "bar") == "bar")) {
- // line 128
- echo " <a class=\"button ";
- echo twig_escape_filter($this->env, $this->getAttribute($context["add_modal"], "link_classes", array()), "html", null, true);
- echo "\" href=\"#modal-add_modal-";
- echo twig_escape_filter($this->env, $context["key"], "html", null, true);
- echo "\" data-remodal-target=\"modal-add_modal-";
- echo twig_escape_filter($this->env, $context["key"], "html", null, true);
- echo "\"><i class=\"fa fa-plus\"></i> ";
- echo twig_escape_filter($this->env, $this->getAttribute($context["add_modal"], "label", array()), "html", null, true);
- echo "</a>
- ";
- }
- // line 130
- echo " ";
- }
- $_parent = $context['_parent'];
- unset($context['_seq'], $context['_iterated'], $context['key'], $context['add_modal'], $context['_parent'], $context['loop']);
- $context = array_intersect_key($context, $_parent) + $_parent;
- // line 131
- echo "
- <div class=\"button-group\">
- <button type=\"button\" class=\"button disabled\" href=\"#modal\" data-remodal-target=\"modal\">
- <i class=\"fa fa-plus\"></i> ";
- // line 134
- echo twig_escape_filter($this->env, $this->env->getExtension('Grav\Plugin\Admin\AdminTwigExtension')->tuFilter("PLUGIN_ADMIN.ADD"), "html", null, true);
- echo "
- </button>
- <button type=\"button\" class=\"button dropdown-toggle\" data-toggle=\"dropdown\">
- <i class=\"fa fa-caret-down\"></i>
- </button>
- <ul class=\"dropdown-menu\">
- <li><a class=\"button\" href=\"#modal\" data-remodal-target=\"modal\">";
- // line 140
- echo twig_escape_filter($this->env, $this->env->getExtension('Grav\Plugin\Admin\AdminTwigExtension')->tuFilter("PLUGIN_ADMIN.ADD_PAGE"), "html", null, true);
- echo "</a></li>
- <li><a class=\"button\" href=\"#modal-folder\" data-remodal-target=\"modal-folder\">";
- // line 141
- echo twig_escape_filter($this->env, $this->env->getExtension('Grav\Plugin\Admin\AdminTwigExtension')->tuFilter("PLUGIN_ADMIN.ADD_FOLDER"), "html", null, true);
- echo "</a></li>
- ";
- // line 142
- if ( !twig_test_empty($this->getAttribute(($context["admin"] ?? null), "modularTypes", array()))) {
- // line 143
- echo " <li><a class=\"button\" href=\"#modular\" data-remodal-target=\"modular\">";
- echo twig_escape_filter($this->env, $this->env->getExtension('Grav\Plugin\Admin\AdminTwigExtension')->tuFilter("PLUGIN_ADMIN.ADD_MODULAR"), "html", null, true);
- echo "</a></li>
- ";
- }
- // line 145
- echo " ";
- $context['_parent'] = $context;
- $context['_seq'] = twig_ensure_traversable($this->getAttribute($this->getAttribute($this->getAttribute(($context["config"] ?? null), "plugins", array()), "admin", array()), "add_modals", array()));
- foreach ($context['_seq'] as $context["key"] => $context["add_modal"]) {
- // line 146
- echo " ";
- if (($this->env->getExtension('Grav\Common\Twig\TwigExtension')->definedDefaultFilter($this->getAttribute($context["add_modal"], "show_in", array()), "bar") == "dropdown")) {
- // line 147
- echo " <li><a class=\"button ";
- echo twig_escape_filter($this->env, $this->getAttribute($context["add_modal"], "link_classes", array()), "html", null, true);
- echo "\" href=\"#modal-add_modal-";
- echo twig_escape_filter($this->env, $context["key"], "html", null, true);
- echo "\" data-remodal-target=\"modal-add_modal-";
- echo twig_escape_filter($this->env, $context["key"], "html", null, true);
- echo "\">";
- echo twig_escape_filter($this->env, $this->getAttribute($context["add_modal"], "label", array()), "html", null, true);
- echo "</a></li>
- ";
- }
- // line 149
- echo " ";
- }
- $_parent = $context['_parent'];
- unset($context['_seq'], $context['_iterated'], $context['key'], $context['add_modal'], $context['_parent'], $context['loop']);
- $context = array_intersect_key($context, $_parent) + $_parent;
- // line 150
- echo " </ul>
- </div>
- ";
- // line 153
- if ($this->getAttribute(($context["admin"] ?? null), "multilang", array())) {
- // line 154
- echo " <div class=\"button-group\">
- <button type=\"button\" class=\"button disabled\">
- <i class=\"fa fa-flag-o\"></i>
- ";
- // line 157
- $context["langName"] = $this->getAttribute($this->getAttribute(($context["admin"] ?? null), "siteLanguages", array()), ($context["admin_lang"] ?? null), array(), "array");
- // line 158
- echo " ";
- 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);
- echo "
- </button>
- ";
- // line 160
- if ((twig_length_filter($this->env, $this->getAttribute(($context["admin"] ?? null), "languages_enabled", array())) > 1)) {
- // line 161
- echo " <button type=\"button\" class=\"button dropdown-toggle\" data-toggle=\"dropdown\">
- <i class=\"fa fa-caret-down\"></i>
- </button>
- <ul class=\"dropdown-menu language-switcher\">
- ";
- // line 165
- $context['_parent'] = $context;
- $context['_seq'] = twig_ensure_traversable($this->getAttribute(($context["admin"] ?? null), "languages_enabled", array()));
- foreach ($context['_seq'] as $context["_key"] => $context["langCode"]) {
- // line 166
- echo " ";
- $context["langName"] = $this->getAttribute($this->getAttribute(($context["admin"] ?? null), "siteLanguages", array()), $context["langCode"], array(), "array");
- // line 167
- echo " ";
- if (($context["langCode"] != ($context["admin_lang"] ?? null))) {
- // line 168
- echo " <li><a href=\"";
- 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);
- echo "\">";
- 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);
- echo "</a></li>
- ";
- }
- // line 170
- echo " ";
- }
- $_parent = $context['_parent'];
- unset($context['_seq'], $context['_iterated'], $context['_key'], $context['langCode'], $context['_parent'], $context['loop']);
- $context = array_intersect_key($context, $_parent) + $_parent;
- // line 171
- echo " </ul>
- ";
- }
- // line 173
- echo " </div>
- ";
- }
- // line 175
- echo "
- ";
- } elseif (( // line 176
- ($context["mode"] ?? null) == "edit")) {
- // line 177
- echo "
- ";
- // line 178
- echo ($context["preview_link"] ?? null);
- echo "
- <a class=\"button\" href=\"";
- // line 180
- echo twig_escape_filter($this->env, ($context["base_url"] ?? null), "html", null, true);
- echo "/pages\" title=\"";
- echo twig_escape_filter($this->env, $this->env->getExtension('Grav\Plugin\Admin\AdminTwigExtension')->tuFilter("PLUGIN_ADMIN.BACK"), "html", null, true);
- echo "\"><i class=\"fa fa-reply\"></i></a>
- ";
- // line 182
- $context["siblings"] = $this->getAttribute($this->getAttribute(($context["context"] ?? null), "parent", array(), "method"), "children", array(), "method");
- // line 183
- echo "
- ";
- // line 184
- if ( !$this->getAttribute(($context["siblings"] ?? null), "isFirst", array(0 => $this->getAttribute(($context["context"] ?? null), "path", array())), "method")) {
- // line 185
- echo " ";
- $context["sib"] = $this->getAttribute(($context["siblings"] ?? null), "nextSibling", array(0 => $this->getAttribute(($context["context"] ?? null), "path", array())), "method");
- // line 186
- echo " ";
- $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()))));
- // line 187
- echo " <a class=\"button hidden-mobile\" href=\"";
- echo twig_escape_filter($this->env, ($context["sib_url"] ?? null), "html", null, true);
- echo "\" title=\"";
- echo twig_escape_filter($this->env, $this->env->getExtension('Grav\Plugin\Admin\AdminTwigExtension')->tuFilter("PLUGIN_ADMIN.PREVIOUS"), "html", null, true);
- echo "\"><i class=\"fa fa-chevron-left\"></i></a>
- ";
- }
- // line 189
- echo "
- ";
- // line 190
- if ( !$this->getAttribute(($context["siblings"] ?? null), "isLast", array(0 => $this->getAttribute(($context["context"] ?? null), "path", array())), "method")) {
- // line 191
- echo " ";
- $context["sib"] = $this->getAttribute(($context["siblings"] ?? null), "prevSibling", array(0 => $this->getAttribute(($context["context"] ?? null), "path", array())), "method");
- // line 192
- echo " ";
- $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()))));
- // line 193
- echo " <a class=\"button hidden-mobile\" href=\"";
- echo twig_escape_filter($this->env, ($context["sib_url"] ?? null), "html", null, true);
- echo "\" title=\"";
- echo twig_escape_filter($this->env, $this->env->getExtension('Grav\Plugin\Admin\AdminTwigExtension')->tuFilter("PLUGIN_ADMIN.NEXT"), "html", null, true);
- echo "\"><i class=\"fa fa-chevron-right\"></i></a>
- ";
- }
- // line 195
- echo "
- ";
- // line 196
- if (($context["exists"] ?? null)) {
- // line 197
- echo " <div class=\"button-group\">
- <button type=\"button\" class=\"button disabled\" href=\"#modal\" data-remodal-target=\"modal\">
- <i class=\"fa fa-plus\"></i> ";
- // line 199
- echo twig_escape_filter($this->env, $this->env->getExtension('Grav\Plugin\Admin\AdminTwigExtension')->tuFilter("PLUGIN_ADMIN.ADD"), "html", null, true);
- echo "
- </button>
- <button type=\"button\" class=\"button dropdown-toggle\" data-toggle=\"dropdown\">
- <i class=\"fa fa-caret-down\"></i>
- </button>
- <ul class=\"dropdown-menu\">
- <li><a class=\"button\" href=\"#modal\" data-remodal-target=\"modal\">";
- // line 205
- echo twig_escape_filter($this->env, $this->env->getExtension('Grav\Plugin\Admin\AdminTwigExtension')->tuFilter("PLUGIN_ADMIN.ADD_PAGE"), "html", null, true);
- echo "</a></li>
- <li><a class=\"button\" href=\"#modal-folder\" data-remodal-target=\"modal-folder\">";
- // line 206
- echo twig_escape_filter($this->env, $this->env->getExtension('Grav\Plugin\Admin\AdminTwigExtension')->tuFilter("PLUGIN_ADMIN.ADD_FOLDER"), "html", null, true);
- echo "</a></li>
- ";
- // line 207
- if ( !twig_test_empty($this->getAttribute(($context["admin"] ?? null), "modularTypes", array()))) {
- // line 208
- echo " <li><a class=\"button\" href=\"#modular\" data-remodal-target=\"modular\">";
- echo twig_escape_filter($this->env, $this->env->getExtension('Grav\Plugin\Admin\AdminTwigExtension')->tuFilter("PLUGIN_ADMIN.ADD_MODULAR"), "html", null, true);
- echo "</a></li>
- ";
- }
- // line 210
- echo " </ul>
- </div>
- <a class=\"button disable-after-click\" href=\"";
- // line 213
- 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);
- echo "\" class=\"page-copy\" ><i class=\"fa fa-copy\"></i> ";
- echo twig_escape_filter($this->env, $this->env->getExtension('Grav\Plugin\Admin\AdminTwigExtension')->tuFilter("PLUGIN_ADMIN.COPY"), "html", null, true);
- echo "</a>
- <a class=\"button\" href=\"#\" data-remodal-target=\"move\"><i class=\"fa fa-arrows\"></i> ";
- // line 214
- echo twig_escape_filter($this->env, $this->env->getExtension('Grav\Plugin\Admin\AdminTwigExtension')->tuFilter("PLUGIN_ADMIN.MOVE"), "html", null, true);
- echo "</a>
- ";
- // line 215
- if ($this->getAttribute($this->getAttribute($this->getAttribute(($context["config"] ?? null), "plugins", array()), "admin-pro", array(), "array"), "enabled", array())) {
- // line 216
- echo " <a class=\"button\" href=\"#\" data-remodal-target=\"revisions\"><i class=\"fa fa-history\"></i> ";
- echo twig_escape_filter($this->env, $this->env->getExtension('Grav\Plugin\Admin\AdminTwigExtension')->tuFilter("PLUGIN_ADMIN_PRO.REVISIONS"), "html", null, true);
- echo "</a>
- ";
- }
- // line 218
- echo " ";
- if (($context["warn"] ?? null)) {
- // line 219
- echo " <a class=\"button\" href=\"#delete\" data-remodal-target=\"delete\" data-delete-url=\"";
- 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);
- echo "\"><i class=\"fa fa-close\"></i> ";
- echo twig_escape_filter($this->env, $this->env->getExtension('Grav\Plugin\Admin\AdminTwigExtension')->tuFilter("PLUGIN_ADMIN.DELETE"), "html", null, true);
- echo "</a>
- ";
- } else {
- // line 221
- echo " <a class=\"button disable-after-click\" href=\"";
- 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);
- echo "\" class=\"page-delete\" ><i class=\"fa fa-close\"></i></a>
- ";
- }
- // line 223
- echo " ";
- }
- // line 224
- echo "
- <div class=\"button-group\">
- <button class=\"button\" name=\"task\" value=\"save\" form=\"blueprints\" type=\"submit\"><i class=\"fa fa-check\"></i> ";
- // line 226
- echo twig_escape_filter($this->env, $this->env->getExtension('Grav\Plugin\Admin\AdminTwigExtension')->tuFilter("PLUGIN_ADMIN.SAVE"), "html", null, true);
- echo "</button>
- ";
- // line 227
- if ((($context["exists"] ?? null) && $this->getAttribute(($context["admin"] ?? null), "multilang", array()))) {
- // line 228
- echo " ";
- if ($this->getAttribute(($context["context"] ?? null), "untranslatedLanguages", array())) {
- // line 229
- echo " <button type=\"button\" class=\"button dropdown-toggle\" data-toggle=\"dropdown\">
- <i class=\"fa fa-caret-down\"></i>
- </button>
- <ul class=\"dropdown-menu lang-switcher\">
- ";
- // line 233
- $context['_parent'] = $context;
- $context['_seq'] = twig_ensure_traversable($this->getAttribute(($context["context"] ?? null), "untranslatedLanguages", array()));
- foreach ($context['_seq'] as $context["_key"] => $context["langCode"]) {
- // line 234
- echo " ";
- $context["langName"] = $this->getAttribute($this->getAttribute(($context["admin"] ?? null), "siteLanguages", array()), $context["langCode"], array(), "array");
- // line 235
- echo " ";
- if (($context["langCode"] != ($context["page_lang"] ?? null))) {
- // line 236
- echo " <li><button class=\"button task\" name=\"task\" value=\"saveas\" lang=\"";
- echo twig_escape_filter($this->env, $context["langCode"], "html", null, true);
- echo "\" form=\"blueprints\" type=\"submit\">";
- echo twig_escape_filter($this->env, $this->env->getExtension('Grav\Plugin\Admin\AdminTwigExtension')->tuFilter("PLUGIN_ADMIN.SAVE_AS"), "html", null, true);
- echo " ";
- 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);
- echo "</button>
- ";
- }
- // line 238
- echo " ";
- }
- $_parent = $context['_parent'];
- unset($context['_seq'], $context['_iterated'], $context['_key'], $context['langCode'], $context['_parent'], $context['loop']);
- $context = array_intersect_key($context, $_parent) + $_parent;
- // line 239
- echo " </ul>
- ";
- }
- // line 241
- echo " ";
- }
- // line 242
- echo " </div>
- ";
- }
- // line 246
- echo " </div>
- ";
- // line 247
- if ((($context["mode"] ?? null) == "new")) {
- // line 248
- echo " <h1><i class=\"fa fa-fw fa-file-text-o\"></i> ";
- echo twig_escape_filter($this->env, $this->env->getExtension('Grav\Plugin\Admin\AdminTwigExtension')->tuFilter("PLUGIN_ADMIN.ADD_PAGE"), "html", null, true);
- echo "</h1>
- ";
- } elseif (( // line 249
- ($context["mode"] ?? null) == "edit")) {
- // line 250
- echo " <h1><i class=\"fa fa-fw fa-file-text-o\"></i>
- ";
- // line 251
- echo twig_escape_filter($this->env, $this->getAttribute(($context["context"] ?? null), "menu", array()), "html", null, true);
- echo "
- </h1>
- ";
- } else {
- // line 254
- echo " <h1><i class=\"fa fa-fw fa-file-text-o\"></i> ";
- echo twig_escape_filter($this->env, $this->env->getExtension('Grav\Plugin\Admin\AdminTwigExtension')->tuFilter("PLUGIN_ADMIN.MANAGE_PAGES"), "html", null, true);
- echo "</h1>
- ";
- }
- }
- // line 258
- public function block_content($context, array $blocks = array())
- {
- // line 259
- echo " <div class=\"clear admin-pages\">
- ";
- // line 260
- if ((($context["mode"] ?? null) == "new")) {
- // line 261
- echo " ";
- $this->loadTemplate("partials/blueprints-new.html.twig", "pages.html.twig", 261)->display(array_merge($context, array("blueprints" => $this->getAttribute(($context["admin"] ?? null), "blueprints", array(0 => "pages/page"), "method"), "data" => ($context["context"] ?? null))));
- // line 262
- echo " ";
- } elseif ((($context["mode"] ?? null) == "edit")) {
- // line 263
- echo " <div class=\"admin-form-wrapper\">
- <div id=\"admin-topbar\">
- ";
- // line 266
- if (($this->getAttribute(($context["admin"] ?? null), "multilang", array()) && ($context["page_lang"] ?? null))) {
- // line 267
- echo " <div id=\"admin-lang-toggle\" class=\"button-group\">
- <button type=\"button\" class=\"button disabled\">
- ";
- // line 269
- if (($context["exists"] ?? null)) {
- // line 270
- echo " ";
- echo twig_escape_filter($this->env, ($context["page_lang"] ?? null), "html", null, true);
- echo "
- ";
- } else {
- // line 272
- echo " ";
- echo twig_escape_filter($this->env, ($context["admin_lang"] ?? null), "html", null, true);
- echo "
- ";
- }
- // line 274
- echo " </button>
- ";
- // line 275
- if ((($context["exists"] ?? null) && (twig_length_filter($this->env, $this->getAttribute(($context["context"] ?? null), "translatedLanguages", array())) > 1))) {
- // line 276
- echo " <button type=\"button\" class=\"button dropdown-toggle\" data-toggle=\"dropdown\">
- <i class=\"fa fa-caret-down\"></i>
- </button>
- <ul class=\"dropdown-menu language-switcher\">
- ";
- // line 280
- $context['_parent'] = $context;
- $context['_seq'] = twig_ensure_traversable($this->getAttribute(($context["context"] ?? null), "translatedLanguages", array()));
- foreach ($context['_seq'] as $context["language"] => $context["route"]) {
- // line 281
- echo " ";
- if (($context["language"] != ($context["page_lang"] ?? null))) {
- // line 282
- echo " <li><button class=\"task\" name=\"task\" value=\"switchlanguage\" lang=\"";
- echo twig_escape_filter($this->env, $context["language"], "html", null, true);
- echo "\" redirect=\"";
- echo twig_escape_filter($this->env, twig_trim_filter($this->getAttribute(($context["context"] ?? null), "rawRoute", array()), "/"), "html", null, true);
- echo "\" form=\"blueprints\">";
- echo twig_escape_filter($this->env, $context["language"], "html", null, true);
- echo "</button>
- ";
- }
- // line 284
- echo " ";
- }
- $_parent = $context['_parent'];
- unset($context['_seq'], $context['_iterated'], $context['language'], $context['route'], $context['_parent'], $context['loop']);
- $context = array_intersect_key($context, $_parent) + $_parent;
- // line 285
- echo " </ul>
- ";
- }
- // line 287
- echo " </div>
- ";
- }
- // line 289
- echo "
- ";
- // line 290
- if ($this->getAttribute($this->getAttribute(($context["context"] ?? null), "blueprints", array()), "fields", array())) {
- // line 291
- echo " ";
- $context["normalText"] = $this->env->getExtension('Grav\Plugin\Admin\AdminTwigExtension')->tuFilter("PLUGIN_ADMIN.NORMAL");
- // line 292
- echo " ";
- $context["expertText"] = $this->env->getExtension('Grav\Plugin\Admin\AdminTwigExtension')->tuFilter("PLUGIN_ADMIN.EXPERT");
- // line 293
- echo " ";
- $context["maxLen"] = max(array(0 => twig_length_filter($this->env, ($context["normalText"] ?? null)), 1 => twig_length_filter($this->env, ($context["expertText"] ?? null))));
- // line 294
- echo " ";
- $context["normalText"] = $this->getAttribute($this, "spanToggle", array(0 => ($context["normalText"] ?? null), 1 => ($context["maxLen"] ?? null)), "method");
- // line 295
- echo " ";
- $context["expertText"] = $this->getAttribute($this, "spanToggle", array(0 => ($context["expertText"] ?? null), 1 => ($context["maxLen"] ?? null)), "method");
- // line 296
- echo " <form id=\"admin-mode-toggle\">
- <div class=\"switch-toggle switch-grav\">
- <input type=\"radio\" value=\"normal\" data-leave-url=\"";
- // line 298
- echo twig_escape_filter($this->env, ($context["base_url"] ?? null), "html", null, true);
- echo "/pages/";
- echo twig_escape_filter($this->env, twig_trim_filter($this->getAttribute(($context["admin"] ?? null), "route", array()), "/"), "html", null, true);
- echo "/mode";
- echo twig_escape_filter($this->env, $this->getAttribute($this->getAttribute(($context["config"] ?? null), "system", array()), "param_sep", array()), "html", null, true);
- echo "normal\" id=\"normal\" name=\"mode-switch\" class=\"highlight\" ";
- if (($this->getAttribute($this->getAttribute(($context["admin"] ?? null), "session", array()), "expert", array()) == "0")) {
- echo " checked=\"checked\"";
- }
- echo ">
- <label for=\"normal\">";
- // line 299
- echo ($context["normalText"] ?? null);
- echo "</label>
- <input type=\"radio\" value=\"expert\" data-leave-url=\"";
- // line 300
- echo twig_escape_filter($this->env, ($context["base_url"] ?? null), "html", null, true);
- echo "/pages/";
- echo twig_escape_filter($this->env, twig_trim_filter($this->getAttribute(($context["admin"] ?? null), "route", array()), "/"), "html", null, true);
- echo "/mode";
- echo twig_escape_filter($this->env, $this->getAttribute($this->getAttribute(($context["config"] ?? null), "system", array()), "param_sep", array()), "html", null, true);
- echo "expert\" id=\"expert\" name=\"mode-switch\" class=\"highlight\" ";
- if (($this->getAttribute($this->getAttribute(($context["admin"] ?? null), "session", array()), "expert", array()) == "1")) {
- echo " checked=\"checked\"";
- }
- echo ">
- <label for=\"expert\">";
- // line 301
- echo ($context["expertText"] ?? null);
- echo "</label>
- <a></a>
- </div>
- </form>
- ";
- }
- // line 306
- echo "
- </div>
- ";
- // line 309
- if (($this->getAttribute($this->getAttribute(($context["context"] ?? null), "blueprints", array()), "fields", array()) && ($this->getAttribute($this->getAttribute(($context["admin"] ?? null), "session", array()), "expert", array()) == "0"))) {
- // line 310
- echo " ";
- $this->loadTemplate("partials/blueprints.html.twig", "pages.html.twig", 310)->display(array_merge($context, array("blueprints" => $this->getAttribute(($context["context"] ?? null), "blueprints", array()), "data" => ($context["context"] ?? null))));
- // line 311
- echo " ";
- } else {
- // line 312
- echo " ";
- $this->loadTemplate("partials/blueprints-raw.html.twig", "pages.html.twig", 312)->display(array_merge($context, array("blueprints" => $this->getAttribute(($context["admin"] ?? null), "blueprints", array(0 => (("admin/pages/" . ($context["modular"] ?? null)) . "raw")), "method"), "data" => ($context["context"] ?? null))));
- // line 313
- echo " ";
- }
- // line 314
- echo " </div>
- ";
- } else {
- // line 316
- echo " <form id=\"page-filtering\">
- <div class=\"page-filters\">
- <input type=\"text\" data-filter-labels=\"";
- // line 318
- echo twig_escape_filter($this->env, twig_jsonencode_filter(array(0 => array("id" => "mode", "name" => $this->env->getExtension('Grav\Plugin\Admin\AdminTwigExtension')->tuFilter("PLUGIN_ADMIN.PAGE_MODES")), 1 => array("id" => "type", "name" => $this->env->getExtension('Grav\Plugin\Admin\AdminTwigExtension')->tuFilter("PLUGIN_ADMIN.PAGE_TYPES")), 2 => array("id" => "access", "name" => $this->env->getExtension('Grav\Plugin\Admin\AdminTwigExtension')->tuFilter("PLUGIN_ADMIN.ACCESS_LEVELS")))), "html_attr");
- echo "\" data-filter-types=\"";
- 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");
- echo "\" data-filter-access-levels=\"";
- echo twig_escape_filter($this->env, twig_jsonencode_filter($this->getAttribute(($context["admin"] ?? null), "accessLevels", array())), "html_attr");
- echo "\" placeholder=\"";
- echo twig_escape_filter($this->env, $this->env->getExtension('Grav\Plugin\Admin\AdminTwigExtension')->tuFilter("PLUGIN_ADMIN.ADD_FILTERS"), "html", null, true);
- echo "\" class=\"page-filter\" name=\"page-filter\" />
- </div>
- <div class=\"page-search\">
- <input type=\"text\" placeholder=\"";
- // line 321
- echo twig_escape_filter($this->env, $this->env->getExtension('Grav\Plugin\Admin\AdminTwigExtension')->tuFilter("PLUGIN_ADMIN.SEARCH_PAGES"), "html", null, true);
- echo "\" name=\"page-search\" />
- </div>
- <div class=\"page-shortcuts\">
- <span class=\"button button-x-small\" data-page-toggleall=\"expand\"><i class=\"fa fa-fw fa-plus-circle\"></i> ";
- // line 324
- echo twig_escape_filter($this->env, $this->env->getExtension('Grav\Plugin\Admin\AdminTwigExtension')->tuFilter("PLUGIN_ADMIN.EXPAND_ALL"), "html", null, true);
- echo "</span>
- <span class=\"button button-x-small\" data-page-toggleall=\"collapse\"><i class=\"fa fa-fw fa-minus-circle\"></i> ";
- // line 325
- echo twig_escape_filter($this->env, $this->env->getExtension('Grav\Plugin\Admin\AdminTwigExtension')->tuFilter("PLUGIN_ADMIN.COLLAPSE_ALL"), "html", null, true);
- echo "</span>
- </div>
- </form>
- <div class=\"pages-list\">
- <ul class=\"depth-0\">
- ";
- // line 330
- echo $this->getAttribute($this, "loop", array(0 => ($context["pages"] ?? null), 1 => 0, 2 => $context), "method");
- echo "
- </ul>
- ";
- // line 332
- $this->loadTemplate("partials/page-legend.html.twig", "pages.html.twig", 332)->display($context);
- // line 333
- echo " </div>
- ";
- }
- // line 335
- echo " </div>
- ";
- // line 337
- if (($context["context"] ?? null)) {
- // line 338
- echo " ";
- $context["obj_data"] = $this->env->getExtension('Grav\Plugin\Admin\AdminTwigExtension')->cloneFunc(($context["context"] ?? null));
- // line 339
- echo "
- ";
- // line 340
- if ((($context["mode"] ?? null) == "edit")) {
- // line 341
- echo " ";
- $this->getAttribute(($context["obj_data"] ?? null), "folder", array(0 => ""), "method");
- // line 342
- echo " ";
- }
- // line 343
- echo " ";
- }
- // line 344
- echo "
- ";
- // line 345
- if (((($context["mode"] ?? null) == "list") || (($context["mode"] ?? null) == "edit"))) {
- // line 346
- echo " <div class=\"remodal\" data-remodal-id=\"modal\" data-remodal-options=\"hashTracking: false\">
- ";
- // line 347
- $this->loadTemplate("partials/blueprints-new.html.twig", "pages.html.twig", 347)->display(array_merge($context, array("blueprints" => $this->getAttribute(($context["admin"] ?? null), "blueprints", array(0 => "admin/pages/new"), "method"), "data" => ($context["obj_data"] ?? null), "form_id" => "new-page")));
- // line 348
- echo " </div>
- <div class=\"remodal\" data-remodal-id=\"modal-folder\" data-remodal-options=\"hashTracking: false\">
- ";
- // line 351
- $this->loadTemplate("partials/blueprints-new-folder.html.twig", "pages.html.twig", 351)->display(array_merge($context, array("blueprints" => $this->getAttribute(($context["admin"] ?? null), "blueprints", array(0 => "admin/pages/new_folder"), "method"), "data" => ($context["obj_data"] ?? null), "form_id" => "new-folder")));
- // line 352
- echo " </div>
- <div class=\"remodal\" data-remodal-id=\"modular\" data-remodal-options=\"hashTracking: false\">
- ";
- // line 355
- $this->loadTemplate("partials/blueprints-new.html.twig", "pages.html.twig", 355)->display(array_merge($context, array("blueprints" => $this->getAttribute(($context["admin"] ?? null), "blueprints", array(0 => "admin/pages/modular_new"), "method"), "data" => ($context["obj_data"] ?? null), "form_id" => "new-modular")));
- // line 356
- echo " </div>
- ";
- // line 358
- $context['_parent'] = $context;
- $context['_seq'] = twig_ensure_traversable($this->getAttribute($this->getAttribute($this->getAttribute(($context["config"] ?? null), "plugins", array()), "admin", array()), "add_modals", array()));
- $context['loop'] = array(
- 'parent' => $context['_parent'],
- 'index0' => 0,
- 'index' => 1,
- 'first' => true,
- );
- if (is_array($context['_seq']) || (is_object($context['_seq']) && $context['_seq'] instanceof Countable)) {
- $length = count($context['_seq']);
- $context['loop']['revindex0'] = $length - 1;
- $context['loop']['revindex'] = $length;
- $context['loop']['length'] = $length;
- $context['loop']['last'] = 1 === $length;
- }
- foreach ($context['_seq'] as $context["key"] => $context["add_modal"]) {
- // line 359
- echo " <div class=\"remodal ";
- 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);
- echo "\" data-remodal-id=\"modal-add_modal-";
- echo twig_escape_filter($this->env, $context["key"], "html", null, true);
- echo "\" data-remodal-options=\"hashTracking: false\">
- ";
- // line 360
- $this->loadTemplate($this->env->getExtension('Grav\Common\Twig\TwigExtension')->definedDefaultFilter($this->getAttribute($context["add_modal"], "template", array()), "partials/blueprints-new.html.twig"), "pages.html.twig", 360)->display(array_merge($context, twig_array_merge(array("blueprints" => $this->getAttribute(($context["admin"] ?? null), "blueprints", array(0 => $this->getAttribute($context["add_modal"], "blueprint", array())), "method"), "data" => ($context["context"] ?? null), "form_id" => "add-modal"), $this->env->getExtension('Grav\Common\Twig\TwigExtension')->definedDefaultFilter($this->getAttribute($context["add_modal"], "with", array()), array()))));
- // line 361
- echo " </div>
- ";
- ++$context['loop']['index0'];
- ++$context['loop']['index'];
- $context['loop']['first'] = false;
- if (isset($context['loop']['length'])) {
- --$context['loop']['revindex0'];
- --$context['loop']['revindex'];
- $context['loop']['last'] = 0 === $context['loop']['revindex0'];
- }
- }
- $_parent = $context['_parent'];
- unset($context['_seq'], $context['_iterated'], $context['key'], $context['add_modal'], $context['_parent'], $context['loop']);
- $context = array_intersect_key($context, $_parent) + $_parent;
- // line 363
- echo " ";
- }
- // line 364
- echo "
- ";
- // line 366
- if ((($context["mode"] ?? null) == "edit")) {
- // line 367
- echo " <div class=\"remodal\" data-remodal-id=\"move\" data-remodal-options=\"hashTracking: false\">
- ";
- // line 369
- $this->loadTemplate("partials/page-move.html.twig", "pages.html.twig", 369)->display(array_merge($context, array("blueprints" => $this->getAttribute(($context["admin"] ?? null), "blueprints", array(0 => "admin/pages/move"), "method"), "data" => ($context["context"] ?? null))));
- // line 370
- echo " </div>
- <div class=\"remodal\" data-remodal-id=\"revisions\" data-remodal-options=\"hashTracking: false\">
- ";
- // line 372
- try {
- $this->loadTemplate(array(0 => "partials/page-revisions.html.twig", 1 => "empty.html.twig"), "pages.html.twig", 372)->display(array_merge($context, array("data" => ($context["context"] ?? null))));
- } catch (Twig_Error_Loader $e) {
- // ignore missing template
- }
- // line 373
- echo " </div>
- ";
- }
- // line 375
- echo "
- ";
- // line 376
- $this->loadTemplate("partials/modal-changes-detected.html.twig", "pages.html.twig", 376)->display($context);
- // line 377
- echo "
- <div class=\"remodal\" data-remodal-id=\"delete\" data-remodal-options=\"hashTracking: false\">
- <form>
- <h1>";
- // line 380
- echo twig_escape_filter($this->env, $this->env->getExtension('Grav\Plugin\Admin\AdminTwigExtension')->tuFilter("PLUGIN_ADMIN.MODAL_DELETE_PAGE_CONFIRMATION_REQUIRED_TITLE"), "html", null, true);
- echo "</h1>
- <p class=\"bigger\">
- ";
- // line 382
- if (($context["context"] ?? null)) {
- // line 383
- echo " <strong>";
- echo twig_escape_filter($this->env, $this->env->getExtension('Grav\Plugin\Admin\AdminTwigExtension')->tuFilter("PLUGIN_ADMIN.PAGE"), "html", null, true);
- echo ": ";
- echo twig_escape_filter($this->env, $this->getAttribute(($context["context"] ?? null), "title", array()), "html", null, true);
- echo "</strong>
- ";
- }
- // line 385
- echo " </p>
- <p class=\"bigger\">
- ";
- // line 387
- echo twig_escape_filter($this->env, $this->env->getExtension('Grav\Plugin\Admin\AdminTwigExtension')->tuFilter("PLUGIN_ADMIN.MODAL_DELETE_PAGE_CONFIRMATION_REQUIRED_DESC"), "html", null, true);
- echo "
- </p>
- <br>
- <div class=\"button-bar\">
- <button data-remodal-action=\"cancel\" class=\"button secondary remodal-cancel\"><i class=\"fa fa-fw fa-close\"></i> ";
- // line 391
- echo twig_escape_filter($this->env, $this->env->getExtension('Grav\Plugin\Admin\AdminTwigExtension')->tuFilter("PLUGIN_ADMIN.CANCEL"), "html", null, true);
- echo "</button>
- <a class=\"button disable-after-click\" data-delete-action href=\"#\"><i class=\"fa fa-fw fa-check\"></i> ";
- // line 392
- echo twig_escape_filter($this->env, $this->env->getExtension('Grav\Plugin\Admin\AdminTwigExtension')->tuFilter("PLUGIN_ADMIN.CONTINUE"), "html", null, true);
- echo "</a>
- </div>
- </form>
- </div>
- ";
- // line 397
- try {
- $this->loadTemplate("partials/admin-pro-pages-addons.html.twig", "pages.html.twig", 397)->display($context);
- } catch (Twig_Error_Loader $e) {
- // ignore missing template
- }
- // line 398
- echo "
- ";
- }
- // line 401
- public function block_bottom($context, array $blocks = array())
- {
- // line 402
- echo "<script>
- \$('.admin-pages .form-tabs .tabs-nav').css('margin-right', (\$('#admin-topbar').width() + 20) + 'px');
- </script>
- ";
- }
- // line 3
- public function getspanToggle($__input__ = null, $__length__ = null, ...$__varargs__)
- {
- $context = $this->env->mergeGlobals(array(
- "input" => $__input__,
- "length" => $__length__,
- "varargs" => $__varargs__,
- ));
- $blocks = array();
- ob_start();
- try {
- // line 4
- echo " ";
- echo (($this->env->getExtension('Grav\Common\Twig\TwigExtension')->repeatFunc(" ", ((($context["length"] ?? null) - twig_length_filter($this->env, ($context["input"] ?? null))) / 2)) . ($context["input"] ?? null)) . $this->env->getExtension('Grav\Common\Twig\TwigExtension')->repeatFunc(" ", ((($context["length"] ?? null) - twig_length_filter($this->env, ($context["input"] ?? null))) / 2)));
- echo "
- ";
- } catch (Exception $e) {
- ob_end_clean();
- throw $e;
- } catch (Throwable $e) {
- ob_end_clean();
- throw $e;
- }
- return ('' === $tmp = ob_get_clean()) ? '' : new Twig_Markup($tmp, $this->env->getCharset());
- }
- // line 48
- public function getloop($__page__ = null, $__depth__ = null, $__twig_vars__ = null, ...$__varargs__)
- {
- $context = $this->env->mergeGlobals(array(
- "page" => $__page__,
- "depth" => $__depth__,
- "twig_vars" => $__twig_vars__,
- "varargs" => $__varargs__,
- ));
- $blocks = array();
- ob_start();
- try {
- // line 49
- echo " ";
- $context["separator"] = $this->getAttribute($this->getAttribute($this->getAttribute(($context["twig_vars"] ?? null), "config", array(), "array"), "system", array()), "param_sep", array());
- // line 50
- echo " ";
- $context["display_field"] = $this->getAttribute($this->getAttribute($this->getAttribute($this->getAttribute(($context["twig_vars"] ?? null), "config", array(), "array"), "plugins", array()), "admin", array()), "pages_list_display_field", array());
- // line 51
- echo " ";
- $context["base_url"] = $this->getAttribute(($context["twig_vars"] ?? null), "base_url_relative", array(), "array");
- // line 52
- echo " ";
- $context["base_url_simple"] = $this->getAttribute(($context["twig_vars"] ?? null), "base_url_simple", array(), "array");
- // line 53
- echo " ";
- $context["admin_route"] = $this->getAttribute(($context["twig_vars"] ?? null), "admin_route", array(), "array");
- // line 54
- echo " ";
- $context["admin_lang"] = $this->getAttribute(($context["twig_vars"] ?? null), "admin_lang", array(), "array");
- // line 55
- echo " ";
- $context["warn"] = $this->getAttribute(($context["twig_vars"] ?? null), "warn", array(), "array");
- // line 56
- echo " ";
- $context["uri"] = $this->getAttribute(($context["twig_vars"] ?? null), "uri", array(), "array");
- // line 57
- echo "
- ";
- // line 58
- 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()))) {
- // line 59
- echo " ";
- if ($this->getAttribute($this->getAttribute($this->getAttribute($this->getAttribute(($context["page"] ?? null), "header", array()), "content", array()), "order", array()), "custom", array())) {
- // line 60
- echo " ";
- $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");
- // line 61
- echo " ";
- } else {
- // line 62
- echo " ";
- $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");
- // line 63
- echo " ";
- }
- // line 64
- echo " ";
- } else {
- // line 65
- echo " ";
- $context["pcol"] = $this->getAttribute(($context["page"] ?? null), "children", array(), "method");
- // line 66
- echo " ";
- }
- // line 67
- echo "
- ";
- // line 68
- $context['_parent'] = $context;
- $context['_seq'] = twig_ensure_traversable(($context["pcol"] ?? null));
- foreach ($context['_seq'] as $context["_key"] => $context["p"]) {
- // line 69
- echo " ";
- $context["description"] = (((((( !$this->getAttribute($context["p"], "page", array())) ? (($this->env->getExtension('Grav\Plugin\Admin\AdminTwigExtension')->tuFilter("PLUGIN_ADMIN.FOLDER") . " • ")) : (($this->env->getExtension('Grav\Plugin\Admin\AdminTwigExtension')->tuFilter("PLUGIN_ADMIN.PAGE") . " • "))) . (($this->getAttribute( // line 70
- $context["p"], "modular", array())) ? (($this->env->getExtension('Grav\Plugin\Admin\AdminTwigExtension')->tuFilter("PLUGIN_ADMIN.MODULAR") . " • ")) : (""))) . (($this->getAttribute( // line 71
- $context["p"], "routable", array())) ? (($this->env->getExtension('Grav\Plugin\Admin\AdminTwigExtension')->tuFilter("PLUGIN_ADMIN.ROUTABLE") . " • ")) : (($this->env->getExtension('Grav\Plugin\Admin\AdminTwigExtension')->tuFilter("PLUGIN_ADMIN.NON_ROUTABLE") . " • ")))) . (($this->getAttribute( // line 72
- $context["p"], "visible", array())) ? (($this->env->getExtension('Grav\Plugin\Admin\AdminTwigExtension')->tuFilter("PLUGIN_ADMIN.VISIBLE") . " • ")) : (($this->env->getExtension('Grav\Plugin\Admin\AdminTwigExtension')->tuFilter("PLUGIN_ADMIN.NON_VISIBLE") . " • ")))) . (($this->getAttribute( // line 73
- $context["p"], "published", array())) ? (($this->env->getExtension('Grav\Plugin\Admin\AdminTwigExtension')->tuFilter("PLUGIN_ADMIN.PUBLISHED") . " • ")) : (($this->env->getExtension('Grav\Plugin\Admin\AdminTwigExtension')->tuFilter("PLUGIN_ADMIN.NON_PUBLISHED") . " • "))));
- // line 74
- echo " ";
- // line 75
- echo " ";
- // line 76
- echo " ";
- // line 77
- echo " ";
- // line 78
- echo " ";
- // line 79
- echo " ";
- // line 80
- echo "
- ";
- // line 81
- $context["page_url"] = $this->env->getExtension('Grav\Plugin\Admin\AdminTwigExtension')->getPageUrl($context, $context["p"]);
- // line 82
- echo "
- <li class=\"page-item\" data-nav-id=\"";
- // line 83
- echo twig_escape_filter($this->env, $this->getAttribute($context["p"], "route", array()), "html", null, true);
- echo "\">
- <div class=\"row page-item__row\">
- <span class=\"page-item__toggle\" ";
- // line 85
- echo ((($this->getAttribute($this->getAttribute($context["p"], "children", array(0 => 0), "method"), "count", array()) > 0)) ? ("data-toggle=\"children\"") : (""));
- echo ">
- <i class=\"page-icon fa fa-fw fa-circle-o ";
- // line 86
- echo ((($this->getAttribute($this->getAttribute($context["p"], "children", array(0 => 0), "method"), "count", array()) > 0)) ? ("children-closed") : (""));
- echo " ";
- 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") : (""))))))));
- echo "\"></i>
- </span>
- <div class=\"page-item__content\">
- <div class=\"page-item__content-name\">
- <span data-hint=\"";
- // line 90
- echo twig_trim_filter(($context["description"] ?? null), " • ");
- echo "\" class=\"hint--top page-item__content-hint\">
- ";
- // line 91
- $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()));
- // line 92
- echo " <a href=\"";
- echo twig_escape_filter($this->env, ($context["page_url"] ?? null), "html", null, true);
- echo "\" class=\"page-edit\">";
- echo twig_escape_filter($this->env, ($context["page_label"] ?? null));
- echo "</a>
- </span>
- ";
- // line 94
- if ($this->getAttribute($context["p"], "language", array())) {
- // line 95
- echo " <span class=\"badge lang ";
- if (($this->getAttribute($context["p"], "language", array()) == ($context["admin_lang"] ?? null))) {
- echo "info";
- }
- echo "\">";
- echo twig_escape_filter($this->env, $this->getAttribute($context["p"], "language", array()), "html", null, true);
- echo "</span>
- ";
- }
- // line 97
- echo " ";
- if ($this->getAttribute($context["p"], "home", array())) {
- // line 98
- echo " <span class=\"page-home\"><i class=\"fa fa-home\"></i></span>
- ";
- }
- // line 100
- echo " </div>
- <p class=\"page-route\">";
- // line 101
- 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);
- echo " <span class=\"spacer\"><i class=\"fa fa-long-arrow-right\"></i></span> ";
- echo twig_escape_filter($this->env, $this->getAttribute($context["p"], "template", array(), "method"), "html", null, true);
- echo "</p>
- </div>
- <span class=\"page-item__tools\">
- ";
- // line 104
- if (($context["warn"] ?? null)) {
- // line 105
- echo " <a href=\"#delete\" data-remodal-target=\"delete\" data-delete-url=\"";
- 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);
- echo "\" class=\"page-delete\" ><i class=\"fa fa-close\"></i></a>
- ";
- } else {
- // line 107
- echo " <a href=\"";
- 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);
- echo "\" class=\"page-delete\" ><i class=\"fa fa-close\"></i></a>
- ";
- }
- // line 109
- echo " </span>
- </div>
- ";
- // line 111
- if (($this->getAttribute($this->getAttribute($context["p"], "children", array(), "method"), "count", array()) > 0)) {
- // line 112
- echo " <ul class=\"depth-";
- echo twig_escape_filter($this->env, (($context["depth"] ?? null) + 1), "html", null, true);
- echo "\" style=\"display:none;\">
- ";
- // line 113
- echo $this->getAttribute($this, "loop", array(0 => $context["p"], 1 => (($context["depth"] ?? null) + 1), 2 => ($context["twig_vars"] ?? null)), "method");
- echo "
- </ul>
- ";
- }
- // line 116
- echo " </li>
- ";
- }
- $_parent = $context['_parent'];
- unset($context['_seq'], $context['_iterated'], $context['_key'], $context['p'], $context['_parent'], $context['loop']);
- $context = array_intersect_key($context, $_parent) + $_parent;
- } catch (Exception $e) {
- ob_end_clean();
- throw $e;
- } catch (Throwable $e) {
- ob_end_clean();
- throw $e;
- }
- return ('' === $tmp = ob_get_clean()) ? '' : new Twig_Markup($tmp, $this->env->getCharset());
- }
- public function getTemplateName()
- {
- return "pages.html.twig";
- }
- public function isTraitable()
- {
- return false;
- }
- public function getDebugInfo()
- {
- return array ( 1116 => 116, 1110 => 113, 1105 => 112, 1103 => 111, 1099 => 109, 1093 => 107, 1087 => 105, 1085 => 104, 1077 => 101, 1074 => 100, 1070 => 98, 1067 => 97, 1057 => 95, 1055 => 94, 1047 => 92, 1045 => 91, 1041 => 90, 1032 => 86, 1028 => 85, 1023 => 83, 1020 => 82, 1018 => 81, 1015 => 80, 1013 => 79, 1011 => 78, 1009 => 77, 1007 => 76, 1005 => 75, 1003 => 74, 1001 => 73, 1000 => 72, 999 => 71, 998 => 70, 996 => 69, 992 => 68, 989 => 67, 986 => 66, 983 => 65, 980 => 64, 977 => 63, 974 => 62, 971 => 61, 968 => 60, 965 => 59, 963 => 58, 960 => 57, 957 => 56, 954 => 55, 951 => 54, 948 => 53, 945 => 52, 942 => 51, 939 => 50, 936 => 49, 922 => 48, 904 => 4, 891 => 3, 884 => 402, 881 => 401, 876 => 398, 869 => 397, 861 => 392, 857 => 391, 850 => 387, 846 => 385, 838 => 383, 836 => 382, 831 => 380, 826 => 377, 824 => 376, 821 => 375, 817 => 373, 810 => 372, 806 => 370, 804 => 369, 800 => 367, 798 => 366, 794 => 364, 791 => 363, 776 => 361, 774 => 360, 767 => 359, 750 => 358, 746 => 356, 744 => 355, 739 => 352, 737 => 351, 732 => 348, 730 => 347, 727 => 346, 725 => 345, 722 => 344, 719 => 343, 716 => 342, 713 => 341, 711 => 340, 708 => 339, 705 => 338, 703 => 337, 699 => 335, 695 => 333, 693 => 332, 688 => 330, 680 => 325, 676 => 324, 670 => 321, 658 => 318, 654 => 316, 650 => 314, 647 => 313, 644 => 312, 641 => 311, 638 => 310, 636 => 309, 631 => 306, 623 => 301, 611 => 300, 607 => 299, 595 => 298, 591 => 296, 588 => 295, 585 => 294, 582 => 293, 579 => 292, 576 => 291, 574 => 290, 571 => 289, 567 => 287, 563 => 285, 557 => 284, 547 => 282, 544 => 281, 540 => 280, 534 => 276, 532 => 275, 529 => 274, 523 => 272, 517 => 270, 515 => 269, 511 => 267, 509 => 266, 504 => 263, 501 => 262, 498 => 261, 496 => 260, 493 => 259, 490 => 258, 482 => 254, 476 => 251, 473 => 250, 471 => 249, 466 => 248, 464 => 247, 461 => 246, 455 => 242, 452 => 241, 448 => 239, 442 => 238, 432 => 236, 429 => 235, 426 => 234, 422 => 233, 416 => 229, 413 => 228, 411 => 227, 407 => 226, 403 => 224, 400 => 223, 394 => 221, 386 => 219, 383 => 218, 377 => 216, 375 => 215, 371 => 214, 365 => 213, 360 => 210, 354 => 208, 352 => 207, 348 => 206, 344 => 205, 335 => 199, 331 => 197, 329 => 196, 326 => 195, 318 => 193, 315 => 192, 312 => 191, 310 => 190, 307 => 189, 299 => 187, 296 => 186, 293 => 185, 291 => 184, 288 => 183, 286 => 182, 279 => 180, 274 => 178, 271 => 177, 269 => 176, 266 => 175, 262 => 173, 258 => 171, 252 => 170, 244 => 168, 241 => 167, 238 => 166, 234 => 165, 228 => 161, 226 => 160, 220 => 158, 218 => 157, 213 => 154, 211 => 153, 206 => 150, 200 => 149, 188 => 147, 185 => 146, 180 => 145, 174 => 143, 172 => 142, 168 => 141, 164 => 140, 155 => 134, 150 => 131, 144 => 130, 132 => 128, 129 => 127, 125 => 126, 117 => 124, 115 => 123, 112 => 122, 109 => 121, 102 => 41, 99 => 40, 92 => 37, 89 => 36, 86 => 35, 83 => 34, 80 => 33, 76 => 1, 74 => 46, 72 => 45, 70 => 44, 68 => 31, 66 => 30, 64 => 29, 62 => 28, 60 => 27, 57 => 24, 55 => 23, 51 => 20, 48 => 18, 46 => 17, 44 => 16, 42 => 15, 40 => 14, 38 => 13, 36 => 12, 34 => 11, 31 => 8, 29 => 7, 11 => 1,);
- }
- /** @deprecated since 1.27 (to be removed in 2.0). Use getSourceContext() instead */
- public function getSource()
- {
- @trigger_error('The '.__METHOD__.' method is deprecated since version 1.27 and will be removed in 2.0. Use getSourceContext() instead.', E_USER_DEPRECATED);
- return $this->getSourceContext()->getCode();
- }
- public function getSourceContext()
- {
- return new Twig_Source("{% extends 'partials/base.html.twig' %}
- {% macro spanToggle(input, length) %}
- {{ (repeat(' ', (length - input|length) / 2) ~ input ~ repeat(' ', (length - input|length) / 2))|raw }}
- {% endmacro %}
- {% if admin.route %}
- {% set context = admin.page(true) %}
- {% endif %}
- {% if uri.param('new') %}
- {% set mode = 'new' %}
- {% elseif context %}
- {% set mode = 'edit' %}
- {% if context.exists %}
- {% set page_url = base_url ~ '/pages' ~ (context.header.routes.default ?: context.rawRoute) %}
- {% set exists = true %}
- {% set title = (context.exists ? \"PLUGIN_ADMIN.EDIT\"|tu : \"PLUGIN_ADMIN.CREATE\"|tu ) ~ \" \" ~ (context.header.title ?: context.title) %}
- {% else %}
- {% set title = \"PLUGIN_ADMIN.ADD_PAGE\"|tu %}
- {% endif %}
- {% else %}
- {% set mode = 'list' %}
- {% set title = \"PLUGIN_ADMIN.PAGES\"|tu %}
- {% endif %}
- {% set modular = context.modular ? 'modular_' : '' %}
- {% set warn = config.plugins.admin.warnings.delete_page %}
- {% set admin_lang = admin.session.admin_lang ?: 'en' %}
- {% set page_lang = context.language %}
- {% set type = 'page' %}
- {% block stylesheets %}
- {% if mode == 'edit' %}
- {% do assets.addCss(theme_url~'/css/codemirror/codemirror.css') %}
- {% endif %}
- {{ parent() }}
- {% endblock %}
- {% block javascripts %}
- {{ parent() }}
- {% endblock %}
- {% set preview_html = (base_url_relative_frontend|rtrim('/') ~ (context.home ? '' : context.route)) ?: '/' %}
- {% set preview_target = config.plugins.admin.frontend_pages_target %}
- {% 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>' : '' %}
- {% macro loop(page, depth, twig_vars) %}
- {% set separator = twig_vars['config'].system.param_sep %}
- {% set display_field = twig_vars['config'].plugins.admin.pages_list_display_field %}
- {% set base_url = twig_vars['base_url_relative'] %}
- {% set base_url_simple = twig_vars['base_url_simple'] %}
- {% set admin_route = twig_vars['admin_route'] %}
- {% set admin_lang = twig_vars['admin_lang'] %}
- {% set warn = twig_vars['warn'] %}
- {% set uri = twig_vars['uri'] %}
- {% if page.header.admin.children_display_order == 'collection' and page.header.content.order.by %}
- {% if page.header.content.order.custom %}
- {% set pcol = page.children().order(page.header.content.order.by, page.header.content.order.dir|default('asc'), page.header.content.order.custom) %}
- {% else %}
- {% set pcol = page.children().order(page.header.content.order.by, page.header.content.order.dir|default('asc')) %}
- {% endif %}
- {% else %}
- {% set pcol = page.children() %}
- {% endif %}
- {% for p in pcol %}
- {% set description = (not p.page ? \"PLUGIN_ADMIN.FOLDER\"|tu ~ ' • ' : \"PLUGIN_ADMIN.PAGE\"|tu ~ ' • ') ~
- (p.modular ? \"PLUGIN_ADMIN.MODULAR\"|tu ~ ' • ' : '') ~
- (p.routable ? \"PLUGIN_ADMIN.ROUTABLE\"|tu ~ ' • ' : \"PLUGIN_ADMIN.NON_ROUTABLE\"|tu ~ ' • ') ~
- (p.visible ? \"PLUGIN_ADMIN.VISIBLE\"|tu ~ ' • ' : \"PLUGIN_ADMIN.NON_VISIBLE\"|tu ~ ' • ') ~
- (p.published ? \"PLUGIN_ADMIN.PUBLISHED\"|tu ~ ' • ' : \"PLUGIN_ADMIN.NON_PUBLISHED\"|tu ~ ' • ') %}
- {#{% set page_route = p.rawRoute|trim('/') %}#}
- {#{% if p.language and p.language != admin_lang %}#}
- {#{% set page_url = base_url_simple ~ '/' ~ p.language ~ '/' ~ admin_route ~ '/pages/' ~ page_route %}#}
- {#{% else %}#}
- {#{% set page_url = base_url ~ '/pages/' ~ page_route %}#}
- {#{% endif %}#}
- {% set page_url = getPageUrl(p) %}
- <li class=\"page-item\" data-nav-id=\"{{ p.route }}\">
- <div class=\"row page-item__row\">
- <span class=\"page-item__toggle\" {{ p.children(0).count > 0 ? 'data-toggle=\"children\"' : ''}}>
- <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>
- </span>
- <div class=\"page-item__content\">
- <div class=\"page-item__content-name\">
- <span data-hint=\"{{ description|trim(' • ')|raw }}\" class=\"hint--top page-item__content-hint\">
- {% set page_label = attribute(p.header, display_field)|defined(attribute(p, display_field))|defined(p.title) %}
- <a href=\"{{ page_url }}\" class=\"page-edit\">{{ page_label|e }}</a>
- </span>
- {% if p.language %}
- <span class=\"badge lang {% if p.language == admin_lang %}info{% endif %}\">{{p.language}}</span>
- {% endif %}
- {% if p.home %}
- <span class=\"page-home\"><i class=\"fa fa-home\"></i></span>
- {% endif %}
- </div>
- <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>
- </div>
- <span class=\"page-item__tools\">
- {% if warn %}
- <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>
- {% else %}
- <a href=\"{{ uri.addNonce(page_url ~ '/task' ~ separator ~ 'delete', 'admin-form', 'admin-nonce') }}\" class=\"page-delete\" ><i class=\"fa fa-close\"></i></a>
- {% endif %}
- </span>
- </div>
- {% if p.children().count > 0 %}
- <ul class=\"depth-{{ depth + 1 }}\" style=\"display:none;\">
- {{ _self.loop(p, depth + 1, twig_vars) }}
- </ul>
- {% endif %}
- </li>
- {% endfor %}
- {% endmacro %}
- {% block titlebar %}
- <div class=\"button-bar\">
- {% if mode == 'list' %}
- <a class=\"button\" href=\"{{ base_url }}\"><i class=\"fa fa-reply\"></i> {{ \"PLUGIN_ADMIN.BACK\"|tu }}</a>
- {% for key, add_modal in config.plugins.admin.add_modals %}
- {% if add_modal.show_in|defined('bar') == 'bar' %}
- <a class=\"button {{ add_modal.link_classes }}\" href=\"#modal-add_modal-{{ key }}\" data-remodal-target=\"modal-add_modal-{{ key }}\"><i class=\"fa fa-plus\"></i> {{ add_modal.label }}</a>
- {% endif %}
- {% endfor %}
- <div class=\"button-group\">
- <button type=\"button\" class=\"button disabled\" href=\"#modal\" data-remodal-target=\"modal\">
- <i class=\"fa fa-plus\"></i> {{ \"PLUGIN_ADMIN.ADD\"|tu }}
- </button>
- <button type=\"button\" class=\"button dropdown-toggle\" data-toggle=\"dropdown\">
- <i class=\"fa fa-caret-down\"></i>
- </button>
- <ul class=\"dropdown-menu\">
- <li><a class=\"button\" href=\"#modal\" data-remodal-target=\"modal\">{{ \"PLUGIN_ADMIN.ADD_PAGE\"|tu }}</a></li>
- <li><a class=\"button\" href=\"#modal-folder\" data-remodal-target=\"modal-folder\">{{ \"PLUGIN_ADMIN.ADD_FOLDER\"|tu }}</a></li>
- {% if admin.modularTypes is not empty %}
- <li><a class=\"button\" href=\"#modular\" data-remodal-target=\"modular\">{{ \"PLUGIN_ADMIN.ADD_MODULAR\"|tu }}</a></li>
- {% endif %}
- {% for key, add_modal in config.plugins.admin.add_modals %}
- {% if add_modal.show_in|defined('bar') == 'dropdown' %}
- <li><a class=\"button {{ add_modal.link_classes }}\" href=\"#modal-add_modal-{{ key }}\" data-remodal-target=\"modal-add_modal-{{ key }}\">{{ add_modal.label }}</a></li>
- {% endif %}
- {% endfor %}
- </ul>
- </div>
- {% if admin.multilang %}
- <div class=\"button-group\">
- <button type=\"button\" class=\"button disabled\">
- <i class=\"fa fa-flag-o\"></i>
- {% set langName = admin.siteLanguages[admin_lang] %}
- {{ langName[:1]|upper ~ langName[1:] }}
- </button>
- {% if admin.languages_enabled|length > 1 %}
- <button type=\"button\" class=\"button dropdown-toggle\" data-toggle=\"dropdown\">
- <i class=\"fa fa-caret-down\"></i>
- </button>
- <ul class=\"dropdown-menu language-switcher\">
- {% for langCode in admin.languages_enabled %}
- {% set langName = admin.siteLanguages[langCode] %}
- {% if langCode != admin_lang %}
- <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>
- {% endif %}
- {% endfor %}
- </ul>
- {% endif %}
- </div>
- {% endif %}
- {% elseif mode == 'edit' %}
- {{ preview_link|raw }}
- <a class=\"button\" href=\"{{ base_url }}/pages\" title=\"{{ \"PLUGIN_ADMIN.BACK\"|tu }}\"><i class=\"fa fa-reply\"></i></a>
- {% set siblings = context.parent().children() %}
- {% if not siblings.isFirst(context.path) %}
- {% set sib = siblings.nextSibling(context.path) %}
- {% set sib_url = base_url ~ '/pages' ~ (sib.header.routes.default ?: sib.rawRoute) %}
- <a class=\"button hidden-mobile\" href=\"{{ sib_url }}\" title=\"{{ \"PLUGIN_ADMIN.PREVIOUS\"|tu }}\"><i class=\"fa fa-chevron-left\"></i></a>
- {% endif %}
- {% if not siblings.isLast(context.path) %}
- {% set sib = siblings.prevSibling(context.path) %}
- {% set sib_url = base_url ~ '/pages' ~ (sib.header.routes.default ?: sib.rawRoute) %}
- <a class=\"button hidden-mobile\" href=\"{{ sib_url }}\" title=\"{{ \"PLUGIN_ADMIN.NEXT\"|tu }}\"><i class=\"fa fa-chevron-right\"></i></a>
- {% endif %}
- {% if exists %}
- <div class=\"button-group\">
- <button type=\"button\" class=\"button disabled\" href=\"#modal\" data-remodal-target=\"modal\">
- <i class=\"fa fa-plus\"></i> {{ \"PLUGIN_ADMIN.ADD\"|tu }}
- </button>
- <button type=\"button\" class=\"button dropdown-toggle\" data-toggle=\"dropdown\">
- <i class=\"fa fa-caret-down\"></i>
- </button>
- <ul class=\"dropdown-menu\">
- <li><a class=\"button\" href=\"#modal\" data-remodal-target=\"modal\">{{ \"PLUGIN_ADMIN.ADD_PAGE\"|tu }}</a></li>
- <li><a class=\"button\" href=\"#modal-folder\" data-remodal-target=\"modal-folder\">{{ \"PLUGIN_ADMIN.ADD_FOLDER\"|tu }}</a></li>
- {% if admin.modularTypes is not empty %}
- <li><a class=\"button\" href=\"#modular\" data-remodal-target=\"modular\">{{ \"PLUGIN_ADMIN.ADD_MODULAR\"|tu }}</a></li>
- {% endif %}
- </ul>
- </div>
- <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>
- <a class=\"button\" href=\"#\" data-remodal-target=\"move\"><i class=\"fa fa-arrows\"></i> {{ \"PLUGIN_ADMIN.MOVE\"|tu }}</a>
- {% if config.plugins['admin-pro'].enabled %}
- <a class=\"button\" href=\"#\" data-remodal-target=\"revisions\"><i class=\"fa fa-history\"></i> {{ \"PLUGIN_ADMIN_PRO.REVISIONS\"|tu }}</a>
- {% endif %}
- {% if warn %}
- <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>
- {% else %}
- <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>
- {% endif %}
- {% endif %}
- <div class=\"button-group\">
- <button class=\"button\" name=\"task\" value=\"save\" form=\"blueprints\" type=\"submit\"><i class=\"fa fa-check\"></i> {{ \"PLUGIN_ADMIN.SAVE\"|tu }}</button>
- {% if exists and admin.multilang %}
- {% if context.untranslatedLanguages %}
- <button type=\"button\" class=\"button dropdown-toggle\" data-toggle=\"dropdown\">
- <i class=\"fa fa-caret-down\"></i>
- </button>
- <ul class=\"dropdown-menu lang-switcher\">
- {% for langCode in context.untranslatedLanguages %}
- {% set langName = admin.siteLanguages[langCode] %}
- {% if langCode != page_lang %}
- <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>
- {% endif %}
- {% endfor %}
- </ul>
- {% endif %}
- {% endif %}
- </div>
- {% endif %}
- </div>
- {% if mode == 'new' %}
- <h1><i class=\"fa fa-fw fa-file-text-o\"></i> {{ \"PLUGIN_ADMIN.ADD_PAGE\"|tu }}</h1>
- {% elseif mode == 'edit' %}
- <h1><i class=\"fa fa-fw fa-file-text-o\"></i>
- {{ context.menu }}
- </h1>
- {% else %}
- <h1><i class=\"fa fa-fw fa-file-text-o\"></i> {{ \"PLUGIN_ADMIN.MANAGE_PAGES\"|tu }}</h1>
- {% endif %}
- {% endblock %}
- {% block content %}
- <div class=\"clear admin-pages\">
- {% if mode == 'new' %}
- {% include 'partials/blueprints-new.html.twig' with { blueprints: admin.blueprints('pages/page'), data: context } %}
- {% elseif mode == 'edit' %}
- <div class=\"admin-form-wrapper\">
- <div id=\"admin-topbar\">
- {% if admin.multilang and page_lang %}
- <div id=\"admin-lang-toggle\" class=\"button-group\">
- <button type=\"button\" class=\"button disabled\">
- {% if exists %}
- {{ page_lang }}
- {% else %}
- {{ admin_lang }}
- {% endif %}
- </button>
- {% if exists and context.translatedLanguages|length > 1 %}
- <button type=\"button\" class=\"button dropdown-toggle\" data-toggle=\"dropdown\">
- <i class=\"fa fa-caret-down\"></i>
- </button>
- <ul class=\"dropdown-menu language-switcher\">
- {% for language, route in context.translatedLanguages %}
- {% if language != page_lang %}
- <li><button class=\"task\" name=\"task\" value=\"switchlanguage\" lang=\"{{language}}\" redirect=\"{{context.rawRoute|trim('/')}}\" form=\"blueprints\">{{ language }}</button>
- {% endif %}
- {% endfor %}
- </ul>
- {% endif %}
- </div>
- {% endif %}
- {% if context.blueprints.fields %}
- {% set normalText = \"PLUGIN_ADMIN.NORMAL\"|tu %}
- {% set expertText = \"PLUGIN_ADMIN.EXPERT\"|tu %}
- {% set maxLen = max([normalText|length, expertText|length]) %}
- {% set normalText = _self.spanToggle(normalText, maxLen) %}
- {% set expertText = _self.spanToggle(expertText, maxLen) %}
- <form id=\"admin-mode-toggle\">
- <div class=\"switch-toggle switch-grav\">
- <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 %}>
- <label for=\"normal\">{{ normalText|raw }}</label>
- <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 %}>
- <label for=\"expert\">{{ expertText|raw }}</label>
- <a></a>
- </div>
- </form>
- {% endif %}
- </div>
- {% if context.blueprints.fields and admin.session.expert == '0' %}
- {% include 'partials/blueprints.html.twig' with { blueprints: context.blueprints, data: context } %}
- {% else %}
- {% include 'partials/blueprints-raw.html.twig' with { blueprints: admin.blueprints('admin/pages/'~modular~'raw'), data: context } %}
- {% endif %}
- </div>
- {% else %}
- <form id=\"page-filtering\">
- <div class=\"page-filters\">
- <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\" />
- </div>
- <div class=\"page-search\">
- <input type=\"text\" placeholder=\"{{ \"PLUGIN_ADMIN.SEARCH_PAGES\"|tu }}\" name=\"page-search\" />
- </div>
- <div class=\"page-shortcuts\">
- <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>
- <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>
- </div>
- </form>
- <div class=\"pages-list\">
- <ul class=\"depth-0\">
- {{ _self.loop(pages, 0, _context) }}
- </ul>
- {% include 'partials/page-legend.html.twig' %}
- </div>
- {% endif %}
- </div>
- {% if context %}
- {% set obj_data = clone(context) %}
- {% if mode == 'edit' %}
- {% do obj_data.folder('') %}
- {% endif %}
- {% endif %}
- {% if mode == 'list' or mode == 'edit' %}
- <div class=\"remodal\" data-remodal-id=\"modal\" data-remodal-options=\"hashTracking: false\">
- {% include 'partials/blueprints-new.html.twig' with { blueprints: admin.blueprints('admin/pages/new'), data: obj_data, form_id:'new-page' } %}
- </div>
- <div class=\"remodal\" data-remodal-id=\"modal-folder\" data-remodal-options=\"hashTracking: false\">
- {% include 'partials/blueprints-new-folder.html.twig' with { blueprints: admin.blueprints('admin/pages/new_folder'), data: obj_data, form_id:'new-folder' } %}
- </div>
- <div class=\"remodal\" data-remodal-id=\"modular\" data-remodal-options=\"hashTracking: false\">
- {% include 'partials/blueprints-new.html.twig' with { blueprints: admin.blueprints('admin/pages/modular_new'), data: obj_data, form_id:'new-modular' } %}
- </div>
- {% for key, add_modal in config.plugins.admin.add_modals %}
- <div class=\"remodal {{ add_modal.modal_classes|defined('') }}\" data-remodal-id=\"modal-add_modal-{{ key }}\" data-remodal-options=\"hashTracking: false\">
- {% 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({})) %}
- </div>
- {% endfor %}
- {% endif %}
- {% if mode == 'edit' %}
- <div class=\"remodal\" data-remodal-id=\"move\" data-remodal-options=\"hashTracking: false\">
- {% include 'partials/page-move.html.twig' with { blueprints: admin.blueprints('admin/pages/move'), data: context } %}
- </div>
- <div class=\"remodal\" data-remodal-id=\"revisions\" data-remodal-options=\"hashTracking: false\">
- {% include ['partials/page-revisions.html.twig', 'empty.html.twig'] ignore missing with { data: context } %}
- </div>
- {% endif %}
- {% include 'partials/modal-changes-detected.html.twig' %}
- <div class=\"remodal\" data-remodal-id=\"delete\" data-remodal-options=\"hashTracking: false\">
- <form>
- <h1>{{ \"PLUGIN_ADMIN.MODAL_DELETE_PAGE_CONFIRMATION_REQUIRED_TITLE\"|tu }}</h1>
- <p class=\"bigger\">
- {% if context %}
- <strong>{{ \"PLUGIN_ADMIN.PAGE\"|tu }}: {{ context.title }}</strong>
- {% endif %}
- </p>
- <p class=\"bigger\">
- {{ \"PLUGIN_ADMIN.MODAL_DELETE_PAGE_CONFIRMATION_REQUIRED_DESC\"|tu }}
- </p>
- <br>
- <div class=\"button-bar\">
- <button data-remodal-action=\"cancel\" class=\"button secondary remodal-cancel\"><i class=\"fa fa-fw fa-close\"></i> {{ \"PLUGIN_ADMIN.CANCEL\"|tu }}</button>
- <a class=\"button disable-after-click\" data-delete-action href=\"#\"><i class=\"fa fa-fw fa-check\"></i> {{ \"PLUGIN_ADMIN.CONTINUE\"|tu }}</a>
- </div>
- </form>
- </div>
- {% include 'partials/admin-pro-pages-addons.html.twig' ignore missing %}
- {% endblock %}
- {% block bottom %}
- <script>
- \$('.admin-pages .form-tabs .tabs-nav').css('margin-right', (\$('#admin-topbar').width() + 20) + 'px');
- </script>
- {% endblock %}
- ", "pages.html.twig", "/mnt/data/Sites/static-ethica.net/user/plugins/admin/themes/grav/templates/pages.html.twig");
- }
- }
|