377ae461c61bf6fa60f6a06747e00ac50ee64aa52088073c7eb404c85bfce83f.php 22 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396
  1. <?php
  2. /* partials/nav.html.twig */
  3. class __TwigTemplate_39737bbb11556c4fbf1ba15dc5ddf6fb9523cff98c7b91565822b92440d21171 extends Twig_Template
  4. {
  5. public function __construct(Twig_Environment $env)
  6. {
  7. parent::__construct($env);
  8. $this->parent = false;
  9. $this->blocks = array(
  10. );
  11. }
  12. protected function doDisplay(array $context, array $blocks = array())
  13. {
  14. // line 1
  15. if ($this->env->getExtension('Grav\Common\Twig\TwigExtension')->authorize(array(0 => "admin.login", 1 => "admin.super"))) {
  16. // line 2
  17. echo " <nav id=\"admin-sidebar\" data-quickopen=\"";
  18. echo ((($this->getAttribute($this->getAttribute($this->getAttribute($this->getAttribute(($context["config"] ?? null), "plugins", array()), "admin", array()), "sidebar", array()), "activate", array()) == "hover")) ? ("true") : ("false"));
  19. echo "\" data-quickopen-delay=\"";
  20. echo twig_escape_filter($this->env, $this->getAttribute($this->getAttribute($this->getAttribute($this->getAttribute(($context["config"] ?? null), "plugins", array()), "admin", array()), "sidebar", array()), "hover_delay", array()), "html", null, true);
  21. echo "\">
  22. ";
  23. // line 3
  24. if (($this->getAttribute($this->getAttribute($this->getAttribute($this->getAttribute(($context["config"] ?? null), "plugins", array()), "admin", array()), "sidebar", array()), "activate", array()) != "hover")) {
  25. // line 4
  26. echo " <div id=\"open-handle\" data-sidebar-toggle><i class=\"fa fa-angle-double-right\"></i></div>
  27. ";
  28. }
  29. // line 6
  30. echo "
  31. <div id=\"admin-logo\">
  32. ";
  33. // line 8
  34. $this->loadTemplate("partials/logo.html.twig", "partials/nav.html.twig", 8)->display($context);
  35. // line 9
  36. echo " </div>
  37. ";
  38. // line 11
  39. $this->loadTemplate("partials/nav-user-details.html.twig", "partials/nav.html.twig", 11)->display($context);
  40. // line 12
  41. echo "
  42. ";
  43. // line 13
  44. $this->loadTemplate("partials/nav-quick-tray.html.twig", "partials/nav.html.twig", 13)->display($context);
  45. // line 14
  46. echo "
  47. <div class=\"admin-menu-wrapper\">
  48. <ul id=\"admin-menu\">
  49. <li class=\"";
  50. // line 17
  51. echo (((($context["location"] ?? null) == "dashboard")) ? ("selected") : (""));
  52. echo "\">
  53. <a href=\"";
  54. // line 18
  55. echo twig_escape_filter($this->env, ($context["base_url_relative"] ?? null), "html", null, true);
  56. echo "\"><i class=\"fa fa-fw fa-th\"></i><em>";
  57. echo twig_escape_filter($this->env, $this->env->getExtension('Grav\Plugin\Admin\AdminTwigExtension')->tuFilter("PLUGIN_ADMIN.DASHBOARD"), "html", null, true);
  58. echo "</em></a>
  59. </li>
  60. ";
  61. // line 20
  62. if ($this->env->getExtension('Grav\Common\Twig\TwigExtension')->authorize(array(0 => "admin.configuration", 1 => "admin.super"))) {
  63. // line 21
  64. echo " <li class=\"";
  65. echo (((((($context["location"] ?? null) == "system") || (($context["location"] ?? null) == "site")) || (($context["location"] ?? null) == "config"))) ? ("selected") : (""));
  66. echo "\">
  67. <a href=\"";
  68. // line 22
  69. echo twig_escape_filter($this->env, ($context["base_url_relative"] ?? null), "html", null, true);
  70. echo "/config/system\"><i class=\"fa fa-fw fa-wrench\"></i><em>";
  71. echo twig_escape_filter($this->env, $this->env->getExtension('Grav\Plugin\Admin\AdminTwigExtension')->tuFilter("PLUGIN_ADMIN.CONFIGURATION"), "html", null, true);
  72. echo "</em></a>
  73. </li>
  74. ";
  75. }
  76. // line 25
  77. echo " ";
  78. if ($this->env->getExtension('Grav\Common\Twig\TwigExtension')->authorize(array(0 => "admin.pages", 1 => "admin.super"))) {
  79. // line 26
  80. echo " <li class=\"";
  81. echo (((($context["location"] ?? null) == "pages")) ? ("selected") : (""));
  82. echo "\">
  83. <a href=\"";
  84. // line 27
  85. echo twig_escape_filter($this->env, ($context["base_url_relative"] ?? null), "html", null, true);
  86. echo "/pages\">
  87. <i class=\"fa fa-fw fa-file-text-o\"></i>
  88. <em>";
  89. // line 29
  90. echo twig_escape_filter($this->env, $this->env->getExtension('Grav\Plugin\Admin\AdminTwigExtension')->tuFilter("PLUGIN_ADMIN.PAGES"), "html", null, true);
  91. echo "</em>
  92. <span class=\"badges\">
  93. <span class=\"badge count\">";
  94. // line 31
  95. echo twig_escape_filter($this->env, $this->getAttribute(($context["admin"] ?? null), "pagesCount", array()), "html", null, true);
  96. echo "</span>
  97. </span>
  98. </a>
  99. </li>
  100. ";
  101. }
  102. // line 36
  103. echo " ";
  104. if ($this->getAttribute($this->getAttribute(($context["grav"] ?? null), "twig", array()), "plugins_hooked_nav", array())) {
  105. // line 37
  106. echo " ";
  107. $context['_parent'] = $context;
  108. $context['_seq'] = twig_ensure_traversable($this->getAttribute($this->getAttribute(($context["grav"] ?? null), "twig", array()), "plugins_hooked_nav", array()));
  109. foreach ($context['_seq'] as $context["label"] => $context["item"]) {
  110. // line 38
  111. echo " ";
  112. if ($this->env->getExtension('Grav\Common\Twig\TwigExtension')->authorize(((($this->getAttribute($context["item"], "authorize", array(), "any", true, true) && twig_test_iterable($this->getAttribute($context["item"], "authorize", array())))) ? ($this->getAttribute($context["item"], "authorize", array())) : (array(0 => (($this->getAttribute($context["item"], "authorize", array())) ? ($this->getAttribute($context["item"], "authorize", array())) : (("admin." . (($this->getAttribute($context["item"], "location", array())) ? ($this->getAttribute($context["item"], "location", array())) : ($this->getAttribute($context["item"], "route", array())))))), 1 => "admin.super"))))) {
  113. // line 39
  114. echo " <li class=\"";
  115. echo (((($context["location"] ?? null) == (($this->getAttribute($context["item"], "location", array())) ? ($this->getAttribute($context["item"], "location", array())) : ($this->getAttribute($context["item"], "route", array()))))) ? ("selected") : (""));
  116. echo "\">
  117. <a href=\"";
  118. // line 40
  119. echo twig_escape_filter($this->env, ($context["base_url_relative"] ?? null), "html", null, true);
  120. echo "/";
  121. echo twig_escape_filter($this->env, (($this->getAttribute($context["item"], "route", array())) ? ($this->getAttribute($context["item"], "route", array())) : ($this->getAttribute($context["item"], "location", array()))), "html", null, true);
  122. echo "\">
  123. <i class=\"fa fa-fw ";
  124. // line 41
  125. echo twig_escape_filter($this->env, $this->getAttribute($context["item"], "icon", array()), "html", null, true);
  126. echo "\"></i>
  127. <em>";
  128. // line 42
  129. echo twig_escape_filter($this->env, $this->env->getExtension('Grav\Plugin\Admin\AdminTwigExtension')->tuFilter($context["label"]), "html", null, true);
  130. echo "</em>
  131. ";
  132. // line 43
  133. if ($this->getAttribute($context["item"], "badge", array())) {
  134. // line 44
  135. echo " <span class=\"badges ";
  136. if ($this->getAttribute($this->getAttribute($context["item"], "badge", array(), "any", false, true), "updates", array(), "any", true, true)) {
  137. echo "with-updates";
  138. }
  139. echo "\">
  140. ";
  141. // line 45
  142. if ($this->getAttribute($this->getAttribute($context["item"], "badge", array(), "any", false, true), "updates", array(), "any", true, true)) {
  143. echo "<span class=\"badge updates\">";
  144. echo twig_escape_filter($this->env, $this->getAttribute($this->getAttribute($context["item"], "badge", array()), "updates", array()), "html", null, true);
  145. echo "</span>";
  146. }
  147. // line 46
  148. echo " <span class=\"badge count\">";
  149. echo twig_escape_filter($this->env, $this->getAttribute($this->getAttribute($context["item"], "badge", array()), "count", array()), "html", null, true);
  150. echo "</span>
  151. </span>
  152. ";
  153. }
  154. // line 49
  155. echo " </a>
  156. </li>
  157. ";
  158. }
  159. // line 52
  160. echo " ";
  161. }
  162. $_parent = $context['_parent'];
  163. unset($context['_seq'], $context['_iterated'], $context['label'], $context['item'], $context['_parent'], $context['loop']);
  164. $context = array_intersect_key($context, $_parent) + $_parent;
  165. // line 53
  166. echo " ";
  167. }
  168. // line 54
  169. echo " ";
  170. if ($this->env->getExtension('Grav\Common\Twig\TwigExtension')->authorize(array(0 => "admin.plugins", 1 => "admin.super"))) {
  171. // line 55
  172. echo " <li class=\"";
  173. echo (((($context["location"] ?? null) == "plugins")) ? ("selected") : (""));
  174. echo "\">
  175. <a href=\"";
  176. // line 56
  177. echo twig_escape_filter($this->env, ($context["base_url_relative"] ?? null), "html", null, true);
  178. echo "/plugins\">
  179. <i class=\"fa fa-fw fa-plug\"></i>
  180. <em>";
  181. // line 58
  182. echo twig_escape_filter($this->env, $this->env->getExtension('Grav\Plugin\Admin\AdminTwigExtension')->tuFilter("PLUGIN_ADMIN.PLUGINS"), "html", null, true);
  183. echo "</em>
  184. <span class=\"badges\">
  185. <span class=\"badge updates\"></span>
  186. <span class=\"badge count\">";
  187. // line 61
  188. echo twig_escape_filter($this->env, twig_length_filter($this->env, $this->getAttribute(($context["admin"] ?? null), "plugins", array())), "html", null, true);
  189. echo "</span>
  190. </span>
  191. </a>
  192. </li>
  193. ";
  194. }
  195. // line 66
  196. echo " ";
  197. if ($this->env->getExtension('Grav\Common\Twig\TwigExtension')->authorize(array(0 => "admin.themes", 1 => "admin.super"))) {
  198. // line 67
  199. echo " <li class=\"";
  200. echo (((($context["location"] ?? null) == "themes")) ? ("selected") : (""));
  201. echo "\">
  202. <a href=\"";
  203. // line 68
  204. echo twig_escape_filter($this->env, ($context["base_url_relative"] ?? null), "html", null, true);
  205. echo "/themes\">
  206. <i class=\"fa fa-fw fa-tint\"></i>
  207. <em>";
  208. // line 70
  209. echo twig_escape_filter($this->env, $this->env->getExtension('Grav\Plugin\Admin\AdminTwigExtension')->tuFilter("PLUGIN_ADMIN.THEMES"), "html", null, true);
  210. echo "</em>
  211. <span class=\"badges\">
  212. <span class=\"badge updates\"></span>
  213. <span class=\"badge count\">";
  214. // line 73
  215. echo twig_escape_filter($this->env, twig_length_filter($this->env, $this->getAttribute(($context["admin"] ?? null), "themes", array())), "html", null, true);
  216. echo "</span>
  217. </span>
  218. </a>
  219. </li>
  220. ";
  221. }
  222. // line 78
  223. echo " ";
  224. if ($this->env->getExtension('Grav\Common\Twig\TwigExtension')->authorize(array(0 => "admin.tools", 1 => "admin.super"))) {
  225. // line 79
  226. echo " <li class=\"";
  227. echo (((($context["location"] ?? null) == "tools")) ? ("selected") : (""));
  228. echo "\">
  229. <a href=\"";
  230. // line 80
  231. echo twig_escape_filter($this->env, ($context["base_url_relative"] ?? null), "html", null, true);
  232. echo "/tools\">
  233. <i class=\"fa fa-fw fa-briefcase\"></i>
  234. <em>";
  235. // line 82
  236. echo twig_escape_filter($this->env, $this->env->getExtension('Grav\Plugin\Admin\AdminTwigExtension')->tuFilter("PLUGIN_ADMIN.TOOLS"), "html", null, true);
  237. echo "</em>
  238. </a>
  239. </li>
  240. ";
  241. }
  242. // line 86
  243. echo "
  244. ";
  245. // line 87
  246. try {
  247. $this->loadTemplate("partials/nav-pro.html.twig", "partials/nav.html.twig", 87)->display($context);
  248. } catch (Twig_Error_Loader $e) {
  249. // ignore missing template
  250. }
  251. // line 88
  252. echo "
  253. <li>
  254. <a href=\"";
  255. // line 90
  256. echo twig_escape_filter($this->env, $this->getAttribute(($context["uri"] ?? null), "addNonce", array(0 => (((($context["base_url_relative"] ?? null) . "/task") . $this->getAttribute($this->getAttribute(($context["config"] ?? null), "system", array()), "param_sep", array())) . "logout"), 1 => "logout-form", 2 => "logout-nonce"), "method"), "html", null, true);
  257. echo "\"><i class=\"fa fa-fw fa-sign-out\"></i><em>";
  258. echo twig_escape_filter($this->env, $this->env->getExtension('Grav\Plugin\Admin\AdminTwigExtension')->tuFilter("PLUGIN_ADMIN.LOGOUT"), "html", null, true);
  259. echo "</em></a>
  260. </li>
  261. </ul>
  262. </div>
  263. </nav>
  264. ";
  265. }
  266. }
  267. public function getTemplateName()
  268. {
  269. return "partials/nav.html.twig";
  270. }
  271. public function isTraitable()
  272. {
  273. return false;
  274. }
  275. public function getDebugInfo()
  276. {
  277. return array ( 262 => 90, 258 => 88, 251 => 87, 248 => 86, 241 => 82, 236 => 80, 231 => 79, 228 => 78, 220 => 73, 214 => 70, 209 => 68, 204 => 67, 201 => 66, 193 => 61, 187 => 58, 182 => 56, 177 => 55, 174 => 54, 171 => 53, 165 => 52, 160 => 49, 153 => 46, 147 => 45, 140 => 44, 138 => 43, 134 => 42, 130 => 41, 124 => 40, 119 => 39, 116 => 38, 111 => 37, 108 => 36, 100 => 31, 95 => 29, 90 => 27, 85 => 26, 82 => 25, 74 => 22, 69 => 21, 67 => 20, 60 => 18, 56 => 17, 51 => 14, 49 => 13, 46 => 12, 44 => 11, 40 => 9, 38 => 8, 34 => 6, 30 => 4, 28 => 3, 21 => 2, 19 => 1,);
  278. }
  279. /** @deprecated since 1.27 (to be removed in 2.0). Use getSourceContext() instead */
  280. public function getSource()
  281. {
  282. @trigger_error('The '.__METHOD__.' method is deprecated since version 1.27 and will be removed in 2.0. Use getSourceContext() instead.', E_USER_DEPRECATED);
  283. return $this->getSourceContext()->getCode();
  284. }
  285. public function getSourceContext()
  286. {
  287. return new Twig_Source("{% if authorize(['admin.login', 'admin.super']) %}
  288. <nav id=\"admin-sidebar\" data-quickopen=\"{{ config.plugins.admin.sidebar.activate == 'hover' ? 'true' : 'false' }}\" data-quickopen-delay=\"{{ config.plugins.admin.sidebar.hover_delay }}\">
  289. {% if config.plugins.admin.sidebar.activate != 'hover' %}
  290. <div id=\"open-handle\" data-sidebar-toggle><i class=\"fa fa-angle-double-right\"></i></div>
  291. {% endif %}
  292. <div id=\"admin-logo\">
  293. {% include 'partials/logo.html.twig' %}
  294. </div>
  295. {% include 'partials/nav-user-details.html.twig' %}
  296. {% include 'partials/nav-quick-tray.html.twig' %}
  297. <div class=\"admin-menu-wrapper\">
  298. <ul id=\"admin-menu\">
  299. <li class=\"{{ (location == 'dashboard') ? 'selected' : '' }}\">
  300. <a href=\"{{ base_url_relative }}\"><i class=\"fa fa-fw fa-th\"></i><em>{{ \"PLUGIN_ADMIN.DASHBOARD\"|tu }}</em></a>
  301. </li>
  302. {% if authorize(['admin.configuration', 'admin.super']) %}
  303. <li class=\"{{ (location == 'system' or location == 'site' or location == 'config') ? 'selected' : '' }}\">
  304. <a href=\"{{ base_url_relative }}/config/system\"><i class=\"fa fa-fw fa-wrench\"></i><em>{{ \"PLUGIN_ADMIN.CONFIGURATION\"|tu }}</em></a>
  305. </li>
  306. {% endif %}
  307. {% if authorize(['admin.pages', 'admin.super']) %}
  308. <li class=\"{{ (location == 'pages') ? 'selected' : '' }}\">
  309. <a href=\"{{ base_url_relative }}/pages\">
  310. <i class=\"fa fa-fw fa-file-text-o\"></i>
  311. <em>{{ \"PLUGIN_ADMIN.PAGES\"|tu }}</em>
  312. <span class=\"badges\">
  313. <span class=\"badge count\">{{ admin.pagesCount }}</span>
  314. </span>
  315. </a>
  316. </li>
  317. {% endif %}
  318. {% if grav.twig.plugins_hooked_nav %}
  319. {% for label, item in grav.twig.plugins_hooked_nav %}
  320. {% if authorize((item.authorize is defined and item.authorize is iterable) ? item.authorize : [item.authorize ?: ('admin.' ~ (item.location ?: item.route)), 'admin.super']) %}
  321. <li class=\"{{ (location == (item.location ?: item.route)) ? 'selected' : '' }}\">
  322. <a href=\"{{ base_url_relative }}/{{ item.route ?: item.location }}\">
  323. <i class=\"fa fa-fw {{ item.icon }}\"></i>
  324. <em>{{ label|tu }}</em>
  325. {% if item.badge %}
  326. <span class=\"badges {% if item.badge.updates is defined %}with-updates{% endif %}\">
  327. {% if item.badge.updates is defined %}<span class=\"badge updates\">{{ item.badge.updates }}</span>{% endif %}
  328. <span class=\"badge count\">{{ item.badge.count }}</span>
  329. </span>
  330. {% endif %}
  331. </a>
  332. </li>
  333. {% endif %}
  334. {% endfor %}
  335. {% endif %}
  336. {% if authorize(['admin.plugins', 'admin.super']) %}
  337. <li class=\"{{ (location == 'plugins') ? 'selected' : '' }}\">
  338. <a href=\"{{ base_url_relative }}/plugins\">
  339. <i class=\"fa fa-fw fa-plug\"></i>
  340. <em>{{ \"PLUGIN_ADMIN.PLUGINS\"|tu }}</em>
  341. <span class=\"badges\">
  342. <span class=\"badge updates\"></span>
  343. <span class=\"badge count\">{{ admin.plugins|length }}</span>
  344. </span>
  345. </a>
  346. </li>
  347. {% endif %}
  348. {% if authorize(['admin.themes', 'admin.super']) %}
  349. <li class=\"{{ (location == 'themes') ? 'selected' : '' }}\">
  350. <a href=\"{{ base_url_relative }}/themes\">
  351. <i class=\"fa fa-fw fa-tint\"></i>
  352. <em>{{ \"PLUGIN_ADMIN.THEMES\"|tu }}</em>
  353. <span class=\"badges\">
  354. <span class=\"badge updates\"></span>
  355. <span class=\"badge count\">{{ admin.themes|length }}</span>
  356. </span>
  357. </a>
  358. </li>
  359. {% endif %}
  360. {% if authorize(['admin.tools', 'admin.super']) %}
  361. <li class=\"{{ (location == 'tools') ? 'selected' : '' }}\">
  362. <a href=\"{{ base_url_relative }}/tools\">
  363. <i class=\"fa fa-fw fa-briefcase\"></i>
  364. <em>{{ \"PLUGIN_ADMIN.TOOLS\"|tu }}</em>
  365. </a>
  366. </li>
  367. {% endif %}
  368. {% include 'partials/nav-pro.html.twig' ignore missing %}
  369. <li>
  370. <a href=\"{{ uri.addNonce(base_url_relative ~ '/task' ~ config.system.param_sep ~ 'logout', 'logout-form', 'logout-nonce') }}\"><i class=\"fa fa-fw fa-sign-out\"></i><em>{{ \"PLUGIN_ADMIN.LOGOUT\"|tu }}</em></a>
  371. </li>
  372. </ul>
  373. </div>
  374. </nav>
  375. {% endif %}
  376. ", "partials/nav.html.twig", "/mnt/data/Sites/static-ethica.net/user/plugins/admin/themes/grav/templates/partials/nav.html.twig");
  377. }
  378. }