123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824825826827828829830831832833834835836837838839840841842 |
- <?php
- class __TwigTemplate_2c5e0d204ff879a907326b7b33785dbeea7606bacd52cebe4bcab6546177060a extends Twig_Template
- {
- public function __construct(Twig_Environment $env)
- {
- parent::__construct($env);
-
- $this->parent = $this->loadTemplate("forms/field.html.twig", "forms/fields/list/list.html.twig", 1);
- $this->blocks = array(
- 'contents' => array($this, 'block_contents'),
- 'global_attributes' => array($this, 'block_global_attributes'),
- '__internal_e408f6e41354bae6411f4fb2bf2e9ca816e0821165964d2e30246de2e260224d' => array($this, 'block___internal_e408f6e41354bae6411f4fb2bf2e9ca816e0821165964d2e30246de2e260224d'),
- );
- }
- protected function doGetParent(array $context)
- {
- return "forms/field.html.twig";
- }
- protected function doDisplay(array $context, array $blocks = array())
- {
-
- $context["value"] = (((null === ($context["value"] ?? null))) ? ($this->getAttribute(($context["field"] ?? null), "default", array())) : (($context["value"] ?? null)));
-
- $context["name"] = $this->getAttribute(($context["field"] ?? null), "name", array());
-
- $context["btnLabel"] = (($this->getAttribute(($context["field"] ?? null), "btnLabel", array(), "any", true, true)) ? ($this->getAttribute(($context["field"] ?? null), "btnLabel", array())) : ("PLUGIN_ADMIN.ADD_ITEM"));
-
- $context["btnSortLabel"] = (($this->getAttribute(($context["field"] ?? null), "btnSortLabel", array(), "any", true, true)) ? ($this->getAttribute(($context["field"] ?? null), "btnSortLabel", array())) : ("PLUGIN_ADMIN.SORT_BY"));
-
- $context["fieldControls"] = (($this->getAttribute(($context["field"] ?? null), "controls", array(), "any", true, true)) ? (_twig_default_filter($this->getAttribute(($context["field"] ?? null), "controls", array()), "bottom")) : ("bottom"));
-
- $this->parent->display($context, array_merge($this->blocks, $blocks));
- }
-
- public function block_contents($context, array $blocks = array())
- {
-
- echo " <div class=\"form-label";
- if ( !($context["vertical"] ?? null)) {
- echo " block size-1-3 pure-u-1-3";
- }
- echo "\">
- ";
-
- if ($this->getAttribute(($context["field"] ?? null), "toggleable", array())) {
-
- echo " <span class=\"checkboxes toggleable\" data-grav-field=\"toggleable\" data-grav-field-name=\"";
- echo twig_escape_filter($this->env, $this->env->getExtension('Grav\Common\Twig\TwigExtension')->fieldNameFilter((($context["scope"] ?? null) . $this->getAttribute(($context["field"] ?? null), "name", array()))), "html", null, true);
- echo "\">
- <input type=\"checkbox\"
- id=\"toggleable_";
-
- echo twig_escape_filter($this->env, $this->getAttribute(($context["field"] ?? null), "name", array()), "html", null, true);
- echo "\"
- ";
-
- if (($context["toggleableChecked"] ?? null)) {
- echo "value=\"1\"";
- }
-
- echo " name=\"toggleable_";
- echo twig_escape_filter($this->env, $this->env->getExtension('Grav\Common\Twig\TwigExtension')->fieldNameFilter((($context["scope"] ?? null) . $this->getAttribute(($context["field"] ?? null), "name", array()))), "html", null, true);
- echo "\"
- ";
-
- if (($context["toggleableChecked"] ?? null)) {
- echo "checked=\"checked\"";
- }
-
- echo " >
- <label for=\"toggleable_";
-
- echo twig_escape_filter($this->env, $this->getAttribute(($context["field"] ?? null), "name", array()), "html", null, true);
- echo "\"></label>
- </span>
- ";
- }
-
- echo " <label";
- echo (($this->getAttribute(($context["field"] ?? null), "toggleable", array())) ? (((" class=\"toggleable\" for=\"toggleable_" . $this->getAttribute(($context["field"] ?? null), "name", array())) . "\"")) : (""));
- echo ">
- ";
-
- if ($this->getAttribute(($context["field"] ?? null), "help", array())) {
-
- echo " <span class=\"hint--bottom\" data-hint=\"";
- echo twig_escape_filter($this->env, $this->env->getExtension('Grav\Plugin\Admin\Twig\AdminTwigExtension')->tuFilter(twig_escape_filter($this->env, $this->getAttribute(($context["field"] ?? null), "help", array()))), "html", null, true);
- echo "\">";
- echo twig_escape_filter($this->env, $this->env->getExtension('Grav\Plugin\Admin\Twig\AdminTwigExtension')->tuFilter($this->getAttribute(($context["field"] ?? null), "label", array())), "html", null, true);
- echo "</span>
- ";
- } else {
-
- echo " ";
- echo twig_escape_filter($this->env, $this->env->getExtension('Grav\Plugin\Admin\Twig\AdminTwigExtension')->tuFilter($this->getAttribute(($context["field"] ?? null), "label", array())), "html", null, true);
- echo "
- ";
- }
-
- echo " ";
- echo ((twig_in_filter($this->getAttribute($this->getAttribute(($context["field"] ?? null), "validate", array()), "required", array()), array(0 => "on", 1 => "true", 2 => 1))) ? ("<span class=\"required\">*</span>") : (""));
- echo "
- </label>
- </div>
- <div class=\"form-data";
-
- if ( !($context["vertical"] ?? null)) {
- echo " block size-2-3 pure-u-2-3";
- }
- echo "\"
- ";
-
- $this->displayBlock('global_attributes', $context, $blocks);
-
- echo " >
- <div class=\"form-list-wrapper ";
-
- echo twig_escape_filter($this->env, $this->getAttribute(($context["field"] ?? null), "size", array()), "html", null, true);
- echo "\" data-type=\"collection\"
- ";
-
- if ($this->getAttribute(($context["field"] ?? null), "selectunique", array())) {
-
- echo " data-select-unique=\"";
- echo twig_escape_filter($this->env, twig_jsonencode_filter($this->getAttribute(($context["field"] ?? null), "selectunique", array())), "html_attr");
- echo "\"
- data-max=\"";
-
- echo twig_escape_filter($this->env, twig_length_filter($this->env, $this->getAttribute(($context["field"] ?? null), "selectunique", array())), "html", null, true);
- echo "\"
- ";
- }
-
- echo " ";
- if ($this->getAttribute(($context["field"] ?? null), "min", array(), "any", true, true)) {
- echo "data-min=\"";
- echo twig_escape_filter($this->env, $this->getAttribute(($context["field"] ?? null), "min", array()), "html", null, true);
- echo "\"";
- }
-
- echo " ";
- if (($this->getAttribute(($context["field"] ?? null), "max", array(), "any", true, true) && !$this->getAttribute(($context["field"] ?? null), "selectunique", array()))) {
- echo "data-max=\"";
- echo twig_escape_filter($this->env, $this->getAttribute(($context["field"] ?? null), "max", array()), "html", null, true);
- echo "\"";
- }
-
- echo " >
- ";
-
- if (twig_in_filter(($context["fieldControls"] ?? null), array(0 => "top", 1 => "both"))) {
-
- echo " <div class=\"collection-actions\">
- ";
-
- if (($context["collapsible"] ?? null)) {
-
- echo " <button class=\"button\" type=\"button\" data-action=\"expand_all\"
- ";
-
- if (($this->getAttribute(($context["field"] ?? null), "disabled", array()) || ($context["isDisabledToggleable"] ?? null))) {
- echo "disabled=\"disabled\"";
- }
- echo "><i class=\"fa fa-chevron-circle-down\"></i> ";
- echo twig_escape_filter($this->env, $this->env->getExtension('Grav\Plugin\Admin\Twig\AdminTwigExtension')->tuFilter(twig_escape_filter($this->env, "PLUGIN_ADMIN.EXPAND_ALL")), "html", null, true);
- echo "</button>
- <button class=\"button\" type=\"button\" data-action=\"collapse_all\"
- ";
-
- if (($this->getAttribute(($context["field"] ?? null), "disabled", array()) || ($context["isDisabledToggleable"] ?? null))) {
- echo "disabled=\"disabled\"";
- }
- echo "><i class=\"fa fa-chevron-circle-right\"></i> ";
- echo twig_escape_filter($this->env, $this->env->getExtension('Grav\Plugin\Admin\Twig\AdminTwigExtension')->tuFilter(twig_escape_filter($this->env, "PLUGIN_ADMIN.COLLAPSE_ALL")), "html", null, true);
- echo "</button>
- ";
- }
-
- echo " ";
- if ($this->getAttribute(($context["field"] ?? null), "sortby", array())) {
-
- echo " <button class=\"button";
- echo (( !twig_length_filter($this->env, ($context["value"] ?? null))) ? (" hidden") : (""));
- echo "\" type=\"button\" data-action=\"sort\" data-action-sort=\"";
- echo twig_escape_filter($this->env, $this->getAttribute(($context["field"] ?? null), "sortby", array()), "html", null, true);
- echo "\" data-action-sort-dir=\"";
- echo twig_escape_filter($this->env, (($this->getAttribute(($context["field"] ?? null), "sortby_dir", array(), "any", true, true)) ? (_twig_default_filter($this->getAttribute(($context["field"] ?? null), "sortby_dir", array()), "asc")) : ("asc")), "html", null, true);
- echo "\"
- ";
-
- if (($this->getAttribute(($context["field"] ?? null), "disabled", array()) || ($context["isDisabledToggleable"] ?? null))) {
- echo "disabled=\"disabled\"";
- }
- echo "><i class=\"fa fa-sort-amount-";
- echo twig_escape_filter($this->env, (($this->getAttribute(($context["field"] ?? null), "sortby_dir", array(), "any", true, true)) ? (_twig_default_filter($this->getAttribute(($context["field"] ?? null), "sortby_dir", array()), "asc")) : ("asc")), "html", null, true);
- echo "\"></i> ";
- echo twig_escape_filter($this->env, $this->env->getExtension('Grav\Plugin\Admin\Twig\AdminTwigExtension')->tuFilter(twig_escape_filter($this->env, ($context["btnSortLabel"] ?? null))), "html", null, true);
- echo " '";
- echo twig_escape_filter($this->env, $this->getAttribute(($context["field"] ?? null), "sortby", array()), "html", null, true);
- echo "'</button>
- ";
- }
-
- echo " <button class=\"button\" type=\"button\" data-action=\"add\" data-action-add=\"bottom\"
- ";
-
- if (($this->getAttribute(($context["field"] ?? null), "disabled", array()) || ($context["isDisabledToggleable"] ?? null))) {
- echo "disabled=\"disabled\"";
- }
- echo "><i class=\"fa fa-plus\"></i> ";
- echo twig_escape_filter($this->env, $this->env->getExtension('Grav\Plugin\Admin\Twig\AdminTwigExtension')->tuFilter(twig_escape_filter($this->env, ($context["btnLabel"] ?? null))), "html", null, true);
- echo "</button>
- </div>
- ";
- }
-
- echo " <ul ";
- if ($this->getAttribute(($context["field"] ?? null), "classes", array(), "any", true, true)) {
- echo "class=\"";
- echo twig_escape_filter($this->env, $this->getAttribute(($context["field"] ?? null), "classes", array()), "html", null, true);
- echo "\"";
- }
- echo " data-collection-holder=\"";
- echo twig_escape_filter($this->env, ($context["name"] ?? null), "html", null, true);
- echo "\"
- ";
-
- if (($this->getAttribute(($context["field"] ?? null), "sort", array()) === false)) {
-
- echo " data-collection-nosort
- ";
- }
-
- echo ">
- ";
-
- if ($this->getAttribute(($context["field"] ?? null), "fields", array())) {
-
- echo " ";
- $context["collapsible"] = ((twig_length_filter($this->env, $this->getAttribute(($context["field"] ?? null), "fields", array())) > 1) && ( !$this->getAttribute(($context["field"] ?? null), "collapsible", array(), "any", true, true) || $this->getAttribute(($context["field"] ?? null), "collapsible", array())));
-
- echo " ";
- $context['_parent'] = $context;
- $context['_seq'] = twig_ensure_traversable(($context["value"] ?? null));
- $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["val"]) {
-
- echo " ";
- $context["itemName"] = ((($context["name"] ?? null)) ? (((($context["name"] ?? null) . ".") . $context["key"])) : ($context["key"]));
-
- echo " <li data-collection-item=\"";
- echo twig_escape_filter($this->env, ($context["itemName"] ?? null), "html", null, true);
- echo "\" data-collection-key=\"";
- echo twig_escape_filter($this->env, $context["key"], "html", null, true);
- echo "\" class=\"";
- echo (((($context["collapsible"] ?? null) && $this->getAttribute(($context["field"] ?? null), "collapsed", array()))) ? ("collection-collapsed") : (""));
- echo "\">
- <div class=\"collection-sort\"><i class=\"fa fa-fw fa-bars\"></i></div>
- ";
-
- $context['_parent'] = $context;
- $context['_seq'] = twig_ensure_traversable($this->getAttribute(($context["field"] ?? null), "fields", 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["childName"] => $context["child"]) {
-
- if (($context["childName"] == "value")) {
-
- $context["childKey"] = "";
-
- echo " ";
- $context["childValue"] = $context["val"];
-
- echo " ";
- $context["childName"] = ($context["itemName"] ?? null);
- } elseif ((is_string($__internal_7cd7461123377b8c9c1b6a01f46c7bbd94bd12e59266005df5e93029ddbc0ec5 =
- $context["childName"]) && is_string($__internal_3e28b7f596c58d7729642bcf2acc6efc894803703bf5fa7e74cd8d2aa1f8c68a = ".") && ('' === $__internal_3e28b7f596c58d7729642bcf2acc6efc894803703bf5fa7e74cd8d2aa1f8c68a || 0 === strpos($__internal_7cd7461123377b8c9c1b6a01f46c7bbd94bd12e59266005df5e93029ddbc0ec5, $__internal_3e28b7f596c58d7729642bcf2acc6efc894803703bf5fa7e74cd8d2aa1f8c68a)))) {
-
- $context["childKey"] = twig_trim_filter($context["childName"], ".");
-
- echo " ";
- $context["childValue"] = $this->getAttribute($context["val"], twig_slice($this->env, $context["childName"], 1, null), array(), "array");
-
- echo " ";
- $context["childName"] = (($context["itemName"] ?? null) . $context["childName"]);
-
- echo " ";
- } else {
-
- echo " ";
- $context["childKey"] = $context["childName"];
-
- echo " ";
- $context["childValue"] = $this->getAttribute(($context["data"] ?? null), "value", array(0 => (($context["scope"] ?? null) . $context["childName"])), "method");
-
- echo " ";
- $context["childName"] = twig_replace_filter($context["childName"], array("*" => $context["key"]));
-
- echo " ";
- }
-
- echo " ";
- $context["child"] = twig_array_merge($context["child"], array("name" => $context["childName"]));
-
- echo "
- ";
-
- if (($this->getAttribute($context["child"], "type", array()) == "key")) {
-
- echo " ";
-
- $this->loadTemplate("forms/fields/key/key.html.twig", "forms/fields/list/list.html.twig", 91)->display(array_merge($context, array("field" =>
- $context["child"], "value" => $context["key"])));
-
- echo " ";
- } elseif (($this->getAttribute($context["child"], "key", array()) == true)) {
-
- echo " ";
- $this->loadTemplate(array(0 => (((("forms/fields/" . $this->getAttribute(
- $context["child"], "type", array())) . "/") . $this->getAttribute($context["child"], "type", array())) . ".html.twig"), 1 => "forms/fields/key/key.html.twig"), "forms/fields/list/list.html.twig", 95)->display(array_merge($context, array("field" =>
- $context["child"], "value" => $context["key"])));
-
- echo " ";
- } elseif ($this->getAttribute($context["child"], "type", array())) {
-
- echo " ";
- $context["originalValue"] = ($context["childValue"] ?? null);
-
- echo " ";
-
- $this->loadTemplate(array(0 => (((("forms/fields/" . $this->getAttribute(
- $context["child"], "type", array())) . "/") . $this->getAttribute($context["child"], "type", array())) . ".html.twig"), 1 => "forms/fields/text/text.html.twig"), "forms/fields/list/list.html.twig", 103)->display(array_merge($context, array("field" =>
- $context["child"], "value" => ($context["childValue"] ?? null))));
-
- echo " ";
- }
-
- 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['childName'], $context['child'], $context['_parent'], $context['loop']);
- $context = array_intersect_key($context, $_parent) + $_parent;
-
- echo " <div class=\"item-actions\">
- ";
-
- if (($context["collapsible"] ?? null)) {
-
- echo " <i class=\"fa fa-chevron-circle-";
- echo (($this->getAttribute(($context["field"] ?? null), "collapsed", array())) ? ("right") : ("down"));
- echo "\" data-action=\"";
- echo (($this->getAttribute(($context["field"] ?? null), "collapsed", array())) ? ("expand") : ("collapse"));
- echo "\"></i>
- <br />
- ";
- }
-
- echo " <i class=\"fa fa-trash-o\" data-action=\"delete\"></i>
- </div>
- </li>
- ";
- ++$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['val'], $context['_parent'], $context['loop']);
- $context = array_intersect_key($context, $_parent) + $_parent;
-
- echo " ";
- }
-
- echo " </ul>
- ";
-
- if (twig_in_filter(($context["fieldControls"] ?? null), array(0 => "bottom", 1 => "both"))) {
-
- echo " <div class=\"collection-actions\">
- ";
-
- if (($context["collapsible"] ?? null)) {
-
- echo " <button class=\"button\" type=\"button\" data-action=\"expand_all\"
- ";
-
- if (($this->getAttribute(($context["field"] ?? null), "disabled", array()) || ($context["isDisabledToggleable"] ?? null))) {
- echo "disabled=\"disabled\"";
- }
- echo "><i class=\"fa fa-chevron-circle-down\"></i> ";
- echo twig_escape_filter($this->env, $this->env->getExtension('Grav\Plugin\Admin\Twig\AdminTwigExtension')->tuFilter(twig_escape_filter($this->env, "PLUGIN_ADMIN.EXPAND_ALL")), "html", null, true);
- echo "</button>
- <button class=\"button\" type=\"button\" data-action=\"collapse_all\"
- ";
-
- if (($this->getAttribute(($context["field"] ?? null), "disabled", array()) || ($context["isDisabledToggleable"] ?? null))) {
- echo "disabled=\"disabled\"";
- }
- echo "><i class=\"fa fa-chevron-circle-right\"></i> ";
- echo twig_escape_filter($this->env, $this->env->getExtension('Grav\Plugin\Admin\Twig\AdminTwigExtension')->tuFilter(twig_escape_filter($this->env, "PLUGIN_ADMIN.COLLAPSE_ALL")), "html", null, true);
- echo "</button>
- ";
- }
-
- echo " ";
- if ($this->getAttribute(($context["field"] ?? null), "sortby", array())) {
-
- echo " <button class=\"button";
- echo (( !twig_length_filter($this->env, ($context["value"] ?? null))) ? (" hidden") : (""));
- echo "\" type=\"button\" data-action=\"sort\" data-action-sort=\"";
- echo twig_escape_filter($this->env, $this->getAttribute(($context["field"] ?? null), "sortby", array()), "html", null, true);
- echo "\" data-action-sort-dir=\"";
- echo twig_escape_filter($this->env, (($this->getAttribute(($context["field"] ?? null), "sortby_dir", array(), "any", true, true)) ? (_twig_default_filter($this->getAttribute(($context["field"] ?? null), "sortby_dir", array()), "asc")) : ("asc")), "html", null, true);
- echo "\"
- ";
-
- if (($this->getAttribute(($context["field"] ?? null), "disabled", array()) || ($context["isDisabledToggleable"] ?? null))) {
- echo "disabled=\"disabled\"";
- }
- echo "><i class=\"fa fa-sort-amount-";
- echo twig_escape_filter($this->env, (($this->getAttribute(($context["field"] ?? null), "sortby_dir", array(), "any", true, true)) ? (_twig_default_filter($this->getAttribute(($context["field"] ?? null), "sortby_dir", array()), "asc")) : ("asc")), "html", null, true);
- echo "\"></i> ";
- echo twig_escape_filter($this->env, $this->env->getExtension('Grav\Plugin\Admin\Twig\AdminTwigExtension')->tuFilter(twig_escape_filter($this->env, ($context["btnSortLabel"] ?? null))), "html", null, true);
- echo " '";
- echo twig_escape_filter($this->env, $this->getAttribute(($context["field"] ?? null), "sortby", array()), "html", null, true);
- echo "'</button>
- ";
- }
-
- echo " <button class=\"button\" type=\"button\" data-action=\"add\" data-action-add=\"bottom\"
- ";
-
- if (($this->getAttribute(($context["field"] ?? null), "disabled", array()) || ($context["isDisabledToggleable"] ?? null))) {
- echo "disabled=\"disabled\"";
- }
- echo "><i class=\"fa fa-plus\"></i> ";
- echo twig_escape_filter($this->env, $this->env->getExtension('Grav\Plugin\Admin\Twig\AdminTwigExtension')->tuFilter(twig_escape_filter($this->env, ($context["btnLabel"] ?? null))), "html", null, true);
- echo "</button>
- </div>
- ";
- }
-
- $context["itemName"] = ((($context["name"] ?? null)) ? ((($context["name"] ?? null) . ".*")) : ("*"));
-
- echo "<div style=\"display: none;\" data-collection-template=\"new\" data-collection-template-html=\"";
- echo twig_escape_filter($this->env, twig_replace_filter( $this->renderBlock("__internal_e408f6e41354bae6411f4fb2bf2e9ca816e0821165964d2e30246de2e260224d", $context, $blocks), array(" " => " ", "
- " => " ")), "html_attr");
-
- echo "\"></div>
- <div style=\"display: none;\" data-collection-config=\"";
-
- echo twig_escape_filter($this->env, ($context["name"] ?? null), "html", null, true);
- echo "\"></div>
- </div>
- </div>
- ";
- }
-
- public function block_global_attributes($context, array $blocks = array())
- {
-
- echo " data-grav-field=\"";
- echo twig_escape_filter($this->env, $this->getAttribute(($context["field"] ?? null), "type", array()), "html", null, true);
- echo "\"
- data-grav-disabled=\"";
-
- echo twig_escape_filter($this->env, ($context["toggleableChecked"] ?? null), "html", null, true);
- echo "\"
- data-grav-default=\"";
-
- echo twig_escape_filter($this->env, twig_jsonencode_filter($this->getAttribute(($context["field"] ?? null), "default", array())), "html_attr");
- echo "\"
- ";
- }
-
- public function block___internal_e408f6e41354bae6411f4fb2bf2e9ca816e0821165964d2e30246de2e260224d($context, array $blocks = array())
- {
-
- echo "<li data-collection-item=\"";
- echo twig_escape_filter($this->env, ($context["itemName"] ?? null), "html", null, true);
- echo "\">
- ";
-
- if ( !($this->getAttribute(($context["field"] ?? null), "sort", array()) === false)) {
-
- echo " <div class=\"collection-sort\"><i class=\"fa fa-fw fa-bars\"></i></div>
- ";
- }
-
- if ($this->getAttribute(($context["field"] ?? null), "fields", array())) {
-
- $context['_parent'] = $context;
- $context['_seq'] = twig_ensure_traversable($this->getAttribute(($context["field"] ?? null), "fields", 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["childName"] => $context["child"]) {
-
- if (($context["childName"] == "value")) {
-
- $context["childKey"] = "";
-
- $context["childName"] = ($context["itemName"] ?? null);
- } elseif ((is_string($__internal_b0b3d6199cdf4d15a08b3fb98fe017ecb01164300193d18d78027218d843fc57 =
- $context["childName"]) && is_string($__internal_81ccf322d0988ca0aa9ae9943d772c435c5ff01fb50b956278e245e40ae66ab9 = ".") && ('' === $__internal_81ccf322d0988ca0aa9ae9943d772c435c5ff01fb50b956278e245e40ae66ab9 || 0 === strpos($__internal_b0b3d6199cdf4d15a08b3fb98fe017ecb01164300193d18d78027218d843fc57, $__internal_81ccf322d0988ca0aa9ae9943d772c435c5ff01fb50b956278e245e40ae66ab9)))) {
-
- $context["childKey"] = twig_trim_filter($context["childName"], ".");
-
- $context["childName"] = (($context["itemName"] ?? null) . $context["childName"]);
- } else {
-
- $context["childKey"] = $context["childName"];
-
- $context["childName"] = twig_replace_filter($context["childName"], array("*" => ($context["key"] ?? null)));
- }
-
- $context["child"] = twig_array_merge($context["child"], array("name" => $context["childName"]));
-
- if (($this->getAttribute($context["child"], "type", array()) == "key")) {
-
- $this->loadTemplate("forms/fields/key/key.html.twig", "forms/fields/list/list.html.twig", 160)->display(array_merge($context, array("field" =>
- $context["child"], "value" => null)));
- } elseif (($this->getAttribute(
- $context["child"], "key", array()) == true)) {
-
- $this->loadTemplate(array(0 => (((("forms/fields/" . $this->getAttribute(
- $context["child"], "type", array())) . "/") . $this->getAttribute($context["child"], "type", array())) . ".html.twig"), 1 => "forms/fields/key/key.html.twig"), "forms/fields/list/list.html.twig", 165)->display(array_merge($context, array("field" =>
- $context["child"], "value" => null)));
- } elseif ($this->getAttribute(
- $context["child"], "type", array())) {
-
- $this->loadTemplate(array(0 => (((("forms/fields/" . $this->getAttribute(
- $context["child"], "type", array())) . "/") . $this->getAttribute($context["child"], "type", array())) . ".html.twig"), 1 => "forms/fields/text/text.html.twig"), "forms/fields/list/list.html.twig", 172)->display(array_merge($context, array("field" =>
- $context["child"], "value" => null)));
- }
- ++$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['childName'], $context['child'], $context['_parent'], $context['loop']);
- $context = array_intersect_key($context, $_parent) + $_parent;
-
- echo " <div class=\"item-actions\">
- ";
-
- if (($context["collapsible"] ?? null)) {
-
- echo " <i class=\"fa fa-chevron-circle-down\" data-action=\"collapse\"></i>
- <br />
- ";
- }
-
- echo " <i class=\"fa fa-trash-o\" data-action=\"delete\"></i>
- </div>";
- }
-
- echo "</li>";
- }
- public function getTemplateName()
- {
- return "forms/fields/list/list.html.twig";
- }
- public function isTraitable()
- {
- return false;
- }
- public function getDebugInfo()
- {
- return array ( 618 => 187, 614 => 184, 609 => 181, 607 => 180, 604 => 179, 589 => 175, 588 => 173, 587 => 172, 585 => 170, 583 => 168, 582 => 166, 581 => 165, 579 => 163, 577 => 161, 576 => 160, 574 => 158, 572 => 156, 569 => 154, 567 => 153, 564 => 151, 562 => 150, 560 => 149, 558 => 148, 556 => 147, 554 => 146, 537 => 145, 535 => 144, 531 => 142, 529 => 141, 524 => 140, 521 => 139, 515 => 35, 511 => 34, 506 => 33, 503 => 32, 495 => 190, 491 => 188, 487 => 139, 485 => 138, 475 => 134, 472 => 133, 459 => 131, 450 => 130, 447 => 129, 438 => 127, 429 => 125, 426 => 124, 424 => 123, 421 => 122, 419 => 121, 416 => 120, 413 => 119, 396 => 115, 387 => 112, 385 => 111, 382 => 110, 368 => 109, 365 => 108, 363 => 106, 362 => 104, 361 => 103, 359 => 102, 356 => 101, 353 => 100, 351 => 98, 350 => 96, 348 => 95, 345 => 94, 343 => 92, 342 => 91, 340 => 90, 338 => 89, 335 => 88, 332 => 87, 329 => 86, 326 => 85, 323 => 84, 320 => 83, 317 => 82, 314 => 81, 311 => 80, 309 => 79, 307 => 78, 304 => 77, 301 => 76, 299 => 75, 297 => 74, 280 => 73, 270 => 71, 267 => 70, 249 => 69, 246 => 68, 244 => 67, 241 => 66, 237 => 65, 235 => 64, 224 => 63, 214 => 60, 211 => 59, 198 => 57, 189 => 56, 186 => 55, 177 => 53, 168 => 51, 165 => 50, 163 => 49, 160 => 48, 158 => 47, 155 => 46, 148 => 45, 141 => 44, 136 => 42, 131 => 41, 129 => 40, 125 => 39, 121 => 37, 119 => 32, 113 => 31, 106 => 28, 100 => 26, 92 => 24, 90 => 23, 85 => 22, 79 => 19, 76 => 18, 72 => 17, 67 => 16, 63 => 15, 59 => 14, 53 => 12, 51 => 11, 44 => 10, 41 => 9, 37 => 1, 35 => 7, 33 => 6, 31 => 5, 29 => 4, 27 => 3, 11 => 1,);
- }
-
- 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 \"forms/field.html.twig\" %}
- {% set value = (value is null ? field.default : value) %}
- {% set name = field.name %}
- {% set btnLabel = field.btnLabel is defined ? field.btnLabel : \"PLUGIN_ADMIN.ADD_ITEM\" %}
- {% set btnSortLabel = field.btnSortLabel is defined ? field.btnSortLabel : \"PLUGIN_ADMIN.SORT_BY\" %}
- {% set fieldControls = field.controls|default('bottom') %}
- {% block contents %}
- <div class=\"form-label{% if not vertical %} block size-1-3 pure-u-1-3{% endif %}\">
- {% if field.toggleable %}
- <span class=\"checkboxes toggleable\" data-grav-field=\"toggleable\" data-grav-field-name=\"{{ (scope ~ field.name)|fieldName }}\">
- <input type=\"checkbox\"
- id=\"toggleable_{{ field.name }}\"
- {% if toggleableChecked %}value=\"1\"{% endif %}
- name=\"toggleable_{{ (scope ~ field.name)|fieldName }}\"
- {% if toggleableChecked %}checked=\"checked\"{% endif %}
- >
- <label for=\"toggleable_{{ field.name }}\"></label>
- </span>
- {% endif %}
- <label{{ (field.toggleable ? ' class=\"toggleable\" for=\"toggleable_' ~ field.name ~ '\"')|raw }}>
- {% if field.help %}
- <span class=\"hint--bottom\" data-hint=\"{{ field.help|e|tu }}\">{{ field.label|tu }}</span>
- {% else %}
- {{ field.label|tu }}
- {% endif %}
- {{ field.validate.required in ['on', 'true', 1] ? '<span class=\"required\">*</span>' }}
- </label>
- </div>
- <div class=\"form-data{% if not vertical %} block size-2-3 pure-u-2-3{% endif %}\"
- {% block global_attributes %}
- data-grav-field=\"{{ field.type }}\"
- data-grav-disabled=\"{{ toggleableChecked }}\"
- data-grav-default=\"{{ field.default|json_encode|e('html_attr') }}\"
- {% endblock %}
- >
- <div class=\"form-list-wrapper {{ field.size }}\" data-type=\"collection\"
- {% if field.selectunique %}
- data-select-unique=\"{{ field.selectunique|json_encode|e('html_attr') }}\"
- data-max=\"{{ field.selectunique|length }}\"
- {% endif %}
- {% if field.min is defined %}data-min=\"{{ field.min }}\"{% endif %}
- {% if field.max is defined and not field.selectunique %}data-max=\"{{ field.max }}\"{% endif %}
- >
- {% if fieldControls in ['top', 'both'] %}
- <div class=\"collection-actions\">
- {% if collapsible %}
- <button class=\"button\" type=\"button\" data-action=\"expand_all\"
- {% if field.disabled or isDisabledToggleable %}disabled=\"disabled\"{% endif %}><i class=\"fa fa-chevron-circle-down\"></i> {{ \"PLUGIN_ADMIN.EXPAND_ALL\"|e|tu }}</button>
- <button class=\"button\" type=\"button\" data-action=\"collapse_all\"
- {% if field.disabled or isDisabledToggleable %}disabled=\"disabled\"{% endif %}><i class=\"fa fa-chevron-circle-right\"></i> {{ \"PLUGIN_ADMIN.COLLAPSE_ALL\"|e|tu }}</button>
- {% endif %}
- {% if field.sortby %}
- <button class=\"button{{ not value|length ? ' hidden' : '' }}\" type=\"button\" data-action=\"sort\" data-action-sort=\"{{ field.sortby }}\" data-action-sort-dir=\"{{ field.sortby_dir|default('asc') }}\"
- {% if field.disabled or isDisabledToggleable %}disabled=\"disabled\"{% endif %}><i class=\"fa fa-sort-amount-{{ field.sortby_dir|default('asc') }}\"></i> {{ btnSortLabel|e|tu }} '{{ field.sortby }}'</button>
- {% endif %}
- <button class=\"button\" type=\"button\" data-action=\"add\" data-action-add=\"bottom\"
- {% if field.disabled or isDisabledToggleable %}disabled=\"disabled\"{% endif %}><i class=\"fa fa-plus\"></i> {{ btnLabel|e|tu }}</button>
- </div>
- {% endif %}
- <ul {% if field.classes is defined %}class=\"{{ field.classes }}\"{% endif %} data-collection-holder=\"{{ name }}\"
- {% if field.sort is same as(false) %}
- data-collection-nosort
- {% endif %}>
- {% if field.fields %}
- {% set collapsible = field.fields|length > 1 and (field.collapsible is not defined or field.collapsible) %}
- {% for key, val in value %}
- {% set itemName = name ? name ~ '.' ~ key : key %}
- <li data-collection-item=\"{{ itemName }}\" data-collection-key=\"{{ key }}\" class=\"{{ collapsible and field.collapsed ? 'collection-collapsed' : '' }}\">
- <div class=\"collection-sort\"><i class=\"fa fa-fw fa-bars\"></i></div>
- {% for childName, child in field.fields %}
- {%- if childName == 'value' -%}
- {% set childKey = '' %}
- {% set childValue = val %}
- {% set childName = itemName -%}
- {%- elseif childName starts with '.' -%}
- {% set childKey = childName|trim('.') %}
- {% set childValue = val[childName[1:]] %}
- {% set childName = itemName ~ childName %}
- {% else %}
- {% set childKey = childName %}
- {% set childValue = data.value(scope ~ childName) %}
- {% set childName = childName|replace({'*': key}) %}
- {% endif %}
- {% set child = child|merge({ name: childName }) %}
- {% if child.type == 'key' %}
- {%
- include 'forms/fields/key/key.html.twig'
- with { field: child, value: key }
- %}
- {% elseif child.key == true %}
- {% include [
- \"forms/fields/#{child.type}/#{child.type}.html.twig\",
- 'forms/fields/key/key.html.twig'
- ] with { field: child, value: key }
- %}
- {% elseif child.type %}
- {% set originalValue = childValue %}
- {%
- include [
- \"forms/fields/#{child.type}/#{child.type}.html.twig\",
- 'forms/fields/text/text.html.twig'
- ] with { field: child, value: childValue }
- %}
- {% endif %}
- {% endfor %}
- <div class=\"item-actions\">
- {% if collapsible %}
- <i class=\"fa fa-chevron-circle-{{ field.collapsed ? 'right' : 'down' }}\" data-action=\"{{ field.collapsed ? 'expand' : 'collapse' }}\"></i>
- <br />
- {% endif %}
- <i class=\"fa fa-trash-o\" data-action=\"delete\"></i>
- </div>
- </li>
- {% endfor %}
- {% endif %}
- </ul>
- {% if fieldControls in ['bottom', 'both'] %}
- <div class=\"collection-actions\">
- {% if collapsible %}
- <button class=\"button\" type=\"button\" data-action=\"expand_all\"
- {% if field.disabled or isDisabledToggleable %}disabled=\"disabled\"{% endif %}><i class=\"fa fa-chevron-circle-down\"></i> {{ \"PLUGIN_ADMIN.EXPAND_ALL\"|e|tu }}</button>
- <button class=\"button\" type=\"button\" data-action=\"collapse_all\"
- {% if field.disabled or isDisabledToggleable %}disabled=\"disabled\"{% endif %}><i class=\"fa fa-chevron-circle-right\"></i> {{ \"PLUGIN_ADMIN.COLLAPSE_ALL\"|e|tu }}</button>
- {% endif %}
- {% if field.sortby %}
- <button class=\"button{{ not value|length ? ' hidden' : '' }}\" type=\"button\" data-action=\"sort\" data-action-sort=\"{{ field.sortby }}\" data-action-sort-dir=\"{{ field.sortby_dir|default('asc') }}\"
- {% if field.disabled or isDisabledToggleable %}disabled=\"disabled\"{% endif %}><i class=\"fa fa-sort-amount-{{ field.sortby_dir|default('asc') }}\"></i> {{ btnSortLabel|e|tu }} '{{ field.sortby }}'</button>
- {% endif %}
- <button class=\"button\" type=\"button\" data-action=\"add\" data-action-add=\"bottom\"
- {% if field.disabled or isDisabledToggleable %}disabled=\"disabled\"{% endif %}><i class=\"fa fa-plus\"></i> {{ btnLabel|e|tu }}</button>
- </div>
- {% endif %}
- {%- set itemName = name ? name ~ '.*' : '*' -%}
- <div style=\"display: none;\" data-collection-template=\"new\" data-collection-template-html=\"{%- filter replace({' ': ' ', '\\n': ' '})|e('html_attr') -%}
- <li data-collection-item=\"{{ itemName }}\">
- {% if field.sort is not same as(false) %}
- <div class=\"collection-sort\"><i class=\"fa fa-fw fa-bars\"></i></div>
- {% endif %}
- {%- if field.fields -%}
- {%- for childName, child in field.fields -%}
- {%- if childName == 'value' -%}
- {%- set childKey = '' -%}
- {%- set childName = itemName -%}
- {%- elseif childName starts with '.' -%}
- {%- set childKey = childName|trim('.') -%}
- {%- set childName = itemName ~ childName -%}
- {%- else %}
- {%- set childKey = childName -%}
- {%- set childName = childName|replace({'*': key}) -%}
- {%- endif %}
- {%- set child = child|merge({ name: childName }) -%}
- {%- if child.type == 'key' -%}
- {%-
- include 'forms/fields/key/key.html.twig'
- with { field: child, value: null }
- -%}
- {%- elseif child.key == true -%}
- {%-
- include [
- \"forms/fields/#{child.type}/#{child.type}.html.twig\",
- 'forms/fields/key/key.html.twig'
- ] with { field: child, value: null }
- -%}
- {%- elseif child.type -%}
- {%-
- include [
- \"forms/fields/#{child.type}/#{child.type}.html.twig\",
- 'forms/fields/text/text.html.twig'
- ] with { field: child, value: null }
- -%}
- {%- endif -%}
- {%- endfor %}
- <div class=\"item-actions\">
- {% if collapsible %}
- <i class=\"fa fa-chevron-circle-down\" data-action=\"collapse\"></i>
- <br />
- {% endif %}
- <i class=\"fa fa-trash-o\" data-action=\"delete\"></i>
- </div>
- {%- endif -%}
- </li>
- {%- endfilter -%}\"></div>
- <div style=\"display: none;\" data-collection-config=\"{{ name }}\"></div>
- </div>
- </div>
- {% endblock %}
- ", "forms/fields/list/list.html.twig", "/mnt/data/Sites/r2c.net/user/plugins/admin/themes/grav/templates/forms/fields/list/list.html.twig");
- }
- }
|