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\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())))); } else { // line 20 $context["title"] = $this->env->getExtension('Grav\Plugin\Admin\Twig\AdminTwigExtension')->tuFilter("PLUGIN_ADMIN.ADD_PAGE"); } } else { // line 23 $context["mode"] = "list"; // line 24 $context["title"] = $this->env->getExtension('Grav\Plugin\Admin\Twig\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 if (($this->getAttribute($this->getAttribute($this->getAttribute(($context["config"] ?? null), "plugins", array()), "admin", array()), "frontend_preview_target", array()) != "inline")) { // line 45 $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 46 $context["preview_target"] = $this->getAttribute($this->getAttribute($this->getAttribute(($context["config"] ?? null), "plugins", array()), "admin", array()), "frontend_preview_target", array()); // line 47 $context["preview_link"] = (($this->getAttribute(($context["context"] ?? null), "routable", array())) ? ((((((("env->getExtension('Grav\Plugin\Admin\Twig\AdminTwigExtension')->tuFilter("PLUGIN_ADMIN.PREVIEW")) . "\"> ")) : ("")); } else { // line 49 $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()))))) : ("/")); // line 50 $context["preview_link"] = (($this->getAttribute(($context["context"] ?? null), "routable", array())) ? ((((("env->getExtension('Grav\Plugin\Admin\Twig\AdminTwigExtension')->tuFilter("PLUGIN_ADMIN.PREVIEW")) . "\"> ")) : ("")); } // 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 131 public function block_titlebar($context, array $blocks = array()) { // line 132 echo "
"; // line 133 if ((($context["mode"] ?? null) == "list")) { // line 134 echo " env, ($context["base_url"] ?? null), "html", null, true); echo "\"> "; echo twig_escape_filter($this->env, $this->env->getExtension('Grav\Plugin\Admin\Twig\AdminTwigExtension')->tuFilter("PLUGIN_ADMIN.BACK"), "html", null, true); echo " "; // line 136 $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 137 echo " "; if (($this->env->getExtension('Grav\Common\Twig\TwigExtension')->definedDefaultFilter($this->getAttribute($context["add_modal"], "show_in", array()), "bar") == "bar")) { // line 138 echo " 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->env->getExtension('Grav\Plugin\Admin\Twig\AdminTwigExtension')->tuFilter($this->getAttribute($context["add_modal"], "label", array())), "html", null, true); echo " "; } // line 140 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 141 echo "
"; // line 163 if ($this->getAttribute(($context["admin"] ?? null), "multilang", array())) { // line 164 echo "
"; // line 170 if ((twig_length_filter($this->env, $this->getAttribute(($context["admin"] ?? null), "languages_enabled", array())) > 1)) { // line 171 echo " "; } // line 183 echo "
"; } // line 185 echo " "; } elseif (( // line 186 ($context["mode"] ?? null) == "edit")) { // line 187 echo " "; // line 188 echo ($context["preview_link"] ?? null); echo " env, ($context["base_url"] ?? null), "html", null, true); echo "/pages\" title=\""; echo twig_escape_filter($this->env, $this->env->getExtension('Grav\Plugin\Admin\Twig\AdminTwigExtension')->tuFilter("PLUGIN_ADMIN.BACK"), "html", null, true); echo "\"> "; // line 192 $context["siblings"] = $this->getAttribute($this->getAttribute(($context["context"] ?? null), "parent", array(), "method"), "children", array(), "method"); // line 193 echo " "; // line 194 if ( !$this->getAttribute(($context["siblings"] ?? null), "isFirst", array(0 => $this->getAttribute(($context["context"] ?? null), "path", array())), "method")) { // line 195 echo " "; $context["sib"] = $this->getAttribute(($context["siblings"] ?? null), "nextSibling", array(0 => $this->getAttribute(($context["context"] ?? null), "path", array())), "method"); // line 196 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 197 echo " env, ($context["sib_url"] ?? null), "html", null, true); echo "\" title=\""; echo twig_escape_filter($this->env, $this->env->getExtension('Grav\Plugin\Admin\Twig\AdminTwigExtension')->tuFilter("PLUGIN_ADMIN.PREVIOUS"), "html", null, true); echo "\"> "; } // line 199 echo " "; // line 200 if ( !$this->getAttribute(($context["siblings"] ?? null), "isLast", array(0 => $this->getAttribute(($context["context"] ?? null), "path", array())), "method")) { // line 201 echo " "; $context["sib"] = $this->getAttribute(($context["siblings"] ?? null), "prevSibling", array(0 => $this->getAttribute(($context["context"] ?? null), "path", array())), "method"); // line 202 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 203 echo " env, ($context["sib_url"] ?? null), "html", null, true); echo "\" title=\""; echo twig_escape_filter($this->env, $this->env->getExtension('Grav\Plugin\Admin\Twig\AdminTwigExtension')->tuFilter("PLUGIN_ADMIN.NEXT"), "html", null, true); echo "\"> "; } // line 205 echo " "; // line 206 if (($context["exists"] ?? null)) { // line 207 echo "
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\" > "; echo twig_escape_filter($this->env, $this->env->getExtension('Grav\Plugin\Admin\Twig\AdminTwigExtension')->tuFilter("PLUGIN_ADMIN.COPY"), "html", null, true); echo " "; // line 224 echo twig_escape_filter($this->env, $this->env->getExtension('Grav\Plugin\Admin\Twig\AdminTwigExtension')->tuFilter("PLUGIN_ADMIN.MOVE"), "html", null, true); echo " "; // line 225 if ($this->getAttribute($this->getAttribute($this->getAttribute(($context["config"] ?? null), "plugins", array()), "admin-pro", array(), "array"), "enabled", array())) { // line 226 echo " "; echo twig_escape_filter($this->env, $this->env->getExtension('Grav\Plugin\Admin\Twig\AdminTwigExtension')->tuFilter("PLUGIN_ADMIN_PRO.REVISIONS"), "html", null, true); echo " "; } // line 228 echo " "; if (($context["warn"] ?? null)) { // line 229 echo " 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 "\"> "; echo twig_escape_filter($this->env, $this->env->getExtension('Grav\Plugin\Admin\Twig\AdminTwigExtension')->tuFilter("PLUGIN_ADMIN.DELETE"), "html", null, true); echo " "; } else { // line 231 echo " 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\" > "; } // line 233 echo " "; } // line 234 echo "
"; // line 237 if ((($context["exists"] ?? null) && $this->getAttribute(($context["admin"] ?? null), "multilang", array()))) { // line 238 echo " "; if ($this->getAttribute(($context["context"] ?? null), "untranslatedLanguages", array())) { // line 239 echo " "; } // line 251 echo " "; } // line 252 echo "
"; } // line 256 echo "
"; // line 257 if ((($context["mode"] ?? null) == "new")) { // line 258 echo "

"; echo twig_escape_filter($this->env, $this->env->getExtension('Grav\Plugin\Admin\Twig\AdminTwigExtension')->tuFilter("PLUGIN_ADMIN.ADD_PAGE"), "html", null, true); echo "

"; } elseif (( // line 259 ($context["mode"] ?? null) == "edit")) { // line 260 echo "

"; // line 261 echo twig_escape_filter($this->env, $this->getAttribute(($context["context"] ?? null), "menu", array()), "html", null, true); echo "

"; } else { // line 264 echo "

"; echo twig_escape_filter($this->env, $this->env->getExtension('Grav\Plugin\Admin\Twig\AdminTwigExtension')->tuFilter("PLUGIN_ADMIN.MANAGE_PAGES"), "html", null, true); echo "

"; } } // line 268 public function block_content($context, array $blocks = array()) { // line 269 echo "
"; // line 270 if ((($context["mode"] ?? null) == "new")) { // line 271 echo " "; $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)))); // line 272 echo " "; } elseif ((($context["mode"] ?? null) == "edit")) { // line 273 echo "
"; // line 276 if (($this->getAttribute(($context["admin"] ?? null), "multilang", array()) && ($context["page_lang"] ?? null))) { // line 277 echo "
"; // line 285 if ((($context["exists"] ?? null) && (twig_length_filter($this->env, $this->getAttribute(($context["context"] ?? null), "translatedLanguages", array())) > 1))) { // line 286 echo "
    "; // line 290 $context['_parent'] = $context; $context['_seq'] = twig_ensure_traversable($this->getAttribute(($context["context"] ?? null), "translatedLanguages", array())); foreach ($context['_seq'] as $context["language"] => $context["route"]) { // line 291 echo " "; if (($context["language"] != ($context["page_lang"] ?? null))) { // line 292 echo "
  • "; } // line 294 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 295 echo "
"; } // line 297 echo "
"; } // line 299 echo " "; // line 300 if ($this->getAttribute($this->getAttribute(($context["context"] ?? null), "blueprints", array()), "fields", array())) { // line 301 echo " "; $context["normalText"] = $this->env->getExtension('Grav\Plugin\Admin\Twig\AdminTwigExtension')->tuFilter("PLUGIN_ADMIN.NORMAL"); // line 302 echo " "; $context["expertText"] = $this->env->getExtension('Grav\Plugin\Admin\Twig\AdminTwigExtension')->tuFilter("PLUGIN_ADMIN.EXPERT"); // line 303 echo " "; $context["maxLen"] = max(array(0 => twig_length_filter($this->env, ($context["normalText"] ?? null)), 1 => twig_length_filter($this->env, ($context["expertText"] ?? null)))); // line 304 echo " "; $context["normalText"] = $this->getAttribute($this, "spanToggle", array(0 => ($context["normalText"] ?? null), 1 => ($context["maxLen"] ?? null)), "method"); // line 305 echo " "; $context["expertText"] = $this->getAttribute($this, "spanToggle", array(0 => ($context["expertText"] ?? null), 1 => ($context["maxLen"] ?? null)), "method"); // line 306 echo "
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 "> 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 ">
"; } // line 316 echo "
"; // line 319 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 320 echo " "; $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)))); // line 321 echo " "; } else { // line 322 echo " "; $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)))); // line 323 echo " "; } // line 324 echo "
"; } else { // line 326 echo "
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"); 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\Twig\AdminTwigExtension')->tuFilter("PLUGIN_ADMIN.ADD_FILTERS"), "html", null, true); echo "\" class=\"page-filter\" name=\"page-filter\" />
env, $this->env->getExtension('Grav\Plugin\Admin\Twig\AdminTwigExtension')->tuFilter("PLUGIN_ADMIN.SEARCH_PAGES"), "html", null, true); echo "\" name=\"page-search\" />
"; // line 334 echo twig_escape_filter($this->env, $this->env->getExtension('Grav\Plugin\Admin\Twig\AdminTwigExtension')->tuFilter("PLUGIN_ADMIN.EXPAND_ALL"), "html", null, true); echo " "; // line 335 echo twig_escape_filter($this->env, $this->env->getExtension('Grav\Plugin\Admin\Twig\AdminTwigExtension')->tuFilter("PLUGIN_ADMIN.COLLAPSE_ALL"), "html", null, true); echo "
"; // line 342 $this->loadTemplate("partials/page-legend.html.twig", "pages.html.twig", 342)->display($context); // line 343 echo "
"; } // line 345 echo "
"; // line 347 if (($context["context"] ?? null)) { // line 348 echo " "; $context["obj_data"] = $this->env->getExtension('Grav\Plugin\Admin\Twig\AdminTwigExtension')->cloneFunc(($context["context"] ?? null)); // line 349 echo " "; // line 350 if ((($context["mode"] ?? null) == "edit")) { // line 351 echo " "; $this->getAttribute(($context["obj_data"] ?? null), "folder", array(0 => ""), "method"); // line 352 echo " "; } // line 353 echo " "; } // line 354 echo " "; // line 355 if (((($context["mode"] ?? null) == "list") || (($context["mode"] ?? null) == "edit"))) { // line 356 echo "
"; // line 357 $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"))); // line 358 echo "
"; // line 361 $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"))); // line 362 echo "
"; // line 365 $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"))); // line 366 echo "
"; // line 368 $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 369 echo "
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 370 $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())))); // line 371 echo "
"; ++$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 373 echo " "; } // line 374 echo " "; // line 376 if ((($context["mode"] ?? null) == "edit")) { // line 377 echo "
"; // line 379 $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)))); // line 380 echo "
"; // line 382 try { $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)))); } catch (Twig_Error_Loader $e) { // ignore missing template } // line 383 echo "
"; } // line 385 echo " "; // line 386 $this->loadTemplate("partials/modal-changes-detected.html.twig", "pages.html.twig", 386)->display($context); // line 387 echo "

"; // line 390 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); echo "

"; // line 392 if (($context["context"] ?? null)) { // line 393 echo " "; echo twig_escape_filter($this->env, $this->env->getExtension('Grav\Plugin\Admin\Twig\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 " "; } // line 395 echo "

"; // line 397 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); echo "


"; // line 402 echo twig_escape_filter($this->env, $this->env->getExtension('Grav\Plugin\Admin\Twig\AdminTwigExtension')->tuFilter("PLUGIN_ADMIN.CONTINUE"), "html", null, true); echo "
"; // line 407 try { $this->loadTemplate("partials/admin-pro-pages-addons.html.twig", "pages.html.twig", 407)->display($context); } catch (Twig_Error_Loader $e) { // ignore missing template } // line 408 echo " "; } // line 411 public function block_bottom($context, array $blocks = array()) { // line 412 echo " "; } // 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 53 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 54 echo " "; $context["config"] = $this->getAttribute(($context["twig_vars"] ?? null), "config", array(), "array"); // line 55 echo " "; $context["separator"] = $this->getAttribute($this->getAttribute(($context["config"] ?? null), "system", array()), "param_sep", array()); // line 56 echo " "; $context["display_field"] = $this->getAttribute($this->getAttribute($this->getAttribute(($context["config"] ?? null), "plugins", array()), "admin", array()), "pages_list_display_field", array()); // line 57 echo " "; $context["base_url"] = $this->getAttribute(($context["twig_vars"] ?? null), "base_url_relative", array(), "array"); // line 58 echo " "; $context["base_url_relative_frontend"] = $this->getAttribute(($context["twig_vars"] ?? null), "base_url_relative_frontend", array(), "array"); // line 59 echo " "; $context["base_url_simple"] = $this->getAttribute(($context["twig_vars"] ?? null), "base_url_simple", array(), "array"); // line 60 echo " "; $context["admin_route"] = $this->getAttribute(($context["twig_vars"] ?? null), "admin_route", array(), "array"); // line 61 echo " "; $context["admin_lang"] = $this->getAttribute(($context["twig_vars"] ?? null), "admin_lang", array(), "array"); // line 62 echo " "; $context["warn"] = $this->getAttribute(($context["twig_vars"] ?? null), "warn", array(), "array"); // line 63 echo " "; $context["uri"] = $this->getAttribute(($context["twig_vars"] ?? null), "uri", array(), "array"); // line 64 echo " "; // line 65 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 66 echo " "; if ($this->getAttribute($this->getAttribute($this->getAttribute($this->getAttribute(($context["page"] ?? null), "header", array()), "content", array()), "order", array()), "custom", array())) { // line 67 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 68 echo " "; } else { // line 69 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 70 echo " "; } // line 71 echo " "; } else { // line 72 echo " "; $context["pcol"] = $this->getAttribute(($context["page"] ?? null), "children", array(), "method"); // line 73 echo " "; } // line 74 echo " "; // line 75 $context['_parent'] = $context; $context['_seq'] = twig_ensure_traversable(($context["pcol"] ?? null)); foreach ($context['_seq'] as $context["_key"] => $context["p"]) { // line 76 echo " "; $context["description"] = (((((( !$this->getAttribute($context["p"], "page", array())) ? (($this->env->getExtension('Grav\Plugin\Admin\Twig\AdminTwigExtension')->tuFilter("PLUGIN_ADMIN.FOLDER") . " • ")) : (($this->env->getExtension('Grav\Plugin\Admin\Twig\AdminTwigExtension')->tuFilter("PLUGIN_ADMIN.PAGE") . " • "))) . (($this->getAttribute( // line 77 $context["p"], "modular", array())) ? (($this->env->getExtension('Grav\Plugin\Admin\Twig\AdminTwigExtension')->tuFilter("PLUGIN_ADMIN.MODULAR") . " • ")) : (""))) . (($this->getAttribute( // line 78 $context["p"], "routable", array())) ? (($this->env->getExtension('Grav\Plugin\Admin\Twig\AdminTwigExtension')->tuFilter("PLUGIN_ADMIN.ROUTABLE") . " • ")) : (($this->env->getExtension('Grav\Plugin\Admin\Twig\AdminTwigExtension')->tuFilter("PLUGIN_ADMIN.NON_ROUTABLE") . " • ")))) . (($this->getAttribute( // line 79 $context["p"], "visible", array())) ? (($this->env->getExtension('Grav\Plugin\Admin\Twig\AdminTwigExtension')->tuFilter("PLUGIN_ADMIN.VISIBLE") . " • ")) : (($this->env->getExtension('Grav\Plugin\Admin\Twig\AdminTwigExtension')->tuFilter("PLUGIN_ADMIN.NON_VISIBLE") . " • ")))) . (($this->getAttribute( // line 80 $context["p"], "published", array())) ? (($this->env->getExtension('Grav\Plugin\Admin\Twig\AdminTwigExtension')->tuFilter("PLUGIN_ADMIN.PUBLISHED") . " • ")) : (($this->env->getExtension('Grav\Plugin\Admin\Twig\AdminTwigExtension')->tuFilter("PLUGIN_ADMIN.NON_PUBLISHED") . " • ")))); // line 81 echo " "; // line 82 $context["page_url"] = $this->env->getExtension('Grav\Plugin\Admin\Twig\AdminTwigExtension')->getPageUrl($context, $context["p"]); // line 83 echo "
  • env, $this->getAttribute($context["p"], "route", array()), "html", null, true); echo "\">
    getAttribute($this->getAttribute($context["p"], "children", array(0 => 0), "method"), "count", array()) > 0)) ? ("data-toggle=\"children\"") : ("")); echo "> 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 "\">
    "; // line 92 $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 93 echo " env, ($context["page_url"] ?? null), "html", null, true); echo "\" class=\"page-edit\">"; echo twig_escape_filter($this->env, ($context["page_label"] ?? null)); echo " "; // line 95 if ($this->getAttribute($context["p"], "language", array())) { // line 96 echo " 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 " "; } // line 98 echo " "; if ($this->getAttribute($context["p"], "home", array())) { // line 99 echo " "; } // line 101 echo "

    "; // line 102 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 " "; echo twig_escape_filter($this->env, $this->getAttribute($context["p"], "template", array(), "method"), "html", null, true); echo "

    "; // line 105 if (($this->getAttribute($this->getAttribute($this->getAttribute(($context["config"] ?? null), "plugins", array()), "admin", array()), "frontend_preview_target", array()) != "inline")) { // line 106 echo " "; $context["preview_target"] = $this->getAttribute($this->getAttribute($this->getAttribute(($context["config"] ?? null), "plugins", array()), "admin", array()), "frontend_preview_target", array()); // line 107 echo " "; $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()))))) : ("/")); // line 108 echo " "; $context["preview_link"] = (($this->getAttribute($context["p"], "routable", array())) ? ((((((("env->getExtension('Grav\Plugin\Admin\Twig\AdminTwigExtension')->tuFilter("PLUGIN_ADMIN.PREVIEW")) . "\"> ")) : ("")); // line 109 echo " "; } else { // line 110 echo " "; $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()))))) : ("/")); // line 111 echo " "; $context["preview_link"] = (($this->getAttribute($context["p"], "routable", array())) ? ((((("env->getExtension('Grav\Plugin\Admin\Twig\AdminTwigExtension')->tuFilter("PLUGIN_ADMIN.PREVIEW")) . "\"> ")) : ("")); // line 112 echo " "; } // line 113 echo " "; echo ($context["preview_link"] ?? null); echo " "; // line 114 if (($context["warn"] ?? null)) { // line 115 echo " 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\" > "; } else { // line 117 echo " 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\" > "; } // line 119 echo "
    "; // line 121 if (($this->getAttribute($this->getAttribute($context["p"], "children", array(), "method"), "count", array()) > 0)) { // line 122 echo " "; } // line 126 echo "
  • "; } $_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 ( 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,); } /** @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 %} {% if config.plugins.admin.frontend_preview_target != 'inline' %} {% set preview_html = (base_url_relative_frontend|rtrim('/') ~ (context.home ? '' : context.route)) ?: '/' %} {% set preview_target = config.plugins.admin.frontend_preview_target %} {% set preview_link = context.routable ? ' ' : '' %} {% else %} {% set preview_html = (base_url|rtrim('/') ~ '/preview' ~ (context.home ? '' : context.route)) ?: '/' %} {% set preview_link = context.routable ? ' ' : '' %} {% endif %} {% macro loop(page, depth, twig_vars) %} {% set config = twig_vars['config'] %} {% set separator = config.system.param_sep %} {% set display_field = config.plugins.admin.pages_list_display_field %} {% set base_url = twig_vars['base_url_relative'] %} {% set base_url_relative_frontend = twig_vars['base_url_relative_frontend'] %} {% 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_url = getPageUrl(p) %}
  • 0 ? 'data-toggle=\"children\"' : ''}}> 0 ? 'children-closed' : ''}} {{ p.modular ? 'modular' : (not p.routable ? 'not-routable' : (not p.visible ? 'not-visible' : (not p.page ? 'folder' : ''))) }}\">
    {% set page_label = attribute(p.header, display_field)|defined(attribute(p, display_field))|defined(p.title) %} {{ page_label|e }} {% if p.language %} {{p.language}} {% endif %} {% if p.home %} {% endif %}

    {{ p.header.routes.default ?: p.route }} {{ p.template() }}

    {% if config.plugins.admin.frontend_preview_target != 'inline' %} {% set preview_target = config.plugins.admin.frontend_preview_target %} {% set preview_html = (base_url_relative_frontend|rtrim('/') ~ (p.home ? '' : p.route)) ?: '/' %} {% set preview_link = p.routable ? ' ' : '' %} {% else %} {% set preview_html = (base_url|rtrim('/') ~ '/preview' ~ (p.home ? '' : p.route)) ?: '/' %} {% set preview_link = p.routable ? ' ' : '' %} {% endif %} {{ preview_link|raw }} {% if warn %} {% else %} {% endif %}
    {% if p.children().count > 0 %} {% endif %}
  • {% endfor %} {% endmacro %} {% block titlebar %}
    {% if mode == 'list' %} {{ \"PLUGIN_ADMIN.BACK\"|tu }} {% for key, add_modal in config.plugins.admin.add_modals %} {% if add_modal.show_in|defined('bar') == 'bar' %} {{ add_modal.label|tu }} {% endif %} {% endfor %}
    {% if admin.multilang %}
    {% if admin.languages_enabled|length > 1 %} {% endif %}
    {% endif %} {% elseif mode == 'edit' %} {{ preview_link|raw }} {% 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) %} {% 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) %} {% endif %} {% if exists %}
    {{ \"PLUGIN_ADMIN.COPY\"|tu }} {{ \"PLUGIN_ADMIN.MOVE\"|tu }} {% if config.plugins['admin-pro'].enabled %} {{ \"PLUGIN_ADMIN_PRO.REVISIONS\"|tu }} {% endif %} {% if warn %} {{ \"PLUGIN_ADMIN.DELETE\"|tu }} {% else %} {% endif %} {% endif %}
    {% if exists and admin.multilang %} {% if context.untranslatedLanguages %} {% endif %} {% endif %}
    {% endif %}
    {% if mode == 'new' %}

    {{ \"PLUGIN_ADMIN.ADD_PAGE\"|tu }}

    {% elseif mode == 'edit' %}

    {{ context.menu }}

    {% else %}

    {{ \"PLUGIN_ADMIN.MANAGE_PAGES\"|tu }}

    {% endif %} {% endblock %} {% block content %}
    {% if mode == 'new' %} {% include 'partials/blueprints-new.html.twig' with { blueprints: admin.blueprints('pages/page'), data: context } %} {% elseif mode == 'edit' %}
    {% if admin.multilang and page_lang %}
    {% if exists and context.translatedLanguages|length > 1 %}
      {% for language, route in context.translatedLanguages %} {% if language != page_lang %}
    • {% endif %} {% endfor %}
    {% endif %}
    {% 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) %}
    {% endif %}
    {% 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 %}
    {% else %}
    {{ \"PLUGIN_ADMIN.EXPAND_ALL\"|tu }} {{ \"PLUGIN_ADMIN.COLLAPSE_ALL\"|tu }}
    {% include 'partials/page-legend.html.twig' %}
    {% endif %}
    {% if context %} {% set obj_data = clone(context) %} {% if mode == 'edit' %} {% do obj_data.folder('') %} {% endif %} {% endif %} {% if mode == 'list' or mode == 'edit' %}
    {% include 'partials/blueprints-new.html.twig' with { blueprints: admin.blueprints('admin/pages/new'), data: obj_data, form_id:'new-page' } %}
    {% include 'partials/blueprints-new-folder.html.twig' with { blueprints: admin.blueprints('admin/pages/new_folder'), data: obj_data, form_id:'new-folder' } %}
    {% include 'partials/blueprints-new.html.twig' with { blueprints: admin.blueprints('admin/pages/modular_new'), data: obj_data, form_id:'new-modular' } %}
    {% for key, add_modal in config.plugins.admin.add_modals %}
    {% 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({})) %}
    {% endfor %} {% endif %} {% if mode == 'edit' %}
    {% include 'partials/page-move.html.twig' with { blueprints: admin.blueprints('admin/pages/move'), data: context } %}
    {% include ['partials/page-revisions.html.twig', 'empty.html.twig'] ignore missing with { data: context } %}
    {% endif %} {% include 'partials/modal-changes-detected.html.twig' %}

    {{ \"PLUGIN_ADMIN.MODAL_DELETE_PAGE_CONFIRMATION_REQUIRED_TITLE\"|tu }}

    {% if context %} {{ \"PLUGIN_ADMIN.PAGE\"|tu }}: {{ context.title }} {% endif %}

    {{ \"PLUGIN_ADMIN.MODAL_DELETE_PAGE_CONFIRMATION_REQUIRED_DESC\"|tu }}


    {{ \"PLUGIN_ADMIN.CONTINUE\"|tu }}
    {% include 'partials/admin-pro-pages-addons.html.twig' ignore missing %} {% endblock %} {% block bottom %} {% endblock %} ", "pages.html.twig", "/mnt/data/Sites/r2c.net/user/plugins/admin/themes/grav/templates/pages.html.twig"); } }