public function block_sidebar($context, array $blocks = array()) { // line 17 echo "\t"; if (twig_length_filter($this->env, $this->getContext($context, "newEntrySections"))) { // line 18 echo "\t\t<div class=\"buttons\">\n\t\t\t"; // line 19 if (twig_length_filter($this->env, $this->getContext($context, "newEntrySections")) > 1) { // line 20 echo "\t\t\t\t<div class=\"btn submit menubtn add icon\">"; echo twig_escape_filter($this->env, \Craft\Craft::t("New Entry"), "html", null, true); echo "</div>\n\t\t\t\t<div class=\"menu\">\n\t\t\t\t\t<ul>\n\t\t\t\t\t\t"; // line 23 $context['_parent'] = (array) $context; $context['_seq'] = twig_ensure_traversable($this->getContext($context, "newEntrySections")); foreach ($context['_seq'] as $context["_key"] => $context["section"]) { // line 24 echo "\t\t\t\t\t\t\t<li><a href=\""; echo twig_escape_filter($this->env, \Craft\UrlHelper::getUrl("entries/" . $this->getAttribute($this->getContext($context, "section"), "handle") . "/new"), "html", null, true); echo "\">"; echo twig_escape_filter($this->env, \Craft\Craft::t($this->getAttribute($this->getContext($context, "section"), "name")), "html", null, true); echo "</a></li>\n\t\t\t\t\t\t"; } $_parent = $context['_parent']; unset($context['_seq'], $context['_iterated'], $context['_key'], $context['section'], $context['_parent'], $context['loop']); $context = array_intersect_key($context, $_parent) + $_parent; // line 26 echo "\t\t\t\t\t</ul>\n\t\t\t\t</div>\n\t\t\t"; } else { // line 29 echo "\t\t\t\t<a class=\"btn submit add icon\" href=\""; echo twig_escape_filter($this->env, \Craft\UrlHelper::getUrl("entries/" . $this->getAttribute($this->getAttribute($this->getContext($context, "newEntrySections"), 0, array(), "array"), "handle") . "/new"), "html", null, true); echo "\">"; echo twig_escape_filter($this->env, \Craft\Craft::t("New Entry"), "html", null, true); echo "</a>\n\t\t\t"; } // line 31 echo "\t\t</div>\n\t"; } // line 33 echo "\n\t"; // line 34 $this->displayParentBlock("sidebar", $context, $blocks); echo "\n"; }
protected function doDisplay(array $context, array $blocks = array()) { // line 3 $context["entryTypes"] = $this->getAttribute($this->getContext($context, "section"), "getEntryTypes", array(), "method"); // line 4 $context["multiple"] = twig_length_filter($this->env, $this->getContext($context, "entryTypes")) > 1; // line 6 ob_start(); // line 7 echo "\t<table id=\"entrytypes\" class=\"data fullwidth collapsible\">\n\t\t<thead>\n\t\t\t<th scope=\"col\">"; // line 9 echo twig_escape_filter($this->env, \Craft\Craft::t("Name"), "html", null, true); echo "</th>\n\t\t\t<th scope=\"col\">"; // line 10 echo twig_escape_filter($this->env, \Craft\Craft::t("Handle"), "html", null, true); echo "</th>\n\t\t\t"; // line 11 if ($this->getContext($context, "multiple")) { // line 12 echo "\t\t\t\t<td class=\"thin\"></td>\n\t\t\t\t<td class=\"thin\"></td>\n\t\t\t"; } // line 15 echo "\t\t</thead>\n\t\t<tbody>\n\t\t\t"; // line 17 $context['_parent'] = (array) $context; $context['_seq'] = twig_ensure_traversable($this->getAttribute($this->getContext($context, "section"), "getEntryTypes", array(), "method")); foreach ($context['_seq'] as $context["_key"] => $context["entryType"]) { // line 18 echo "\t\t\t\t<tr data-id=\""; echo twig_escape_filter($this->env, $this->getAttribute($this->getContext($context, "entryType"), "id"), "html", null, true); echo "\" data-name=\""; echo twig_escape_filter($this->env, $this->getAttribute($this->getContext($context, "entryType"), "name"), "html", null, true); echo "\">\n\t\t\t\t\t<th scope=\"row\" data-title=\""; // line 19 echo twig_escape_filter($this->env, \Craft\Craft::t("Name"), "html", null, true); echo "\"><a href=\""; echo twig_escape_filter($this->env, \Craft\UrlHelper::getUrl("settings/sections/" . $this->getAttribute($this->getContext($context, "section"), "id") . "/entrytypes/" . $this->getAttribute($this->getContext($context, "entryType"), "id")), "html", null, true); echo "\">"; echo twig_escape_filter($this->env, $this->getAttribute($this->getContext($context, "entryType"), "name"), "html", null, true); echo "</a></th>\n\t\t\t\t\t<td data-title=\""; // line 20 echo twig_escape_filter($this->env, \Craft\Craft::t("Handle"), "html", null, true); echo "\"><code>"; echo twig_escape_filter($this->env, $this->getAttribute($this->getContext($context, "entryType"), "handle"), "html", null, true); echo "</code></td>\n\t\t\t\t\t"; // line 21 if ($this->getContext($context, "multiple")) { // line 22 echo "\t\t\t\t\t\t<td class=\"thin\"><a class=\"move icon\" title=\""; echo twig_escape_filter($this->env, \Craft\Craft::t("Reorder"), "html", null, true); echo "\" role=\"button\"></a></td>\n\t\t\t\t\t\t<td class=\"thin\"><a class=\"delete icon\" title=\""; // line 23 echo twig_escape_filter($this->env, \Craft\Craft::t("Delete"), "html", null, true); echo "\" role=\"button\"></a></td>\n\t\t\t\t\t"; } // line 25 echo "\t\t\t\t</tr>\n\t\t\t"; } $_parent = $context['_parent']; unset($context['_seq'], $context['_iterated'], $context['_key'], $context['entryType'], $context['_parent'], $context['loop']); $context = array_intersect_key($context, $_parent) + $_parent; // line 27 echo "\t\t</tbody>\n\t</table>\n\n\t"; // line 30 if ($this->getAttribute($this->getContext($context, "section"), "type") != "single") { // line 31 echo "\t\t<div class=\"buttons\">\n\t\t\t<a href=\""; // line 32 echo twig_escape_filter($this->env, \Craft\UrlHelper::getUrl("settings/sections/" . $this->getAttribute($this->getContext($context, "section"), "id") . "/entrytypes/new"), "html", null, true); echo "\" class=\"btn submit add icon\">"; echo twig_escape_filter($this->env, \Craft\Craft::t("New Entry Type"), "html", null, true); echo "</a>\n\t\t</div>\n\t"; } $context["content"] = '' === ($tmp = ob_get_clean()) ? '' : new Twig_Markup($tmp, $this->env->getCharset()); // line 38 if ($this->getAttribute($this->getContext($context, "section"), "type") != "single") { // line 39 ob_start(); // line 40 echo "\t\tnew Craft.AdminTable({\n\t\t\ttableSelector: '#entrytypes',\n\t\t\tdeleteAction: 'sections/deleteEntryType',\n\t\t\tminObjects: 1,\n\t\t\tsortable: true,\n\t\t\treorderAction: 'sections/reorderEntryTypes',\n\t\t\tconfirmDeleteMessage: '"; // line 46 echo twig_escape_filter($this->env, \Craft\Craft::t("Are you sure you want to delete “{name}” and all entries that use it?"), "html", null, true); echo "',\n\t\t});\n\t"; $context["js"] = '' === ($tmp = ob_get_clean()) ? '' : new Twig_Markup($tmp, $this->env->getCharset()); // line 49 \Craft\craft()->templates->includeJs($this->getContext($context, "js")); } $this->parent->display($context, array_merge($this->blocks, $blocks)); }
protected function doDisplay(array $context, array $blocks = array()) { // line 2 $context["title"] = \Craft\Craft::t("Sections"); // line 4 $context["crumbs"] = array(0 => array("label" => \Craft\Craft::t("Settings"), "url" => \Craft\UrlHelper::getUrl("settings"))); // line 8 $context["docsUrl"] = "http://buildwithcraft.com/docs/sections-and-entries#sections"; // line 11 ob_start(); // line 12 echo "\t<div id=\"nosections\""; if ($this->getContext($context, "sections")) { echo " class=\"hidden\""; } echo ">\n\t\t<p>"; // line 13 echo twig_escape_filter($this->env, \Craft\Craft::t("No sections exist yet."), "html", null, true); echo "</p>\n\t</div>\n\n\t"; // line 16 if (twig_length_filter($this->env, $this->getContext($context, "sections"))) { // line 17 echo "\t\t<table id=\"sections\" class=\"data fullwidth collapsible\">\n\t\t\t<thead>\n\t\t\t\t<th scope=\"col\">"; // line 19 echo twig_escape_filter($this->env, \Craft\Craft::t("Name"), "html", null, true); echo "</th>\n\t\t\t\t<th scope=\"col\">"; // line 20 echo twig_escape_filter($this->env, \Craft\Craft::t("Handle"), "html", null, true); echo "</th>\n\t\t\t\t<th scope=\"col\">"; // line 21 echo twig_escape_filter($this->env, \Craft\Craft::t("Type"), "html", null, true); echo "</th>\n\t\t\t\t<th scope=\"col\">"; // line 22 echo twig_escape_filter($this->env, \Craft\Craft::t("URL Format"), "html", null, true); echo "</th>\n\t\t\t\t<th scope=\"col\">"; // line 23 echo twig_escape_filter($this->env, \Craft\Craft::t("Entry Types"), "html", null, true); echo "</th>\n\t\t\t\t<td class=\"thin\"></td>\n\t\t\t</thead>\n\t\t\t<tbody>\n\t\t\t\t"; // line 27 $context['_parent'] = (array) $context; $context['_seq'] = twig_ensure_traversable($this->getContext($context, "sections")); foreach ($context['_seq'] as $context["_key"] => $context["section"]) { // line 28 echo "\t\t\t\t\t<tr data-id=\""; echo twig_escape_filter($this->env, $this->getAttribute($this->getContext($context, "section"), "id"), "html", null, true); echo "\" data-name=\""; echo twig_escape_filter($this->env, \Craft\Craft::t($this->getAttribute($this->getContext($context, "section"), "name")), "html", null, true); echo "\">\n\t\t\t\t\t\t<th scope=\"row\" data-title=\""; // line 29 echo twig_escape_filter($this->env, \Craft\Craft::t("Name"), "html", null, true); echo "\"><a href=\""; echo twig_escape_filter($this->env, \Craft\UrlHelper::getUrl("settings/sections/" . $this->getAttribute($this->getContext($context, "section"), "id")), "html", null, true); echo "\">"; echo twig_escape_filter($this->env, \Craft\Craft::t($this->getAttribute($this->getContext($context, "section"), "name")), "html", null, true); echo "</a></th>\n\t\t\t\t\t\t<td data-title=\""; // line 30 echo twig_escape_filter($this->env, \Craft\Craft::t("Handle"), "html", null, true); echo "\"><code>"; echo twig_escape_filter($this->env, $this->getAttribute($this->getContext($context, "section"), "handle"), "html", null, true); echo "</code></td>\n\t\t\t\t\t\t<td data-title=\""; // line 31 echo twig_escape_filter($this->env, \Craft\Craft::t("Type"), "html", null, true); echo "\">"; echo twig_escape_filter($this->env, \Craft\Craft::t(twig_title_string_filter($this->env, $this->getAttribute($this->getContext($context, "section"), "type"))), "html", null, true); echo "</td>\n\t\t\t\t\t\t<td data-title=\""; // line 32 echo twig_escape_filter($this->env, \Craft\Craft::t("URL Format"), "html", null, true); echo "\" dir=\"ltr\">"; // line 33 if ($this->getAttribute($this->getContext($context, "section"), "isHomepage", array(), "method")) { // line 34 echo "<div data-icon=\"home\" title=\""; echo twig_escape_filter($this->env, \Craft\Craft::t("Homepage"), "html", null, true); echo "\"></div>"; } else { // line 36 echo twig_escape_filter($this->env, $this->getAttribute($this->getContext($context, "section"), "getUrlFormat", array(), "method"), "html", null, true); } // line 38 echo "</td>\n\t\t\t\t\t\t<td data-title=\""; // line 39 echo twig_escape_filter($this->env, \Craft\Craft::t("Entry Types"), "html", null, true); echo "\">\n\t\t\t\t\t\t\t"; // line 40 if ($this->getAttribute($this->getContext($context, "section"), "type") == "single" && twig_length_filter($this->env, $this->getAttribute($this->getContext($context, "section"), "getEntryTypes", array(), "method")) == 1) { // line 41 echo "\t\t\t\t\t\t\t\t"; $context["entryType"] = $this->getAttribute($this->getAttribute($this->getContext($context, "section"), "getEntryTypes", array(), "method"), 0, array(), "array"); // line 42 echo "\t\t\t\t\t\t\t\t<a href=\""; echo twig_escape_filter($this->env, $this->getAttribute($this->getContext($context, "entryType"), "getCpEditUrl", array(), "method"), "html", null, true); echo "\">"; echo twig_escape_filter($this->env, \Craft\Craft::t("Edit entry type"), "html", null, true); echo "</a>\n\t\t\t\t\t\t\t"; } else { // line 44 echo "\t\t\t\t\t\t\t\t<a href=\""; echo twig_escape_filter($this->env, \Craft\UrlHelper::getUrl("settings/sections/" . $this->getAttribute($this->getContext($context, "section"), "id") . "/entrytypes"), "html", null, true); echo "\">"; echo twig_escape_filter($this->env, \Craft\Craft::t("Edit entry types ({count})", array("count" => twig_length_filter($this->env, $this->getAttribute($this->getContext($context, "section"), "getEntryTypes", array(), "method")))), "html", null, true); echo "</a>\n\t\t\t\t\t\t\t\t<a class=\"menubtn\" title=\""; // line 45 echo twig_escape_filter($this->env, \Craft\Craft::t("Entry Types"), "html", null, true); echo "\"></a>\n\t\t\t\t\t\t\t\t<div class=\"menu\">\n\t\t\t\t\t\t\t\t\t<ul>\n\t\t\t\t\t\t\t\t\t\t"; // line 48 $context['_parent'] = (array) $context; $context['_seq'] = twig_ensure_traversable($this->getAttribute($this->getContext($context, "section"), "getEntryTypes", array(), "method")); foreach ($context['_seq'] as $context["_key"] => $context["entryType"]) { // line 49 echo "\t\t\t\t\t\t\t\t\t\t\t<li><a href=\""; echo twig_escape_filter($this->env, $this->getAttribute($this->getContext($context, "entryType"), "getCpEditUrl", array(), "method"), "html", null, true); echo "\">"; echo twig_escape_filter($this->env, $this->getAttribute($this->getContext($context, "entryType"), "name"), "html", null, true); echo "</a></li>\n\t\t\t\t\t\t\t\t\t\t"; } $_parent = $context['_parent']; unset($context['_seq'], $context['_iterated'], $context['_key'], $context['entryType'], $context['_parent'], $context['loop']); $context = array_intersect_key($context, $_parent) + $_parent; // line 51 echo "\t\t\t\t\t\t\t\t\t</ul>\n\t\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t\t"; } // line 54 echo "\t\t\t\t\t\t</td>\n\t\t\t\t\t\t<td class=\"thin\"><a class=\"delete icon\" title=\""; // line 55 echo twig_escape_filter($this->env, \Craft\Craft::t("Delete"), "html", null, true); echo "\" role=\"button\"></a></td>\n\t\t\t\t\t</tr>\n\t\t\t\t"; } $_parent = $context['_parent']; unset($context['_seq'], $context['_iterated'], $context['_key'], $context['section'], $context['_parent'], $context['loop']); $context = array_intersect_key($context, $_parent) + $_parent; // line 58 echo "\t\t\t</tbody>\n\t\t</table>\n\t"; } // line 61 echo "\n\t<div id=\"newsectioncontainer\" class=\"buttons"; // line 62 if ($this->getContext($context, "CraftEdition") == $this->getContext($context, "CraftPersonal") && twig_length_filter($this->env, $this->getContext($context, "sections")) >= $this->getContext($context, "maxSections")) { echo " hidden"; } echo "\">\n\t\t<a href=\""; // line 63 echo twig_escape_filter($this->env, \Craft\UrlHelper::getUrl("settings/sections/new"), "html", null, true); echo "\" class=\"btn submit add icon\">"; echo twig_escape_filter($this->env, \Craft\Craft::t("New Section"), "html", null, true); echo "</a>\n\t</div>\n"; $context["content"] = '' === ($tmp = ob_get_clean()) ? '' : new Twig_Markup($tmp, $this->env->getCharset()); // line 68 ob_start(); // line 69 echo "\tvar adminTable = new Craft.AdminTable({\n\t\ttableSelector: '#sections',\n\t\tnoObjectsSelector: '#nosections',\n\t\tnewObjectBtnSelector: '#newsectioncontainer',\n\t\tdeleteAction: 'sections/deleteSection',\n\t\tconfirmDeleteMessage: '"; // line 74 echo twig_escape_filter($this->env, \Craft\Craft::t("Are you sure you want to delete “{name}” and all its entries?"), "html", null, true); echo "',\n\t\t"; // line 75 if ($this->getContext($context, "CraftEdition") == $this->getContext($context, "CraftPersonal")) { echo "maxObjects: "; echo twig_escape_filter($this->env, $this->getContext($context, "maxSections"), "html", null, true); echo ","; } // line 76 echo "\t\tonDeleteObject: function()\n\t\t{\n\t\t\t// Hide the Entries tab if that was the last one\n\t\t\tif (adminTable.totalObjects == 0)\n\t\t\t{\n\t\t\t\t\$('#nav-entries').remove();\n\t\t\t}\n\t\t}\n\t});\n"; $context["js"] = '' === ($tmp = ob_get_clean()) ? '' : new Twig_Markup($tmp, $this->env->getCharset()); // line 86 \Craft\craft()->templates->includeJs($this->getContext($context, "js")); $this->parent->display($context, array_merge($this->blocks, $blocks)); }
protected function doDisplay(array $context, array $blocks = array()) { // line 2 $context["title"] = \Craft\Craft::t("Fields"); // line 4 $context["docsUrl"] = "http://buildwithcraft.com/docs/fields"; // line 6 \Craft\craft()->templates->includeJsResource("js/fields.js"); // line 8 \Craft\craft()->templates->includeTranslations("What do you want to name your group?", "Could not create the group:", "Could not create the group:", "Are you sure you want to delete this group and all its fields?", "Could not delete the group.", "Group renamed."); // line 17 $context["crumbs"] = array(0 => array("label" => \Craft\Craft::t("Settings"), "url" => \Craft\UrlHelper::getUrl("settings"))); // line 22 $context["groups"] = $this->getAttribute($this->getAttribute($this->getContext($context, "craft"), "fields"), "getAllGroups", array(0 => "id"), "method"); // line 24 if (array_key_exists("groupId", $context)) { // line 25 if (!$this->getAttribute($this->getContext($context, "groups", true), $this->getContext($context, "groupId"), array(), "array", true, true)) { // line 26 throw new \Craft\HttpException(404); } // line 29 $context["fields"] = $this->getAttribute($this->getAttribute($this->getContext($context, "groups"), $this->getContext($context, "groupId"), array(), "array"), "getFields", array(), "method"); } else { // line 31 $context["fields"] = $this->getAttribute($this->getAttribute($this->getContext($context, "craft"), "fields"), "getAllFields", array(), "method"); } // line 35 ob_start(); // line 36 echo "\n\t<nav>\n\t\t<ul id=\"groups\">\n\t\t\t<li><a href=\""; // line 39 echo twig_escape_filter($this->env, \Craft\UrlHelper::getUrl("settings/fields"), "html", null, true); echo "\""; if (!array_key_exists("groupId", $context)) { echo " class=\"sel\""; } echo ">"; echo twig_escape_filter($this->env, \Craft\Craft::t("All Fields"), "html", null, true); echo "</a></li>\n\t\t\t"; // line 40 $context['_parent'] = (array) $context; $context['_seq'] = twig_ensure_traversable($this->getContext($context, "groups")); foreach ($context['_seq'] as $context["_key"] => $context["group"]) { // line 41 echo "\t\t\t\t<li><a href=\""; echo twig_escape_filter($this->env, \Craft\UrlHelper::getUrl("settings/fields/" . $this->getAttribute($this->getContext($context, "group"), "id")), "html", null, true); echo "\""; if (array_key_exists("groupId", $context) && $this->getAttribute($this->getContext($context, "group"), "id") == $this->getContext($context, "groupId")) { echo " class=\"sel\""; } echo " data-id=\""; echo twig_escape_filter($this->env, $this->getAttribute($this->getContext($context, "group"), "id"), "html", null, true); echo "\">"; echo twig_escape_filter($this->env, $this->getAttribute($this->getContext($context, "group"), "name"), "html", null, true); echo "</a></li>\n\t\t\t"; } $_parent = $context['_parent']; unset($context['_seq'], $context['_iterated'], $context['_key'], $context['group'], $context['_parent'], $context['loop']); $context = array_intersect_key($context, $_parent) + $_parent; // line 43 echo "\t\t</ul>\n\t</nav>\n\n\t<div class=\"buttons\">\n\t\t<div id=\"newgroupbtn\" class=\"btn add icon\">"; // line 47 echo twig_escape_filter($this->env, \Craft\Craft::t("New Group"), "html", null, true); echo "</div>\n\n\t\t"; // line 49 if (array_key_exists("groupId", $context)) { // line 50 echo "\t\t\t<div id=\"groupsettingsbtn\" class=\"btn settings icon menubtn\" title=\""; echo "Settings"; echo "\"></div>\n\t\t\t<div class=\"menu\">\n\t\t\t\t<ul>\n\t\t\t\t\t<li><a data-action=\"rename\" role=\"button\">"; // line 53 echo twig_escape_filter($this->env, \Craft\Craft::t("Rename selected group"), "html", null, true); echo "</a></li>\n\t\t\t\t\t<li><a data-action=\"delete\" role=\"button\">"; // line 54 echo twig_escape_filter($this->env, \Craft\Craft::t("Delete selected group"), "html", null, true); echo "</a></li>\n\t\t\t\t</ul>\n\t\t\t</div>\n\t\t"; } // line 58 echo "\t</div>\n"; $context["sidebar"] = '' === ($tmp = ob_get_clean()) ? '' : new Twig_Markup($tmp, $this->env->getCharset()); // line 62 ob_start(); // line 63 echo "\n\t<p id=\"nofields\""; // line 64 if ($this->getContext($context, "fields")) { echo " class=\"hidden\""; } echo ">\n\t\t"; // line 65 if (array_key_exists("groupId", $context)) { // line 66 echo "\t\t\t"; echo twig_escape_filter($this->env, \Craft\Craft::t("This group doesn’t have any fields yet."), "html", null, true); echo "\n\t\t"; } else { // line 68 echo "\t\t\t"; echo twig_escape_filter($this->env, \Craft\Craft::t("No fields exist yet."), "html", null, true); echo "\n\t\t"; } // line 70 echo "\t</p>\n\n\t"; // line 72 if ($this->getContext($context, "fields")) { // line 73 echo "\t\t<table id=\"fields\" class=\"data fullwidth collapsible\">\n\t\t\t<thead>\n\t\t\t\t<th scope=\"col\">"; // line 75 echo twig_escape_filter($this->env, \Craft\Craft::t("Name"), "html", null, true); echo "</th>\n\t\t\t\t<th scope=\"col\">"; // line 76 echo twig_escape_filter($this->env, \Craft\Craft::t("Handle"), "html", null, true); echo "</th>\n\t\t\t\t<th scope=\"col\">"; // line 77 echo twig_escape_filter($this->env, \Craft\Craft::t("Type"), "html", null, true); echo "</th>\n\t\t\t\t"; // line 78 if (!array_key_exists("groupId", $context)) { echo "<th scope=\"col\">"; echo twig_escape_filter($this->env, \Craft\Craft::t("Group"), "html", null, true); echo "</th>"; } // line 79 echo "\t\t\t\t<td class=\"thin\"></td>\n\t\t\t</thead>\n\t\t\t<tbody>\n\t\t\t\t"; // line 82 $context['_parent'] = (array) $context; $context['_seq'] = twig_ensure_traversable($this->getContext($context, "fields")); foreach ($context['_seq'] as $context["_key"] => $context["field"]) { // line 83 echo "\t\t\t\t\t<tr data-id=\""; echo twig_escape_filter($this->env, $this->getAttribute($this->getContext($context, "field"), "id"), "html", null, true); echo "\" data-name=\""; echo twig_escape_filter($this->env, \Craft\Craft::t($this->getAttribute($this->getContext($context, "field"), "name")), "html", null, true); echo "\">\n\t\t\t\t\t\t<th scope=\"row\" data-title=\""; // line 84 echo twig_escape_filter($this->env, \Craft\Craft::t("Name"), "html", null, true); echo "\"><a href=\""; echo twig_escape_filter($this->env, \Craft\UrlHelper::getUrl("settings/fields/edit/" . $this->getAttribute($this->getContext($context, "field"), "id")), "html", null, true); echo "\">"; echo twig_escape_filter($this->env, \Craft\Craft::t($this->getAttribute($this->getContext($context, "field"), "name")), "html", null, true); echo "</a>"; // line 85 if ($this->getAttribute($this->getContext($context, "field"), "required")) { echo " <span class=\"required\"></span>"; } // line 86 echo "</th>\n\t\t\t\t\t\t<td data-title=\""; // line 87 echo twig_escape_filter($this->env, \Craft\Craft::t("Handle"), "html", null, true); echo "\"><code>"; echo twig_escape_filter($this->env, $this->getAttribute($this->getContext($context, "field"), "handle"), "html", null, true); echo "</code></td>\n\t\t\t\t\t\t<td data-title=\""; // line 88 echo twig_escape_filter($this->env, \Craft\Craft::t("Type"), "html", null, true); echo "\">\n\t\t\t\t\t\t\t"; // line 89 $context["fieldType"] = $this->getAttribute($this->getContext($context, "field"), "getFieldType", array(), "method"); // line 90 echo "\t\t\t\t\t\t\t"; if ($this->getContext($context, "fieldType")) { // line 91 echo "\t\t\t\t\t\t\t\t"; echo twig_escape_filter($this->env, $this->getAttribute($this->getContext($context, "fieldType"), "name"), "html", null, true); echo "\n\t\t\t\t\t\t\t"; } else { // line 93 echo "\t\t\t\t\t\t\t\t<span class=\"error\">"; echo twig_escape_filter($this->env, $this->getAttribute($this->getContext($context, "field"), "type"), "html", null, true); echo "</span>\n\t\t\t\t\t\t\t"; } // line 95 echo "\t\t\t\t\t\t</td>\n\t\t\t\t\t\t"; // line 96 if (!array_key_exists("groupId", $context)) { echo "<td data-title=\""; echo twig_escape_filter($this->env, \Craft\Craft::t("Group"), "html", null, true); echo "\">"; echo twig_escape_filter($this->env, $this->getAttribute($this->getAttribute($this->getContext($context, "field"), "group"), "name"), "html", null, true); echo "</td>"; } // line 97 echo "\t\t\t\t\t\t<td class=\"thin\"><a class=\"delete icon\" title=\""; echo twig_escape_filter($this->env, \Craft\Craft::t("Delete"), "html", null, true); echo "\" role=\"button\"></a></td>\n\t\t\t\t\t</tr>\n\t\t\t\t"; } $_parent = $context['_parent']; unset($context['_seq'], $context['_iterated'], $context['_key'], $context['field'], $context['_parent'], $context['loop']); $context = array_intersect_key($context, $_parent) + $_parent; // line 100 echo "\t\t\t</tbody>\n\t\t</table>\n\t"; } // line 103 echo "\n\t"; // line 104 if ($this->getContext($context, "groups")) { // line 105 echo "\t\t<div class=\"buttons\">\n\t\t\t"; // line 106 $context["newFieldUrl"] = \Craft\UrlHelper::getUrl("settings/fields/new", array_key_exists("groupId", $context) ? array("groupId" => $this->getContext($context, "groupId")) : null); // line 107 echo "\t\t\t<a href=\""; echo twig_escape_filter($this->env, $this->getContext($context, "newFieldUrl"), "html", null, true); echo "\" class=\"submit btn add icon\">"; echo twig_escape_filter($this->env, \Craft\Craft::t("New Field"), "html", null, true); echo "</a>\n\t\t</div>\n\t"; } // line 110 echo "\n"; $context["content"] = '' === ($tmp = ob_get_clean()) ? '' : new Twig_Markup($tmp, $this->env->getCharset()); // line 114 $context["js"] = '' === ($tmp = "\tnew Craft.AdminTable({\n\t\ttableSelector: '#fields',\n\t\tnoObjectsSelector: '#nofields',\n\t\tdeleteAction: 'fields/deleteField'\n\t});\n") ? '' : new Twig_Markup($tmp, $this->env->getCharset()); // line 121 \Craft\craft()->templates->includeJs($this->getContext($context, "js")); $this->parent->display($context, array_merge($this->blocks, $blocks)); }
public function actionEditMeta(array $variables = array()) { if (isset($variables['locale'])) { $locale = $variables['locale']; } else { $locale = craft()->language; } $siteMeta = craft()->seomatic->getSiteMeta($locale); $titleLength = craft()->config->get("maxTitleLength", "seomatic"); if ($siteMeta['siteSeoTitlePlacement'] == "none") { $variables['titleLength'] = $titleLength; } else { $variables['titleLength'] = $titleLength - strlen(" | ") - strlen($siteMeta['siteSeoName']); } if (empty($variables['meta'])) { if (!empty($variables['metaId'])) { $variables['meta'] = craft()->seomatic->getMetaById($variables['metaId'], $locale); /* -- If we have a metaId but nothing is returned for that locale, make a new element/record using that elementId */ if (!$variables['meta']) { /* $variables['meta'] = new Seomatic_MetaModel(); $variables['meta']['locale'] = $locale; $variables['meta']['elementId'] = $variables['metaId']; */ throw new HttpException(404); } } else { $variables['meta'] = new Seomatic_MetaModel(); $variables['meta']['locale'] = $locale; } } // Whether any assets sources exist $sources = craft()->assets->findFolders(); $variables['assetsSourceExists'] = count($sources); $variables['transformsList'] = craft()->seomatic->getTransformsList(); // URL to create a new assets source $variables['newAssetsSourceUrl'] = UrlHelper::getUrl('settings/assets/sources/new'); // Set asset ID $variables['seoImageId'] = $variables['meta']->seoImageId; // Set asset elements if ($variables['seoImageId']) { if (is_array($variables['seoImageId'])) { $variables['seoImageId'] = $variables['seoImageId'][0]; } $asset = craft()->elements->getElementById($variables['seoImageId']); $variables['elements'] = array($asset); } else { $variables['elements'] = array(); } // Set asset ID $variables['seoTwitterImageId'] = $variables['meta']->seoTwitterImageId; // Set asset elements if ($variables['seoTwitterImageId']) { if (is_array($variables['seoTwitterImageId'])) { $variables['seoTwitterImageId'] = $variables['seoTwitterImageId'][0]; } $asset = craft()->elements->getElementById($variables['seoTwitterImageId']); $variables['elementsTwitter'] = array($asset); } else { $variables['elementsTwitter'] = array(); } // Set asset ID $variables['seoFacebookImageId'] = $variables['meta']->seoFacebookImageId; // Set asset elements if ($variables['seoFacebookImageId']) { if (is_array($variables['seoFacebookImageId'])) { $variables['seoFacebookImageId'] = $variables['seoFacebookImageId'][0]; } $asset = craft()->elements->getElementById($variables['seoFacebookImageId']); $variables['elementsFacebook'] = array($asset); } else { $variables['elementsFacebook'] = array(); } // Set element type $variables['elementType'] = craft()->elements->getElementType(ElementType::Asset); // Tabs $variables['tabs'] = array(); if (!$variables['meta']->id) { $variables['title'] = Craft::t('Untitled Meta'); } else { $variables['title'] = $variables['meta']->title; } // Breadcrumbs $variables['crumbs'] = array(array('label' => Craft::t('SEO Template Meta'), 'url' => UrlHelper::getUrl('seomatic/meta'))); // Set the "Continue Editing" URL $variables['continueEditingUrl'] = 'seomatic/meta/{id}/{locale}'; // Render the template! $this->renderTemplate('seomatic/meta/_edit', $variables); }
protected function doDisplay(array $context, array $blocks = array()) { // line 1 if (\Craft\craft()->getEdition() < $this->getContext($context, "CraftClient")) { throw new \Craft\HttpException(404); } // line 2 echo "\n"; // line 3 $context["drafts"] = $this->getAttribute($this->getAttribute($this->getContext($context, "craft"), "entryRevisions"), "getEditableDraftsByEntryId", array(0 => $this->getAttribute($this->getContext($context, "entry"), "id"), 1 => $this->getAttribute($this->getContext($context, "entry"), "locale")), "method"); // line 4 $context["versions"] = $this->getAttribute($this->getAttribute($this->getContext($context, "craft"), "entryRevisions"), "getVersionsByEntryId", array(0 => $this->getAttribute($this->getContext($context, "entry"), "id"), 1 => $this->getAttribute($this->getContext($context, "entry"), "locale")), "method"); // line 5 $context["baseUrl"] = "entries/" . $this->getAttribute($this->getAttribute($this->getContext($context, "entry"), "getSection", array(), "method"), "handle") . "/" . $this->getAttribute($this->getContext($context, "entry"), "id") . "/"; // line 6 echo "\n<div class=\"btn menubtn\">"; // line 7 echo twig_escape_filter($this->env, $this->getContext($context, "revisionLabel"), "html", null, true); echo "</div>\n\n<div class=\"menu padded\">\n\t<ul>\n\t\t<li><a"; // line 11 if ($this->getAttribute($this->getContext($context, "entry"), "classHandle") == "Entry") { echo " class=\"sel\""; } echo " href=\""; echo twig_escape_filter($this->env, $this->getAttribute($this->getContext($context, "entry"), "cpEditUrl"), "html", null, true); echo "\">"; echo twig_escape_filter($this->env, \Craft\Craft::t("Current"), "html", null, true); echo "</a></li>\n\t</ul>\n\n\t"; // line 14 if ($this->getContext($context, "drafts")) { // line 15 echo "\t\t<hr>\n\t\t<ul>\n\t\t\t"; // line 17 $context['_parent'] = (array) $context; $context['_seq'] = twig_ensure_traversable($this->getContext($context, "drafts")); foreach ($context['_seq'] as $context["_key"] => $context["draft"]) { // line 18 echo "\t\t\t\t<li><a"; if ($this->getAttribute($this->getContext($context, "entry"), "classHandle") == "EntryDraft" && $this->getAttribute($this->getContext($context, "draft"), "draftId") == $this->getContext($context, "draftId")) { echo " class=\"sel\""; } echo " href=\""; echo twig_escape_filter($this->env, \Craft\UrlHelper::getUrl($this->getContext($context, "baseUrl") . "drafts/" . $this->getAttribute($this->getContext($context, "draft"), "draftId")), "html", null, true); echo "\">\n\t\t\t\t\t"; // line 19 echo twig_escape_filter($this->env, \Craft\Craft::t("Draft {id}", array("id" => $this->getAttribute($this->getContext($context, "draft"), "draftId"))), "html", null, true); echo "\n\t\t\t\t\t<span class=\"light\">"; // line 20 echo twig_escape_filter($this->env, $this->getAttribute($this->getContext($context, "draft"), "creator"), "html", null, true); echo "</span>\n\t\t\t\t</a></li>\n\t\t\t"; } $_parent = $context['_parent']; unset($context['_seq'], $context['_iterated'], $context['_key'], $context['draft'], $context['_parent'], $context['loop']); $context = array_intersect_key($context, $_parent) + $_parent; // line 23 echo "\t\t</ul>\n\t"; } // line 25 echo "\n\t"; // line 26 if ($this->getContext($context, "versions")) { // line 27 echo "\t\t<hr>\n\t\t<ul>\n\t\t\t"; // line 29 $context['_parent'] = (array) $context; $context['_seq'] = twig_ensure_traversable($this->getContext($context, "versions")); foreach ($context['_seq'] as $context["_key"] => $context["version"]) { // line 30 echo "\t\t\t\t<li><a"; if ($this->getAttribute($this->getContext($context, "entry"), "classHandle") == "EntryVersion" && $this->getAttribute($this->getContext($context, "version"), "versionId") == $this->getContext($context, "versionId")) { echo " class=\"sel\""; } echo " href=\""; echo twig_escape_filter($this->env, \Craft\UrlHelper::getUrl($this->getContext($context, "baseUrl") . "versions/" . $this->getAttribute($this->getContext($context, "version"), "versionId")), "html", null, true); echo "\">\n\t\t\t\t\t"; // line 31 echo twig_escape_filter($this->env, \Craft\Craft::t("Version {id}", array("id" => $this->getAttribute($this->getContext($context, "version"), "versionId"))), "html", null, true); echo "\n\t\t\t\t\t<span class=\"light\">"; // line 32 echo twig_escape_filter($this->env, $this->getAttribute($this->getContext($context, "version"), "creator"), "html", null, true); echo "</span>\n\t\t\t\t</a></li>\n\t\t\t"; } $_parent = $context['_parent']; unset($context['_seq'], $context['_iterated'], $context['_key'], $context['version'], $context['_parent'], $context['loop']); $context = array_intersect_key($context, $_parent) + $_parent; // line 35 echo "\t\t</ul>\n\t"; } // line 37 echo "</div>\n"; }
public function block_main($context, array $blocks = array()) { // line 14 echo "\t<form id=\"entry-form\" method=\"post\" accept-charset=\"UTF-8\" data-saveshortcut=\"1\" data-saveshortcut-redirect=\""; echo twig_escape_filter($this->env, $this->getContext($context, "continueEditingUrl"), "html", null, true); echo "\">\n\t\t<input type=\"hidden\" name=\"sectionId\" value=\""; // line 15 echo twig_escape_filter($this->env, $this->getAttribute($this->getContext($context, "section"), "id"), "html", null, true); echo "\">\n\t\t"; // line 16 if ($this->getAttribute($this->getContext($context, "entry"), "id")) { echo "<input type=\"hidden\" name=\"entryId\" value=\""; echo twig_escape_filter($this->env, $this->getAttribute($this->getContext($context, "entry"), "id"), "html", null, true); echo "\">"; } // line 17 echo "\t\t"; if ($this->getAttribute($this->getContext($context, "craft"), "isLocalized", array(), "method")) { echo "<input type=\"hidden\" name=\"locale\" value=\""; echo twig_escape_filter($this->env, $this->getAttribute($this->getContext($context, "entry"), "locale"), "html", null, true); echo "\">"; } // line 18 echo "\n\t\t<div class=\"grid first\">\n\t\t\t<div class=\"item\" data-position=\"left\" data-min-colspan=\"2\" data-max-colspan=\"3\">\n\t\t\t\t<div id=\"fields\" class=\"pane\">\n\t\t\t\t\t"; // line 22 $this->env->loadTemplate("_includes/tabs")->display($context); // line 23 echo "\t\t\t\t\t"; $this->env->loadTemplate("entries/_fields")->display($context); // line 24 echo "\t\t\t\t</div>\n\t\t\t</div><!--/item-->\n\n\t\t\t<div class=\"item\" data-position=\"right\" data-colspan=\"1\">\n\n\t\t\t\t"; // line 29 if ($this->getContext($context, "showPreviewBtn")) { // line 30 echo "\t\t\t\t\t<div id=\"livepreview-btn\" class=\"btn big\" data-icon=\"view\">\n\t\t\t\t\t\t"; // line 31 echo twig_escape_filter($this->env, \Craft\Craft::t("Live Preview"), "html", null, true); echo "\n\t\t\t\t\t\t<div id=\"livepreview-spinner\" class=\"spinner hidden\"></div>\n\t\t\t\t\t</div>\n\t\t\t\t"; } // line 35 echo "\n\t\t\t\t"; // line 36 if ($this->getAttribute($this->getContext($context, "craft"), "isLocalized", array(), "method") && twig_length_filter($this->env, $this->getAttribute($this->getContext($context, "section"), "getLocales", array(), "method")) > 1) { // line 37 echo "\t\t\t\t\t<ul id=\"locales\" class=\"pane\">\n\t\t\t\t\t\t"; // line 38 $context['_parent'] = (array) $context; $context['_seq'] = twig_ensure_traversable($this->getContext($context, "localeIds")); foreach ($context['_seq'] as $context["_key"] => $context["localeId"]) { // line 39 echo "\t\t\t\t\t\t\t"; $context["localeName"] = $this->getAttribute($this->getAttribute($this->getAttribute($this->getContext($context, "craft"), "i18n"), "getLocaleById", array(0 => $this->getContext($context, "localeId")), "method"), "name"); // line 40 echo "\t\t\t\t\t\t\t<li"; if ($this->getContext($context, "localeId") == $this->getAttribute($this->getContext($context, "entry"), "locale")) { echo " class=\"sel\""; } echo ">"; // line 41 if ($this->getContext($context, "localeId") == $this->getAttribute($this->getContext($context, "entry"), "locale")) { // line 42 echo twig_escape_filter($this->env, $this->getContext($context, "localeName"), "html", null, true); echo "\n\t\t\t\t\t\t\t\t\t"; // line 43 echo $context["forms"]->getlightswitch(array("name" => "localeEnabled", "on" => $this->getAttribute($this->getContext($context, "entry"), "localeEnabled"))); } else { // line 48 echo "<a href=\""; echo twig_escape_filter($this->env, \Craft\UrlHelper::getUrl("entries/" . $this->getContext($context, "sectionHandle") . "/" . $this->getAttribute($this->getAttribute($this->getContext($context, "craft"), "request"), "getSegment", array(0 => 3), "method")) . "/" . $this->getContext($context, "localeId"), "html", null, true); echo "\">"; echo twig_escape_filter($this->env, $this->getContext($context, "localeName"), "html", null, true); echo "</a>\n\t\t\t\t\t\t\t\t\t<div class=\"status "; // line 49 echo twig_in_filter($this->getContext($context, "localeId"), $this->getContext($context, "enabledLocales")) ? "enabled" : "disabled"; echo "\"></div>"; } // line 51 echo "</li>\n\t\t\t\t\t\t"; } $_parent = $context['_parent']; unset($context['_seq'], $context['_iterated'], $context['_key'], $context['localeId'], $context['_parent'], $context['loop']); $context = array_intersect_key($context, $_parent) + $_parent; // line 53 echo "\t\t\t\t\t</ul>\n\t\t\t\t"; } // line 55 echo "\n\t\t\t\t"; // line 56 if ($this->getAttribute($this->getContext($context, "section"), "type") != "single") { // line 57 echo "\t\t\t\t\t<div id=\"settings\" class=\"pane\">\n\n\t\t\t\t\t\t"; // line 59 if ($this->getContext($context, "showEntryTypes")) { // line 60 echo "\t\t\t\t\t\t\t"; echo $context["forms"]->getselectField(array("label" => \Craft\Craft::t("Entry Type"), "id" => "entryType", "name" => "typeId", "value" => $this->getAttribute($this->getContext($context, "entryType"), "id"), "options" => $this->getContext($context, "entryTypeOptions"))); // line 66 echo "\n\t\t\t\t\t\t"; } // line 68 echo "\n\t\t\t\t\t\t"; // line 69 echo $context["forms"]->gettextField(array("label" => \Craft\Craft::t("Slug"), "id" => "slug", "name" => "slug", "value" => $this->getAttribute($this->getContext($context, "entry"), "slug"), "errors" => twig_array_merge($this->getAttribute($this->getContext($context, "entry"), "getErrors", array(0 => "slug"), "method"), $this->getAttribute($this->getContext($context, "entry"), "getErrors", array(0 => "uri"), "method")), "required" => true)); // line 76 echo "\n\n\t\t\t\t\t\t"; // line 78 if ($this->getAttribute($this->getContext($context, "section"), "type") == "structure" && twig_length_filter($this->env, $this->getContext($context, "parentOptions")) > 1) { // line 79 echo "\t\t\t\t\t\t\t"; echo $context["forms"]->getselectField(array("label" => \Craft\Craft::t("Parent Entry"), "id" => "parentId", "name" => "parentId", "options" => $this->getContext($context, "parentOptions"), "value" => $this->getContext($context, "parentId"))); // line 85 echo "\n\t\t\t\t\t\t"; } // line 87 echo "\n\t\t\t\t\t\t"; // line 88 if ($this->getContext($context, "CraftEdition") >= $this->getContext($context, "CraftClient")) { // line 89 echo "\t\t\t\t\t\t\t"; echo $context["forms"]->getselectField(array("label" => \Craft\Craft::t("Author"), "id" => "author", "name" => "author", "options" => $this->getContext($context, "authorOptions"), "value" => $this->getAttribute($this->getContext($context, "entry"), "authorId"))); // line 95 echo "\n\t\t\t\t\t\t"; } // line 97 echo "\n\t\t\t\t\t\t"; // line 98 echo $context["forms"]->getdateTimeField(array("label" => \Craft\Craft::t("Post Date"), "id" => "postDate", "name" => "postDate", "value" => $this->getAttribute($this->getContext($context, "entry"), "postDate") ? $this->getAttribute($this->getContext($context, "entry"), "postDate") : null, "errors" => $this->getAttribute($this->getContext($context, "entry"), "getErrors", array(0 => "postDate"), "method"))); // line 104 echo "\n\n\t\t\t\t\t\t"; // line 106 echo $context["forms"]->getdateTimeField(array("label" => \Craft\Craft::t("Expiration Date"), "id" => "expiryDate", "name" => "expiryDate", "value" => $this->getAttribute($this->getContext($context, "entry"), "expiryDate") ? $this->getAttribute($this->getContext($context, "entry"), "expiryDate") : null, "errors" => $this->getAttribute($this->getContext($context, "entry"), "getErrors", array(0 => "expiryDate"), "method"))); // line 112 echo "\n\n\t\t\t\t\t\t"; // line 114 if ($this->getAttribute($this->getContext($context, "currentUser"), "can", array(0 => "publishEntries" . $this->getContext($context, "permissionSuffix")), "method")) { // line 115 echo "\t\t\t\t\t\t\t"; echo $context["forms"]->getlightswitchField(array("label" => \Craft\Craft::t("Status"), "name" => "enabled", "on" => $this->getAttribute($this->getContext($context, "entry"), "enabled"))); // line 119 echo "\n\t\t\t\t\t\t"; } // line 121 echo "\t\t\t\t\t</div><!--/pane-->\n\n\t\t\t\t\t"; // line 123 if ($this->getContext($context, "canDeleteEntry")) { // line 124 echo "\t\t\t\t\t\t<div class=\"pane\">\n\t\t\t\t\t\t\t<input type=\"button\" class=\"btn small formsubmit\" value=\""; // line 125 echo twig_escape_filter($this->env, \Craft\Craft::t("Delete"), "html", null, true); echo "\" data-action=\"entries/deleteEntry\"\n\t\t\t\t\t\t\t\tdata-confirm=\""; // line 126 echo twig_escape_filter($this->env, \Craft\Craft::t("Are you sure you want to delete this entry?"), "html", null, true); echo "\"\n\t\t\t\t\t\t\t\tdata-redirect=\"entries\">\n\t\t\t\t\t\t</div>\n\t\t\t\t\t"; } // line 130 echo "\t\t\t\t"; } // line 131 echo "\t\t\t</div><!--/item-->\n\n\t\t\t"; // line 133 if ($this->getAttribute($this->getContext($context, "entry"), "classHandle") != "EntryVersion") { // line 134 echo "\t\t\t\t<div class=\"item\" data-position=\"left\" data-colspan=\"1\">\n\t\t\t\t\t<div class=\"buttons\">\n\t\t\t\t\t\t"; // line 136 if ($this->getAttribute($this->getContext($context, "entry"), "id") && $this->getAttribute($this->getContext($context, "entry"), "classHandle") == "EntryDraft") { // line 137 echo "\n\t\t\t\t\t\t\t<input type=\"hidden\" name=\"action\" value=\"entryRevisions/saveDraft\">\n\t\t\t\t\t\t\t<input type=\"hidden\" name=\"redirect\" value=\""; // line 139 echo twig_escape_filter($this->env, $this->getAttribute($this->getContext($context, "entry"), "cpEditUrl"), "html", null, true); echo "/drafts/"; echo twig_escape_filter($this->env, $this->getAttribute($this->getContext($context, "entry"), "draftId"), "html", null, true); echo "\">\n\t\t\t\t\t\t\t<input type=\"hidden\" name=\"draftId\" value=\""; // line 140 echo twig_escape_filter($this->env, $this->getAttribute($this->getContext($context, "entry"), "draftId"), "html", null, true); echo "\">\n\t\t\t\t\t\t\t<input type=\"submit\" class=\"btn submit first\" value=\""; // line 141 echo twig_escape_filter($this->env, \Craft\Craft::t("Save draft"), "html", null, true); echo "\">\n\n\t\t\t\t\t\t\t"; // line 143 if ($this->getAttribute($this->getContext($context, "currentUser"), "can", array(0 => "publishEntries" . $this->getContext($context, "permissionSuffix")), "method") && ($this->getAttribute($this->getContext($context, "entry"), "creatorId") == $this->getAttribute($this->getContext($context, "currentUser"), "id") || $this->getAttribute($this->getContext($context, "currentUser"), "can", array(0 => "publishPeerEntryDrafts" . $this->getContext($context, "permissionSuffix")), "method"))) { // line 144 echo "\t\t\t\t\t\t\t\t<input type=\"button\" class=\"btn formsubmit\" value=\""; echo twig_escape_filter($this->env, \Craft\Craft::t("Publish draft"), "html", null, true); echo "\" data-action=\"entryRevisions/publishDraft\" data-redirect=\""; echo twig_escape_filter($this->env, $this->getAttribute($this->getContext($context, "entry"), "cpEditUrl"), "html", null, true); echo "\">\n\t\t\t\t\t\t\t"; } // line 146 echo "\n\t\t\t\t\t\t\t"; // line 147 if ($this->getAttribute($this->getContext($context, "currentUser"), "can", array(0 => "publishEntries" . $this->getContext($context, "permissionSuffix")), "method") && ($this->getAttribute($this->getContext($context, "entry"), "creatorId") == $this->getAttribute($this->getContext($context, "currentUser"), "id") || $this->getAttribute($this->getContext($context, "currentUser"), "can", array(0 => "deletePeerEntryDrafts" . $this->getContext($context, "permissionSuffix")), "method"))) { // line 148 echo "\t\t\t\t\t\t\t\t<input type=\"button\" class=\"btn formsubmit\" value=\""; echo twig_escape_filter($this->env, \Craft\Craft::t("Delete draft"), "html", null, true); echo "\" data-action=\"entryRevisions/deleteDraft\"\n\t\t\t\t\t\t\t\t data-confirm=\""; // line 149 echo twig_escape_filter($this->env, \Craft\Craft::t("Are you sure you want to delete this draft?"), "html", null, true); echo "\"\n\t\t\t\t\t\t\t\t data-redirect=\""; // line 150 echo twig_escape_filter($this->env, $this->getAttribute($this->getContext($context, "entry"), "cpEditUrl"), "html", null, true); echo "\"/>\n\t\t\t\t\t\t\t"; } // line 152 echo "\n\t\t\t\t\t\t"; } else { // line 154 echo "\n\t\t\t\t\t\t\t"; // line 155 if (!$this->getAttribute($this->getContext($context, "entry"), "id") || !$this->getAttribute($this->getContext($context, "entry"), "enabled") || $this->getAttribute($this->getContext($context, "currentUser"), "can", array(0 => "publishEntries" . $this->getContext($context, "permissionSuffix")), "method")) { // line 156 echo "\t\t\t\t\t\t\t\t<input type=\"hidden\" name=\"action\" value=\"entries/saveEntry\">\n\t\t\t\t\t\t\t\t<input type=\"hidden\" name=\"redirect\" value=\"entries/"; // line 157 echo twig_escape_filter($this->env, $this->getContext($context, "sectionHandle"), "html", null, true); echo "\">\n\n\t\t\t\t\t\t\t\t<div class=\"btngroup submit first\">\n\t\t\t\t\t\t\t\t\t<input type=\"submit\" class=\"btn submit\" value=\""; // line 160 echo twig_escape_filter($this->env, \Craft\Craft::t("Save"), "html", null, true); echo "\">\n\n\t\t\t\t\t\t\t\t\t<div class=\"btn submit menubtn\"></div>\n\t\t\t\t\t\t\t\t\t<div class=\"menu\">\n\t\t\t\t\t\t\t\t\t\t<ul>\n\t\t\t\t\t\t\t\t\t\t\t<li><a class=\"formsubmit\" data-redirect=\""; // line 165 echo twig_escape_filter($this->env, $this->getContext($context, "continueEditingUrl"), "html", null, true); echo "\">"; echo twig_escape_filter($this->env, \Craft\Craft::t("Save and continue editing"), "html", null, true); echo "</a></li>\n\n\t\t\t\t\t\t\t\t\t\t\t"; // line 167 $context["nextEntryParams"] = array(); // line 168 echo "\t\t\t\t\t\t\t\t\t\t\t"; if ($this->getContext($context, "showEntryTypes")) { // line 169 echo "\t\t\t\t\t\t\t\t\t\t\t\t"; $context["nextEntryParams"] = twig_array_merge($this->getContext($context, "nextEntryParams"), array(0 => "typeId={type.id}")); // line 170 echo "\t\t\t\t\t\t\t\t\t\t\t"; } // line 171 echo "\t\t\t\t\t\t\t\t\t\t\t"; if ($this->getAttribute($this->getContext($context, "section"), "type") == "structure" && twig_length_filter($this->env, $this->getContext($context, "parentOptions")) > 1) { // line 172 echo "\t\t\t\t\t\t\t\t\t\t\t\t"; $context["nextEntryParams"] = twig_array_merge($this->getContext($context, "nextEntryParams"), array(0 => "parentId={parent.id}")); // line 173 echo "\t\t\t\t\t\t\t\t\t\t\t"; } // line 174 echo "\n\t\t\t\t\t\t\t\t\t\t\t"; // line 175 if ($this->getAttribute($this->getContext($context, "section"), "type") != "single") { // line 176 echo "\t\t\t\t\t\t\t\t\t\t\t\t<li><a class=\"formsubmit\" data-redirect=\"entries/"; echo twig_escape_filter($this->env, $this->getContext($context, "sectionHandle"), "html", null, true); echo "/new"; if ($this->getContext($context, "nextEntryParams")) { echo "?"; echo twig_escape_filter($this->env, twig_join_filter($this->getContext($context, "nextEntryParams"), "&"), "html", null, true); } echo "\">"; echo twig_escape_filter($this->env, \Craft\Craft::t("Save and add another"), "html", null, true); echo "</a></li>\n\t\t\t\t\t\t\t\t\t\t\t"; } // line 178 echo "\t\t\t\t\t\t\t\t\t\t</ul>\n\t\t\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t\t\t</div>\n\n\t\t\t\t\t\t\t\t"; // line 182 if ($this->getAttribute($this->getContext($context, "entry"), "id") && $this->getContext($context, "CraftEdition") >= $this->getContext($context, "CraftClient")) { // line 183 echo "\t\t\t\t\t\t\t\t\t<input type=\"button\" class=\"btn formsubmit\" value=\""; echo twig_escape_filter($this->env, \Craft\Craft::t("Save as a draft"), "html", null, true); echo "\" data-action=\"entryRevisions/saveDraft\" data-redirect=\""; echo twig_escape_filter($this->env, $this->getAttribute($this->getContext($context, "entry"), "cpEditUrl"), "html", null, true); echo "/drafts/{draftId}\">\n\t\t\t\t\t\t\t\t"; } // line 185 echo "\t\t\t\t\t\t\t"; } else { // line 186 echo "\t\t\t\t\t\t\t\t"; if ($this->getContext($context, "CraftEdition") >= $this->getContext($context, "CraftClient")) { // line 187 echo "\t\t\t\t\t\t\t\t\t<input type=\"hidden\" name=\"action\" value=\"entryRevisions/saveDraft\">\n\t\t\t\t\t\t\t\t\t<input type=\"hidden\" name=\"redirect\" value=\""; // line 188 echo twig_escape_filter($this->env, $this->getAttribute($this->getContext($context, "entry"), "cpEditUrl"), "html", null, true); echo "/drafts/{draftId}\">\n\t\t\t\t\t\t\t\t\t<input type=\"submit\" class=\"btn submit first\" value=\""; // line 189 echo twig_escape_filter($this->env, \Craft\Craft::t("Save as a draft"), "html", null, true); echo "\">\n\t\t\t\t\t\t\t\t"; } // line 191 echo "\t\t\t\t\t\t\t"; } // line 192 echo "\t\t\t\t\t\t"; } // line 193 echo "\t\t\t\t\t</div>\n\t\t\t\t</div><!--/item-->\n\t\t\t"; } // line 196 echo "\t\t</div><!--/grid-->\n\t</form>\n"; }
/** * Get the url for the given page. * * @param int $page * * @return string */ public function getUrl($page) { return UrlHelper::getUrl(craft()->request->getPath(), [$this->pageParam => $page]); }
/** * Get the url for the given page. * * @param int $page * * @return string */ public function getUrl($page) { $params = craft()->request->getQuery(); // This one belongs to Craft. unset($params['p']); $params[$this->pageParam] = $page; return UrlHelper::getUrl(craft()->request->getPath(), $params); }
protected function doDisplay(array $context, array $blocks = array()) { // line 3 $context["docsUrl"] = "http://buildwithcraft.com/docs/fields#field-layouts"; // line 5 $context["forms"] = $this->env->loadTemplate("_includes/forms"); // line 7 if (!array_key_exists("field", $context) && array_key_exists("fieldId", $context)) { // line 8 $context["field"] = $this->getAttribute($this->getAttribute($this->getContext($context, "craft"), "fields"), "getFieldById", array(0 => $this->getContext($context, "fieldId")), "method"); // line 9 if (!$this->getContext($context, "field")) { // line 10 throw new \Craft\HttpException(404); } } // line 15 $context["groups"] = $this->getAttribute($this->getAttribute($this->getContext($context, "craft"), "fields"), "getAllGroups", array(0 => "id"), "method"); // line 16 if (!$this->getContext($context, "groups")) { // line 17 throw new \Craft\HttpException(404); } // line 20 $context["groupId"] = $this->getAttribute($this->getAttribute($this->getContext($context, "craft"), "request"), "getQuery", array(0 => "groupId"), "method"); // line 22 if (!$this->getContext($context, "groupId")) { // line 23 if (array_key_exists("field", $context)) { // line 24 $context["groupId"] = $this->getAttribute($this->getContext($context, "field"), "groupId"); } else { // line 26 $context["groupId"] = $this->getAttribute(twig_get_array_keys_filter($this->getContext($context, "groups")), 0, array(), "array"); } } // line 30 if (!$this->getAttribute($this->getContext($context, "groups", true), $this->getContext($context, "groupId"), array(), "array", true, true)) { // line 31 throw new \Craft\HttpException(404); } // line 35 $context["crumbs"] = array(0 => array("label" => \Craft\Craft::t("Settings"), "url" => \Craft\UrlHelper::getUrl("settings")), 1 => array("label" => \Craft\Craft::t("Fields"), "url" => \Craft\UrlHelper::getUrl("settings/fields")), 2 => array("label" => $this->getAttribute($this->getAttribute($this->getContext($context, "groups"), $this->getContext($context, "groupId"), array(), "array"), "name"), "url" => \Craft\UrlHelper::getUrl("settings/fields/" . $this->getContext($context, "groupId")))); // line 41 if (array_key_exists("fieldId", $context)) { // line 42 $context["title"] = $this->getAttribute($this->getContext($context, "field"), "name"); } else { // line 44 $context["title"] = \Craft\Craft::t("Create a new field"); } // line 48 $context["fieldTypes"] = $this->getAttribute($this->getAttribute($this->getContext($context, "craft"), "fields"), "getAllFieldTypes", array(), "method"); // line 50 if (array_key_exists("field", $context)) { // line 51 $context["fieldType"] = $this->getAttribute($this->getContext($context, "field"), "getFieldType", array(), "method"); // line 52 $context["isFieldTypeMissing"] = !$this->getContext($context, "fieldType"); } else { // line 54 $context["isFieldTypeMissing"] = false; } // line 57 if (!array_key_exists("fieldType", $context) || $this->getContext($context, "isFieldTypeMissing")) { // line 58 $context["fieldType"] = $this->getAttribute($this->getAttribute($this->getContext($context, "craft"), "fields"), "getFieldType", array(0 => "PlainText"), "method"); } // line 62 ob_start(); // line 63 echo "\t<form method=\"post\" accept-charset=\"UTF-8\" data-saveshortcut=\"1\">\n\t\t<input type=\"hidden\" name=\"action\" value=\"fields/saveField\">\n\t\t<input type=\"hidden\" name=\"redirect\" value=\"settings/fields/{groupId}\">\n\t\t"; // line 66 if (array_key_exists("fieldId", $context)) { // line 67 echo "\t\t\t<input type=\"hidden\" name=\"fieldId\" value=\""; echo twig_escape_filter($this->env, $this->getContext($context, "fieldId"), "html", null, true); echo "\">\n\t\t"; } // line 69 echo "\n\t\t"; // line 70 $context["groupOptions"] = array(); // line 71 echo "\t\t"; $context['_parent'] = (array) $context; $context['_seq'] = twig_ensure_traversable($this->getContext($context, "groups")); foreach ($context['_seq'] as $context["_key"] => $context["group"]) { // line 72 echo "\t\t\t"; $context["groupOptions"] = twig_array_merge($this->getContext($context, "groupOptions"), array(0 => array("label" => $this->getAttribute($this->getContext($context, "group"), "name"), "value" => $this->getAttribute($this->getContext($context, "group"), "id")))); // line 73 echo "\t\t"; } $_parent = $context['_parent']; unset($context['_seq'], $context['_iterated'], $context['_key'], $context['group'], $context['_parent'], $context['loop']); $context = array_intersect_key($context, $_parent) + $_parent; // line 74 echo "\t\t"; echo $context["forms"]->getselectField(array("first" => true, "label" => \Craft\Craft::t("Group"), "instructions" => \Craft\Craft::t("Which group should this field be displayed in?"), "id" => "group", "name" => "group", "options" => $this->getContext($context, "groupOptions"), "value" => $this->getContext($context, "groupId"))); // line 82 echo "\n\n\t\t"; // line 84 echo $context["forms"]->gettextField(array("label" => \Craft\Craft::t("Name"), "instructions" => \Craft\Craft::t("What this field will be called in the CP."), "id" => "name", "name" => "name", "value" => array_key_exists("field", $context) ? $this->getAttribute($this->getContext($context, "field"), "name") : null, "errors" => array_key_exists("field", $context) ? $this->getAttribute($this->getContext($context, "field"), "getErrors", array(0 => "name"), "method") : null, "required" => true, "translatable" => true, "autofocus" => true)); // line 94 echo "\n\n\t\t"; // line 96 echo $context["forms"]->gettextField(array("label" => \Craft\Craft::t("Handle"), "instructions" => \Craft\Craft::t("How you’ll refer to this field in the templates."), "id" => "handle", "class" => "code", "name" => "handle", "maxlength" => 64, "value" => array_key_exists("field", $context) ? $this->getAttribute($this->getContext($context, "field"), "handle") : null, "errors" => array_key_exists("field", $context) ? $this->getAttribute($this->getContext($context, "field"), "getErrors", array(0 => "handle"), "method") : null, "required" => true)); // line 106 echo "\n\n\t\t"; // line 108 echo $context["forms"]->gettextareaField(array("label" => \Craft\Craft::t("Instructions"), "instructions" => \Craft\Craft::t("Helper text to guide the author."), "id" => "instructions", "class" => "nicetext", "name" => "instructions", "value" => array_key_exists("field", $context) ? $this->getAttribute($this->getContext($context, "field"), "instructions") : null, "errors" => array_key_exists("field", $context) ? $this->getAttribute($this->getContext($context, "field"), "getErrors", array(0 => "instructions"), "method") : null, "translatable" => true)); // line 117 echo "\n\n\t\t"; // line 119 if ($this->getAttribute($this->getContext($context, "craft"), "isLocalized", array(), "method")) { // line 120 echo "\t\t\t"; echo $context["forms"]->getcheckboxField(array("label" => \Craft\Craft::t("This field is translatable"), "name" => "translatable", "checked" => array_key_exists("field", $context) ? $this->getAttribute($this->getContext($context, "field"), "translatable") : false)); // line 124 echo "\n\t\t"; } // line 126 echo "\n\t\t<hr>\n\n\t\t"; // line 129 echo $context["forms"]->getselectField(array("label" => \Craft\Craft::t("Field Type"), "instructions" => \Craft\Craft::t("What type of field is this?") . (array_key_exists("fieldId", $context) ? "<br><span class=\"error\">" . \Craft\Craft::t("Careful—changing this may result in data loss.") . "</span>" : ""), "id" => "type", "name" => "type", "options" => $this->getContext($context, "fieldTypes"), "value" => $this->getAttribute($this->getContext($context, "fieldType"), "getClassHandle", array(), "method"), "errors" => $this->getContext($context, "isFieldTypeMissing") ? array(0 => \Craft\Craft::t("The fieldtype class “{class}” could not be found.", array("class" => $this->getAttribute($this->getContext($context, "field"), "type")))) : null, "toggle" => true)); // line 138 echo "\n\n\t\t"; // line 140 $context['_parent'] = (array) $context; $context['_seq'] = twig_ensure_traversable($this->getContext($context, "fieldTypes")); foreach ($context['_seq'] as $context["_key"] => $context["_fieldType"]) { // line 141 echo "\t\t\t"; $context["isCurrent"] = $this->getAttribute($this->getContext($context, "_fieldType"), "getClassHandle", array(), "method") == $this->getAttribute($this->getContext($context, "fieldType"), "getClassHandle", array(), "method"); // line 142 echo "\t\t\t<div id=\""; echo twig_escape_filter($this->env, $this->getAttribute($this->getContext($context, "_fieldType"), "getClassHandle", array(), "method"), "html", null, true); echo "\""; if (!$this->getContext($context, "isCurrent")) { echo " class=\"hidden\""; } echo ">\n\t\t\t\t"; // line 143 $_namespace = "types[" . $this->getAttribute($this->getContext($context, "_fieldType"), "getClassHandle", array(), "method") . "]"; if ($_namespace) { $_originalNamespace = \Craft\craft()->templates->getNamespace(); \Craft\craft()->templates->setNamespace(\Craft\craft()->templates->namespaceInputName($_namespace)); ob_start(); try { // line 144 echo "\t\t\t\t\t"; if ($this->getContext($context, "isCurrent")) { // line 145 echo "\t\t\t\t\t\t"; echo $this->getAttribute($this->getContext($context, "fieldType"), "getSettingsHtml", array(), "method"); echo "\n\t\t\t\t\t"; } else { // line 147 echo "\t\t\t\t\t\t"; echo $this->getAttribute($this->getContext($context, "_fieldType"), "getSettingsHtml", array(), "method"); echo "\n\t\t\t\t\t"; } // line 149 echo "\t\t\t\t"; } catch (Exception $e) { ob_end_clean(); throw $e; } echo \Craft\craft()->templates->namespaceInputs(ob_get_clean(), $_namespace); \Craft\craft()->templates->setNamespace($_originalNamespace); } else { // line 144 echo "\t\t\t\t\t"; if ($this->getContext($context, "isCurrent")) { // line 145 echo "\t\t\t\t\t\t"; echo $this->getAttribute($this->getContext($context, "fieldType"), "getSettingsHtml", array(), "method"); echo "\n\t\t\t\t\t"; } else { // line 147 echo "\t\t\t\t\t\t"; echo $this->getAttribute($this->getContext($context, "_fieldType"), "getSettingsHtml", array(), "method"); echo "\n\t\t\t\t\t"; } // line 149 echo "\t\t\t\t"; } unset($_originalNamespace, $_namespace); // line 150 echo "\t\t\t</div>\n\t\t"; } $_parent = $context['_parent']; unset($context['_seq'], $context['_iterated'], $context['_key'], $context['_fieldType'], $context['_parent'], $context['loop']); $context = array_intersect_key($context, $_parent) + $_parent; // line 152 echo "\n\t\t<hr>\n\n\t\t<div class=\"buttons\">\n\t\t\t<input type=\"submit\" class=\"btn submit\" value=\""; // line 156 echo twig_escape_filter($this->env, \Craft\Craft::t("Save"), "html", null, true); echo "\">\n\t\t</div>\n\t</form>\n"; $context["content"] = '' === ($tmp = ob_get_clean()) ? '' : new Twig_Markup($tmp, $this->env->getCharset()); // line 162 if (!array_key_exists("field", $context) || !$this->getAttribute($this->getContext($context, "field"), "handle")) { // line 163 \Craft\craft()->templates->includeJs("new Craft.HandleGenerator('#name', '#handle');"); } $this->parent->display($context, array_merge($this->blocks, $blocks)); }
protected function doDisplay(array $context, array $blocks = array()) { // line 2 $context["title"] = \Craft\Craft::t("Settings"); // line 4 \Craft\craft()->templates->includeCssResource("css/settings.css"); // line 5 \Craft\craft()->templates->includeJsResource("js/settings.js"); // line 7 ob_start(); // line 8 echo "\n\t"; // line 9 $context['_parent'] = (array) $context; $context['_seq'] = twig_ensure_traversable($this->getAttribute($this->getAttribute($this->getContext($context, "craft"), "cp"), "settings", array(), "method")); foreach ($context['_seq'] as $context["category"] => $context["items"]) { // line 10 echo "\t\t<h2>"; echo twig_escape_filter($this->env, $this->getContext($context, "category"), "html", null, true); echo "</h2>\n\n\t\t<ul class=\"icons\">\n\t\t\t"; // line 13 $context['_parent'] = (array) $context; $context['_seq'] = twig_ensure_traversable($this->getContext($context, "items")); foreach ($context['_seq'] as $context["handle"] => $context["item"]) { // line 14 echo "\t\t\t\t<li><a href=\""; echo twig_escape_filter($this->env, \Craft\UrlHelper::getUrl("settings/" . $this->getContext($context, "handle")), "html", null, true); echo "\" data-icon=\""; echo twig_escape_filter($this->env, $this->getAttribute($this->getContext($context, "item"), "icon"), "html", null, true); echo "\">"; echo twig_escape_filter($this->env, $this->getAttribute($this->getContext($context, "item"), "label"), "html", null, true); echo "</a></li>\n\t\t\t"; } $_parent = $context['_parent']; unset($context['_seq'], $context['_iterated'], $context['handle'], $context['item'], $context['_parent'], $context['loop']); $context = array_intersect_key($context, $_parent) + $_parent; // line 16 echo "\t\t</ul>\n\n\t\t<hr>\n\t"; } $_parent = $context['_parent']; unset($context['_seq'], $context['_iterated'], $context['category'], $context['items'], $context['_parent'], $context['loop']); $context = array_intersect_key($context, $_parent) + $_parent; // line 20 echo "\n\t<h2>"; // line 21 echo twig_escape_filter($this->env, \Craft\Craft::t("Tools"), "html", null, true); echo "</h2>\n\n\t<ul class=\"icons\">\n\t\t"; // line 24 $context['_parent'] = (array) $context; $context['_seq'] = twig_ensure_traversable($this->getContext($context, "tools")); foreach ($context['_seq'] as $context["_key"] => $context["tool"]) { // line 25 echo "\t\t\t<li><a id=\"tool-"; echo twig_escape_filter($this->env, $this->getAttribute($this->getContext($context, "tool"), "getClassHandle", array(), "method"), "html", null, true); echo "\" data-icon=\""; echo twig_escape_filter($this->env, $this->getAttribute($this->getContext($context, "tool"), "getIconValue", array(), "method"), "html", null, true); echo "\">"; echo twig_escape_filter($this->env, $this->getAttribute($this->getContext($context, "tool"), "getName", array(), "method"), "html", null, true); echo "</a></li>\n\t\t\t"; // line 26 \Craft\craft()->templates->includeJs("new Craft.Tool(\"" . $this->getAttribute($this->getContext($context, "tool"), "getClassHandle", array(), "method") . "\", " . twig_jsonencode_filter($this->getAttribute($this->getContext($context, "tool"), "getOptionsHtml", array(), "method")) . ", \"" . $this->getAttribute($this->getContext($context, "tool"), "getButtonLabel", array(), "method") . "\");"); // line 27 echo "\t\t"; } $_parent = $context['_parent']; unset($context['_seq'], $context['_iterated'], $context['_key'], $context['tool'], $context['_parent'], $context['loop']); $context = array_intersect_key($context, $_parent) + $_parent; // line 28 echo "\t</ul>\n"; $context["content"] = '' === ($tmp = ob_get_clean()) ? '' : new Twig_Markup($tmp, $this->env->getCharset()); $this->parent->display($context, array_merge($this->blocks, $blocks)); }
public function block_body($context, array $blocks = array()) { // line 64 echo "\t"; if ($this->getAttribute($this->getContext($context, "currentUser"), "admin") && $this->getAttribute($this->getAttribute($this->getContext($context, "craft"), "config"), "devMode")) { // line 65 echo "\t\t<div id=\"devmode\" title=\""; echo twig_escape_filter($this->env, \Craft\Craft::t("Craft is running in Dev Mode."), "html", null, true); echo "\"></div>\n\t"; } // line 67 echo "\n\t"; // line 68 if ($this->getAttribute($this->getAttribute($this->getContext($context, "craft"), "cp"), "areAlertsCached", array(), "method")) { // line 69 echo "\t\t"; $context["alerts"] = $this->getAttribute($this->getAttribute($this->getContext($context, "craft"), "cp"), "getAlerts", array(), "method"); // line 70 echo "\t\t"; if ($this->getContext($context, "alerts")) { // line 71 echo "\t\t\t<ul id=\"alerts\">\n\t\t\t\t"; // line 72 $context['_parent'] = (array) $context; $context['_seq'] = twig_ensure_traversable($this->getAttribute($this->getAttribute($this->getContext($context, "craft"), "cp"), "getAlerts", array(), "method")); foreach ($context['_seq'] as $context["_key"] => $context["alert"]) { // line 73 echo "\t\t\t\t\t<li>"; echo $this->getContext($context, "alert"); echo "</li>\n\t\t\t\t"; } $_parent = $context['_parent']; unset($context['_seq'], $context['_iterated'], $context['_key'], $context['alert'], $context['_parent'], $context['loop']); $context = array_intersect_key($context, $_parent) + $_parent; // line 75 echo "\t\t\t</ul>\n\t\t"; } // line 77 echo "\t"; } else { // line 78 echo "\t\t"; \Craft\craft()->templates->includeJs("Craft.cp.fetchAlerts();"); // line 79 echo "\t"; } // line 80 echo "\n\t<header id=\"header\">\n\t\t<div class=\"container\">\n\t\t\t<ul id=\"header-actions\" class=\"right\">\n\t\t\t\t"; // line 84 $context["task"] = $this->getAttribute($this->getAttribute($this->getContext($context, "craft"), "tasks"), "getRunningTask", array(), "method"); // line 85 echo "\t\t\t\t"; if ($this->getContext($context, "task")) { // line 86 echo "\t\t\t\t\t"; \Craft\craft()->templates->includeJs("Craft.cp.setRunningTaskInfo(" . twig_jsonencode_filter($this->getAttribute($this->getContext($context, "task"), "getInfo", array(), "method")) . ");"); // line 87 echo "\t\t\t\t\t"; \Craft\craft()->templates->includeJs("Craft.cp.trackTaskProgress();"); // line 88 echo "\t\t\t\t"; } elseif ($this->getAttribute($this->getAttribute($this->getContext($context, "craft"), "tasks"), "areTasksPending", array(), "method")) { // line 89 echo "\t\t\t\t\t"; \Craft\craft()->templates->includeJs("Craft.cp.runPendingTasks();"); // line 90 echo "\t\t\t\t"; } elseif ($this->getAttribute($this->getAttribute($this->getContext($context, "craft"), "tasks"), "haveTasksFailed", array(), "method")) { // line 91 echo "\t\t\t\t\t"; \Craft\craft()->templates->includeJs("Craft.cp.setRunningTaskInfo({ status: \"error\" });"); // line 92 echo "\t\t\t\t"; } // line 93 echo "\n\t\t\t\t"; // line 94 if ($this->getAttribute($this->getContext($context, "currentUser"), "can", array(0 => "performUpdates"), "method")) { // line 95 echo "\t\t\t\t\t"; if ($this->getAttribute($this->getAttribute($this->getContext($context, "craft"), "app"), "isUpdateInfoCached", array(), "method")) { // line 96 echo "\t\t\t\t\t\t"; $context["totalUpdates"] = $this->getAttribute($this->getAttribute($this->getContext($context, "craft"), "app"), "getTotalAvailableUpdates", array(), "method"); // line 97 echo "\t\t\t\t\t\t"; if ($this->getContext($context, "totalUpdates")) { // line 98 echo "\t\t\t\t\t\t\t"; if ($this->getContext($context, "totalUpdates") == 1) { // line 99 echo "\t\t\t\t\t\t\t\t"; $context["updateText"] = \Craft\Craft::t("1 update available"); // line 100 echo "\t\t\t\t\t\t\t"; } else { // line 101 echo "\t\t\t\t\t\t\t\t"; $context["updateText"] = \Craft\Craft::t("{num} updates available", array("num" => $this->getContext($context, "totalUpdates"))); // line 102 echo "\t\t\t\t\t\t\t"; } // line 103 echo "\t\t\t\t\t\t\t<li class=\"updates"; if ($this->getAttribute($this->getAttribute($this->getContext($context, "craft"), "app"), "isCriticalUpdateAvailable", array(), "method")) { echo " critical"; } echo "\">\n\t\t\t\t\t\t\t\t<a data-icon=\"newstamp\" href=\""; // line 104 echo twig_escape_filter($this->env, \Craft\UrlHelper::getUrl("updates"), "html", null, true); echo "\" title=\""; echo twig_escape_filter($this->env, $this->getContext($context, "updateText"), "html", null, true); echo "\">\n\t\t\t\t\t\t\t\t\t<span>"; // line 105 echo twig_escape_filter($this->env, $this->getContext($context, "totalUpdates"), "html", null, true); echo "</span>\n\t\t\t\t\t\t\t\t</a>\n\t\t\t\t\t\t\t</li>\n\t\t\t\t\t\t"; } // line 109 echo "\t\t\t\t\t"; } else { // line 110 echo "\t\t\t\t\t\t"; \Craft\craft()->templates->includeJs("Craft.cp.checkForUpdates();"); // line 111 echo "\t\t\t\t\t"; } // line 112 echo "\t\t\t\t"; } // line 113 echo "\n\t\t\t\t"; // line 114 if ($this->getAttribute($this->getContext($context, "currentUser"), "admin")) { // line 115 echo "\t\t\t\t\t<li>\n\t\t\t\t\t\t<a class=\"settings\" data-icon=\"settings\" href=\""; // line 116 echo twig_escape_filter($this->env, \Craft\UrlHelper::getUrl("settings"), "html", null, true); echo "\" title=\""; echo twig_escape_filter($this->env, \Craft\Craft::t("Settings"), "html", null, true); echo "\"></a>\n\t\t\t\t\t</li>\n\t\t\t\t\t<li>\n\t\t\t\t\t\t<a class=\"settingsmenu menubtn\" title=\""; // line 119 echo twig_escape_filter($this->env, \Craft\Craft::t("Settings"), "html", null, true); echo "\"></a>\n\t\t\t\t\t\t<div id=\"settingsmenu\" class=\"menu padded\" data-align=\"right\">\n\t\t\t\t\t\t\t<ul>\n\t\t\t\t\t\t\t\t"; // line 122 $context['_parent'] = (array) $context; $context['_seq'] = twig_ensure_traversable($this->getAttribute($this->getAttribute($this->getContext($context, "craft"), "cp"), "settings", array(), "method")); foreach ($context['_seq'] as $context["category"] => $context["items"]) { // line 123 echo "\t\t\t\t\t\t\t\t\t"; $context['_parent'] = (array) $context; $context['_seq'] = twig_ensure_traversable($this->getContext($context, "items")); foreach ($context['_seq'] as $context["handle"] => $context["item"]) { // line 124 echo "\t\t\t\t\t\t\t\t\t\t<li><a href=\""; echo twig_escape_filter($this->env, \Craft\UrlHelper::getUrl("settings/" . $this->getContext($context, "handle")), "html", null, true); echo "\" data-icon=\""; echo twig_escape_filter($this->env, $this->getAttribute($this->getContext($context, "item"), "icon"), "html", null, true); echo "\">"; echo twig_escape_filter($this->env, $this->getAttribute($this->getContext($context, "item"), "label"), "html", null, true); echo "</a></li>\n\t\t\t\t\t\t\t\t\t"; } $_parent = $context['_parent']; unset($context['_seq'], $context['_iterated'], $context['handle'], $context['item'], $context['_parent'], $context['loop']); $context = array_intersect_key($context, $_parent) + $_parent; // line 126 echo "\t\t\t\t\t\t\t\t"; } $_parent = $context['_parent']; unset($context['_seq'], $context['_iterated'], $context['category'], $context['items'], $context['_parent'], $context['loop']); $context = array_intersect_key($context, $_parent) + $_parent; // line 127 echo "\t\t\t\t\t\t\t</ul>\n\t\t\t\t\t\t</div>\n\t\t\t\t\t</li>\n\t\t\t\t"; } // line 131 echo "\n\t\t\t\t<li>\n\t\t\t\t\t<a data-icon=\"user\" class=\"myaccount menubtn\" title=\""; // line 133 echo twig_escape_filter($this->env, \Craft\Craft::t("My Account"), "html", null, true); echo "\" role=\"button\"></a>\n\t\t\t\t\t<div class=\"menu\" data-align=\"right\">\n\t\t\t\t\t\t<ul>\n\t\t\t\t\t\t\t<li><a href=\""; // line 136 echo twig_escape_filter($this->env, \Craft\UrlHelper::getUrl("myaccount"), "html", null, true); echo "\">"; echo twig_escape_filter($this->env, \Craft\Craft::t("My Account"), "html", null, true); echo "</a></li>\n\t\t\t\t\t\t\t"; // line 137 if ($this->getContext($context, "CraftEdition") == $this->getContext($context, "CraftClient") && $this->getAttribute($this->getContext($context, "currentUser"), "admin")) { // line 138 echo "\t\t\t\t\t\t\t\t<li><a href=\""; echo twig_escape_filter($this->env, \Craft\UrlHelper::getUrl("clientaccount"), "html", null, true); echo "\">"; echo twig_escape_filter($this->env, \Craft\Craft::t("Client’s Account"), "html", null, true); echo "</a></li>\n\t\t\t\t\t\t\t"; } // line 140 echo "\t\t\t\t\t\t\t<li><a href=\""; echo twig_escape_filter($this->env, $this->getContext($context, "logoutUrl"), "html", null, true); echo "\">"; echo twig_escape_filter($this->env, \Craft\Craft::t("Sign out"), "html", null, true); echo "</a></li>\n\t\t\t\t\t\t</ul>\n\t\t\t\t\t</div>\n\t\t\t\t</li>\n\t\t\t</ul>\n\n\t\t\t<h2><a href=\""; // line 146 echo twig_escape_filter($this->env, $this->getContext($context, "siteUrl"), "html", null, true); echo "\" title=\""; echo twig_escape_filter($this->env, \Craft\Craft::t("Site Homepage"), "html", null, true); echo "\" target=\"_blank\">"; echo twig_escape_filter($this->env, \Craft\Craft::t($this->getContext($context, "siteName")), "html", null, true); echo "</a></h2>\n\n\t\t\t<nav>\n\t\t\t\t<ul id=\"nav\">\n\t\t\t\t\t"; // line 150 $context['_parent'] = (array) $context; $context['_seq'] = twig_ensure_traversable($this->getAttribute($this->getAttribute($this->getContext($context, "craft"), "cp"), "nav", array(), "method")); foreach ($context['_seq'] as $context["handle"] => $context["item"]) { // line 151 echo "\t\t\t\t\t\t<li id=\"nav-"; echo twig_escape_filter($this->env, $this->getContext($context, "handle"), "html", null, true); echo "\">\n\t\t\t\t\t\t\t<a"; // line 152 if ($this->getAttribute($this->getContext($context, "item"), "sel")) { echo " class=\"sel\""; } echo " href=\""; echo twig_escape_filter($this->env, $this->getAttribute($this->getContext($context, "item"), "url"), "html", null, true); echo "\">"; // line 153 echo twig_escape_filter($this->env, $this->getAttribute($this->getContext($context, "item"), "name"), "html", null, true); // line 154 if ($this->getAttribute($this->getContext($context, "item", true), "badge", array(), "any", true, true) && $this->getAttribute($this->getContext($context, "item"), "badge")) { // line 155 echo "<span class=\"badge\">"; echo twig_escape_filter($this->env, $this->getAttribute($this->getContext($context, "item"), "badge"), "html", null, true); echo "</span>"; } // line 157 echo "</a>\n\t\t\t\t\t\t</li>\n\t\t\t\t\t"; } $_parent = $context['_parent']; unset($context['_seq'], $context['_iterated'], $context['handle'], $context['item'], $context['_parent'], $context['loop']); $context = array_intersect_key($context, $_parent) + $_parent; // line 160 echo "\t\t\t\t</ul>\n\t\t\t</nav>\n\t\t</div>\n\t</header>\n\n\t<div class=\"container\">\n\t\t<div id=\"notifications-wrapper\">\n\t\t\t<div id=\"notifications\">\n\t\t\t\t"; // line 168 $context['_parent'] = (array) $context; $context['_seq'] = twig_ensure_traversable(array(0 => "notice", 1 => "error")); foreach ($context['_seq'] as $context["_key"] => $context["type"]) { // line 169 echo "\t\t\t\t\t"; $context["message"] = $this->getAttribute($this->getAttribute($this->getContext($context, "craft"), "session"), "getFlash", array(0 => $this->getContext($context, "type")), "method"); // line 170 echo "\t\t\t\t\t"; if ($this->getContext($context, "message")) { // line 171 echo "\t\t\t\t\t\t<div class=\"notification "; echo twig_escape_filter($this->env, $this->getContext($context, "type"), "html", null, true); echo "\">"; echo twig_escape_filter($this->env, $this->getContext($context, "message"), "html", null, true); echo "</div>\n\t\t\t\t\t"; } // line 173 echo "\t\t\t\t"; } $_parent = $context['_parent']; unset($context['_seq'], $context['_iterated'], $context['_key'], $context['type'], $context['_parent'], $context['loop']); $context = array_intersect_key($context, $_parent) + $_parent; // line 174 echo "\t\t\t</div>\n\t\t</div>\n\n\t\t<header id=\"page-header\">\n\t\t\t"; // line 178 $this->displayBlock('pageHeader', $context, $blocks); // line 201 echo "\t\t</header>\n\n\t\t<main id=\"main\" role=\"main\">\n\t\t\t"; // line 204 $this->displayBlock('main', $context, $blocks); // line 235 echo "\t\t</main>\n\n\t\t<div id=\"footer\">\n\t\t\t<ul>\n\t\t\t\t<li>Craft "; // line 239 echo twig_escape_filter($this->env, $this->getAttribute($this->getAttribute($this->getContext($context, "craft"), "app"), "getEditionName", array(), "method"), "html", null, true); echo " "; echo twig_escape_filter($this->env, $this->getAttribute($this->getAttribute($this->getContext($context, "craft"), "app"), "getVersion", array(), "method"), "html", null, true); echo "."; echo twig_escape_filter($this->env, $this->getAttribute($this->getAttribute($this->getContext($context, "craft"), "app"), "getBuild", array(), "method"), "html", null, true); echo "</li>\n\t\t\t\t<li>"; // line 240 echo twig_escape_filter($this->env, \Craft\Craft::t("Released on"), "html", null, true); echo " "; echo twig_escape_filter($this->env, $this->getAttribute($this->getAttribute($this->getAttribute($this->getContext($context, "craft"), "app"), "releaseDate"), "localeDate"), "html", null, true); echo "</li>\n\t\t\t\t"; // line 241 if ($this->getAttribute($this->getContext($context, "currentUser"), "can", array(0 => "performUpdates"), "method")) { // line 242 echo "\t\t\t\t\t<li><a id=\"footer-updates\" href=\""; echo twig_escape_filter($this->env, \Craft\UrlHelper::getUrl("updates"), "html", null, true); echo "\">"; echo twig_escape_filter($this->env, $this->getAttribute($this->getAttribute($this->getContext($context, "craft"), "app"), "isUpdateInfoCached", array(), "method") && $this->getContext($context, "totalUpdates") ? $this->getContext($context, "updateText") : \Craft\Craft::t("Check for updates"), "html", null, true); echo "</a></li>\n\t\t\t\t"; } // line 244 echo "\t\t\t\t<li>"; echo twig_escape_filter($this->env, \Craft\Craft::t("Copyright"), "html", null, true); echo " "; echo twig_escape_filter($this->env, $this->getAttribute($this->getContext($context, "now"), "year"), "html", null, true); echo " Pixel & Tonic, Inc. "; echo twig_escape_filter($this->env, \Craft\Craft::t("All rights reserved."), "html", null, true); echo "</li>\n\t\t\t</ul>\n\n\t\t\t"; // line 247 if (($this->getContext($context, "CraftEdition") == $this->getContext($context, "CraftPersonal") || $this->getAttribute($this->getAttribute($this->getContext($context, "craft"), "request"), "getPath") == "settings") && $this->getAttribute($this->getAttribute($this->getContext($context, "craft"), "app"), "canUpgradeEdition", array(), "method")) { // line 248 echo "\t\t\t\t<p id=\"upgradepromo\"><a>"; echo twig_escape_filter($this->env, \Craft\Craft::t("Upgrade Craft to take your site to the next level."), "html", null, true); echo " <span class=\"go\">"; echo twig_escape_filter($this->env, \Craft\Craft::t("Show me"), "html", null, true); echo "</span></a></p>\n\t\t\t"; } // line 250 echo "\t\t</div>\n\t</div>\n\n\t"; // line 253 if ($this->getAttribute($this->getAttribute($this->getContext($context, "craft"), "app"), "hasWrongEdition", array(), "method")) { // line 254 echo "\t\t<div id=\"wrongedition-modal\" class=\"modal fitted hidden\">\n\t\t\t<div class=\"body\">\n\t\t\t\t<p>"; // line 256 echo twig_escape_filter($this->env, \Craft\Craft::t("You’re running Craft {edition} with a Craft {licensedEdition} license.", array("edition" => $this->getAttribute($this->getAttribute($this->getContext($context, "craft"), "app"), "getEditionName", array(), "method"), "licensedEdition" => $this->getAttribute($this->getAttribute($this->getContext($context, "craft"), "app"), "getLicensedEditionName", array(), "method"))), "html", null, true); echo "</p>\n\t\t\t\t<p>"; // line 257 echo twig_escape_filter($this->env, \Craft\Craft::t("What would you like to do?"), "html", null, true); echo "</p>\n\t\t\t\t<div class=\"buttons\">\n\t\t\t\t\t<div class=\"btngroup\">\n\t\t\t\t\t\t<div id=\"wrongedition-switchbtn\" class=\"btn\">"; // line 260 echo twig_escape_filter($this->env, \Craft\Craft::t("Switch to Craft {edition}", array("edition" => $this->getAttribute($this->getAttribute($this->getContext($context, "craft"), "app"), "getLicensedEditionName", array(), "method"))), "html", null, true); echo "</div>\n\t\t\t\t\t\t"; // line 261 if ($this->getAttribute($this->getAttribute($this->getContext($context, "craft"), "app"), "getEdition", array(), "method") > $this->getAttribute($this->getAttribute($this->getContext($context, "craft"), "app"), "getLicensedEdition", array(), "method")) { // line 262 echo "\t\t\t\t\t\t\t<div id=\"wrongedition-upgradebtn\" class=\"btn\">"; echo twig_escape_filter($this->env, \Craft\Craft::t("Upgrade your license"), "html", null, true); echo "</div>\n\t\t\t\t\t\t"; } // line 264 echo "\t\t\t\t\t</div>\n\t\t\t\t</div>\n\t\t\t</div>\n\t\t</div>\n\t"; } }
public function block_foot($context, array $blocks = array()) { // line 37 echo "\t<noscript>\n\t\t<div class=\"message-container no-access\">\n\t\t\t<div class=\"pane notice\">\n\t\t\t\t<p>"; // line 40 echo twig_escape_filter($this->env, \Craft\Craft::t("JavaScript must be enabled to access the Craft control panel."), "html", null, true); echo "</p>\n\t\t\t</div>\n\t\t</div>\n\t</noscript>\n\n\t<script type=\"text/javascript\">\n\t\twindow.Craft = {\n\t\t\tsiteUid: \""; // line 47 echo twig_escape_filter($this->env, twig_escape_filter($this->env, $this->getAttribute($this->getAttribute($this->getContext($context, "craft"), "app"), "getSiteUid", array(), "method"), "js"), "html", null, true); echo "\",\n\t\t\tbaseUrl: \""; // line 48 echo twig_escape_filter($this->env, twig_escape_filter($this->env, \Craft\UrlHelper::getUrl(), "js"), "html", null, true); echo "\",\n\t\t\tbaseCpUrl: \""; // line 49 echo twig_escape_filter($this->env, twig_escape_filter($this->env, \Craft\UrlHelper::getCpUrl(), "js"), "html", null, true); echo "\",\n\t\t\tbaseSiteUrl: \""; // line 50 echo twig_escape_filter($this->env, twig_escape_filter($this->env, \Craft\UrlHelper::getSiteUrl(), "js"), "html", null, true); echo "\",\n\t\t\tactionUrl: \""; // line 51 echo twig_escape_filter($this->env, twig_escape_filter($this->env, \Craft\UrlHelper::getActionUrl(), "js"), "html", null, true); echo "\",\n\t\t\tresourceUrl: \""; // line 52 echo twig_escape_filter($this->env, twig_escape_filter($this->env, \Craft\UrlHelper::getResourceUrl(), "js"), "html", null, true); echo "\",\n\t\t\tscriptName: \""; // line 53 echo twig_escape_filter($this->env, twig_escape_filter($this->env, $this->getAttribute($this->getAttribute($this->getContext($context, "craft"), "request"), "getScriptName", array(), "method"), "js"), "html", null, true); echo "\",\n\t\t\tomitScriptNameInUrls: "; // line 54 echo $this->getAttribute($this->getAttribute($this->getContext($context, "craft"), "config"), "omitScriptNameInUrls", array(), "method") ? "true" : "false"; echo ",\n\t\t\tusePathInfo: "; // line 55 echo $this->getAttribute($this->getAttribute($this->getContext($context, "craft"), "config"), "usePathInfo", array(), "method") ? "true" : "false"; echo ",\n\t\t\tresourceTrigger: \""; // line 56 echo twig_escape_filter($this->env, twig_escape_filter($this->env, $this->getAttribute($this->getAttribute($this->getContext($context, "craft"), "config"), "getResourceTrigger", array(), "method"), "js"), "html", null, true); echo "\",\n\t\t\tactionTrigger: \""; // line 57 echo twig_escape_filter($this->env, twig_escape_filter($this->env, $this->getAttribute($this->getAttribute($this->getContext($context, "craft"), "config"), "actionTrigger"), "js"), "html", null, true); echo "\",\n\t\t\tpath: \""; // line 58 echo twig_escape_filter($this->env, twig_escape_filter($this->env, $this->getAttribute($this->getAttribute($this->getContext($context, "craft"), "request"), "getPath", array(), "method"), "js"), "html", null, true); echo "\",\n\t\t\tlocale: \""; // line 59 echo twig_escape_filter($this->env, twig_escape_filter($this->env, $this->getAttribute($this->getContext($context, "craft"), "locale"), "js"), "html", null, true); echo "\",\n\t\t\torientation: \""; // line 60 echo twig_escape_filter($this->env, twig_escape_filter($this->env, $this->getContext($context, "orientation"), "js"), "html", null, true); echo "\",\n\t\t\tleft: \""; // line 61 echo $this->getContext($context, "orientation") == "ltr" ? "left" : "right"; echo "\",\n\t\t\tright: \""; // line 62 echo $this->getContext($context, "orientation") == "ltr" ? "right" : "left"; echo "\",\n\t\t\tPersonal: "; // line 63 echo twig_escape_filter($this->env, $this->getContext($context, "CraftPersonal"), "html", null, true); echo ",\n\t\t\tClient: "; // line 64 echo twig_escape_filter($this->env, $this->getContext($context, "CraftClient"), "html", null, true); echo ",\n\t\t\tPro: "; // line 65 echo twig_escape_filter($this->env, $this->getContext($context, "CraftPro"), "html", null, true); echo ",\n\t\t\tedition: "; // line 66 echo twig_escape_filter($this->env, $this->getContext($context, "CraftEdition"), "html", null, true); echo ",\n\t\t\tisLocalized: "; // line 67 echo $this->getAttribute($this->getContext($context, "craft"), "isLocalized", array(), "method") ? "true" : "false"; echo ",\n\t\t\ttranslations: "; // line 68 echo \Craft\craft()->templates->getTranslations(); echo ",\n\t\t\tmaxUploadSize: "; // line 69 echo twig_escape_filter($this->env, $this->getAttribute($this->getAttribute($this->getContext($context, "craft"), "app"), "getMaxUploadSize", array(), "method"), "html", null, true); echo ",\n\t\t\tslugWordSeparator: \""; // line 70 echo twig_escape_filter($this->env, twig_escape_filter($this->env, $this->getAttribute($this->getAttribute($this->getContext($context, "craft"), "config"), "slugWordSeparator"), "js"), "html", null, true); echo "\"\n\t\t};\n\n\t\twindow.Craft.fileKinds = {};\n\t\t"; // line 74 $context['_parent'] = (array) $context; $context['_seq'] = twig_ensure_traversable($this->getAttribute($this->getAttribute($this->getContext($context, "craft"), "app"), "getFileKinds", array(), "method")); foreach ($context['_seq'] as $context["kind"] => $context["info"]) { // line 75 echo "\t\t\twindow.Craft.fileKinds."; echo twig_escape_filter($this->env, $this->getContext($context, "kind"), "html", null, true); echo " = [];\n\t\t\t"; // line 76 $context['_parent'] = (array) $context; $context['_seq'] = twig_ensure_traversable($this->getAttribute($this->getContext($context, "info"), "extensions")); foreach ($context['_seq'] as $context["_key"] => $context["extension"]) { // line 77 echo "\t\t\t\twindow.Craft.fileKinds."; echo twig_escape_filter($this->env, $this->getContext($context, "kind"), "html", null, true); echo ".push(\""; echo twig_escape_filter($this->env, $this->getContext($context, "extension"), "html", null, true); echo "\");\n\t\t\t"; } $_parent = $context['_parent']; unset($context['_seq'], $context['_iterated'], $context['_key'], $context['extension'], $context['_parent'], $context['loop']); $context = array_intersect_key($context, $_parent) + $_parent; // line 79 echo "\t\t"; } $_parent = $context['_parent']; unset($context['_seq'], $context['_iterated'], $context['kind'], $context['info'], $context['_parent'], $context['loop']); $context = array_intersect_key($context, $_parent) + $_parent; // line 80 echo "\t</script>\n"; }
/** * Get the url for the given page. * * @param int $page * * @return string */ public function getUrl($page) { $pagination_base_url = \Craft\craft()->config->get('paginationBaseUrl', 'restfulApi'); $page_trigger = \Craft\craft()->config->get('paginationParameter', 'restfulApi'); return \Craft\UrlHelper::getUrl($pagination_base_url, array_merge(\Craft\craft()->request->getQuery(), [$page_trigger => $page])); }