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())) ? ((((((("env->getExtension('Grav\Plugin\Admin\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 121
public function block_titlebar($context, array $blocks = array())
{
// line 122
echo "
";
// line 123
if ((($context["mode"] ?? null) == "list")) {
// line 124
echo "
env, ($context["base_url"] ?? null), "html", null, true);
echo "\"> ";
echo twig_escape_filter($this->env, $this->env->getExtension('Grav\Plugin\Admin\AdminTwigExtension')->tuFilter("PLUGIN_ADMIN.BACK"), "html", null, true);
echo "
";
// 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 "
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 "
";
}
// 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 "
";
// line 153
if ($this->getAttribute(($context["admin"] ?? null), "multilang", array())) {
// line 154
echo "
";
// line 160
if ((twig_length_filter($this->env, $this->getAttribute(($context["admin"] ?? null), "languages_enabled", array())) > 1)) {
// line 161
echo "
";
}
// line 173
echo "
";
}
// line 175
echo "
";
} elseif (( // line 176
($context["mode"] ?? null) == "edit")) {
// line 177
echo "
";
// line 178
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\AdminTwigExtension')->tuFilter("PLUGIN_ADMIN.BACK"), "html", null, true);
echo "\">
";
// 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 "
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 "\">
";
}
// 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 "
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 "\">
";
}
// line 195
echo "
";
// line 196
if (($context["exists"] ?? null)) {
// line 197
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\AdminTwigExtension')->tuFilter("PLUGIN_ADMIN.COPY"), "html", null, true);
echo "
";
// line 214
echo twig_escape_filter($this->env, $this->env->getExtension('Grav\Plugin\Admin\AdminTwigExtension')->tuFilter("PLUGIN_ADMIN.MOVE"), "html", null, true);
echo "
";
// line 215
if ($this->getAttribute($this->getAttribute($this->getAttribute(($context["config"] ?? null), "plugins", array()), "admin-pro", array(), "array"), "enabled", array())) {
// line 216
echo "
";
echo twig_escape_filter($this->env, $this->env->getExtension('Grav\Plugin\Admin\AdminTwigExtension')->tuFilter("PLUGIN_ADMIN_PRO.REVISIONS"), "html", null, true);
echo "
";
}
// line 218
echo " ";
if (($context["warn"] ?? null)) {
// line 219
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\AdminTwigExtension')->tuFilter("PLUGIN_ADMIN.DELETE"), "html", null, true);
echo "
";
} else {
// line 221
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 223
echo " ";
}
// line 224
echo "
";
// 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 "
";
}
// line 241
echo " ";
}
// line 242
echo "
";
}
// line 246
echo "
";
// line 247
if ((($context["mode"] ?? null) == "new")) {
// line 248
echo " ";
echo twig_escape_filter($this->env, $this->env->getExtension('Grav\Plugin\Admin\AdminTwigExtension')->tuFilter("PLUGIN_ADMIN.ADD_PAGE"), "html", null, true);
echo "
";
} elseif (( // line 249
($context["mode"] ?? null) == "edit")) {
// line 250
echo "
";
// line 251
echo twig_escape_filter($this->env, $this->getAttribute(($context["context"] ?? null), "menu", array()), "html", null, true);
echo "
";
} else {
// line 254
echo " ";
echo twig_escape_filter($this->env, $this->env->getExtension('Grav\Plugin\Admin\AdminTwigExtension')->tuFilter("PLUGIN_ADMIN.MANAGE_PAGES"), "html", null, true);
echo "
";
}
}
// line 258
public function block_content($context, array $blocks = array())
{
// line 259
echo "
";
// 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 "
";
// line 266
if (($this->getAttribute(($context["admin"] ?? null), "multilang", array()) && ($context["page_lang"] ?? null))) {
// line 267
echo "
";
// line 275
if ((($context["exists"] ?? null) && (twig_length_filter($this->env, $this->getAttribute(($context["context"] ?? null), "translatedLanguages", array())) > 1))) {
// line 276
echo "
";
}
// line 287
echo "
";
}
// 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 "
";
}
// line 306
echo "
";
// 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 "
";
} else {
// line 316
echo "
";
// line 330
echo $this->getAttribute($this, "loop", array(0 => ($context["pages"] ?? null), 1 => 0, 2 => $context), "method");
echo "
";
// line 332
$this->loadTemplate("partials/page-legend.html.twig", "pages.html.twig", 332)->display($context);
// line 333
echo "
";
}
// line 335
echo "
";
// 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 "
";
// 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 "
";
// 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 "
";
// 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 "
";
// 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 " 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 "
";
++$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 "
";
// 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 "
";
// 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 "
";
}
// line 375
echo "
";
// line 376
$this->loadTemplate("partials/modal-changes-detected.html.twig", "pages.html.twig", 376)->display($context);
// line 377
echo "
";
// 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 "
";
}
// 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 "
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 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 " env, ($context["page_url"] ?? null), "html", null, true);
echo "\" class=\"page-edit\">";
echo twig_escape_filter($this->env, ($context["page_label"] ?? null));
echo "
";
// line 94
if ($this->getAttribute($context["p"], "language", array())) {
// line 95
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 97
echo " ";
if ($this->getAttribute($context["p"], "home", array())) {
// line 98
echo "
";
}
// line 100
echo "
";
// 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 " ";
echo twig_escape_filter($this->env, $this->getAttribute($context["p"], "template", array(), "method"), "html", null, true);
echo "
";
// line 104
if (($context["warn"] ?? null)) {
// line 105
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 107
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 109
echo "
";
// line 111
if (($this->getAttribute($this->getAttribute($context["p"], "children", array(), "method"), "count", array()) > 0)) {
// line 112
echo " 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 "
";
}
// line 116
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 ( 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 ? ' ' : '' %}
{% 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) %}
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 warn %}
{% else %}
{% endif %}
{% if p.children().count > 0 %}
{{ _self.loop(p, depth + 1, twig_vars) }}
{% endif %}
{% endfor %}
{% endmacro %}
{% block titlebar %}
{% 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' %}
{% else %}
{{ _self.loop(pages, 0, _context) }}
{% 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' %}
{% include 'partials/admin-pro-pages-addons.html.twig' ignore missing %}
{% endblock %}
{% block bottom %}
{% endblock %}
", "pages.html.twig", "/mnt/data/Sites/static-ethica.net/user/plugins/admin/themes/grav/templates/pages.html.twig");
}
}