92052c1f45d1ca3b0b45198646fda2578e289f6601572800a5e0d17d050ced32.php 10.0 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203
  1. <?php
  2. /* partials/nav-quick-tray.html.twig */
  3. class __TwigTemplate_ad2b278d643db938e2ceff6c2b5b7426ff04a6e23567f15f794a6f6e1b93110d 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. $context["clear_cache_url"] = (((($context["base_url_relative"] ?? null) . "/cache.json/task") . $this->getAttribute($this->getAttribute(($context["config"] ?? null), "system", array()), "param_sep", array())) . twig_escape_filter($this->env, "clearCache", "html_attr"));
  16. // line 2
  17. echo "<ul id=\"admin-nav-quick-tray\">
  18. ";
  19. // line 3
  20. if ($this->env->getExtension('Grav\Common\Twig\TwigExtension')->authorize(array(0 => "admin.maintenance", 1 => "admin.super", 2 => "admin.cache"))) {
  21. // line 4
  22. echo " <li class=\"hint--bottom\" data-hint=\"";
  23. echo twig_escape_filter($this->env, $this->env->getExtension('Grav\Plugin\Admin\Twig\AdminTwigExtension')->tuFilter("PLUGIN_ADMIN.CLEAR_CACHE"), "html", null, true);
  24. echo "\">
  25. <a data-clear-cache-type=\"\" data-clear-cache=\"";
  26. // line 5
  27. echo twig_escape_filter($this->env, $this->getAttribute(($context["uri"] ?? null), "addNonce", array(0 => ($context["clear_cache_url"] ?? null), 1 => "admin-form", 2 => "admin-nonce"), "method"), "html", null, true);
  28. echo "\">
  29. <i class=\"fa fa-trash\"></i>
  30. </a>
  31. </li>
  32. ";
  33. }
  34. // line 10
  35. echo " ";
  36. if ($this->getAttribute($this->getAttribute(($context["grav"] ?? null), "twig", array()), "plugins_quick_tray", array())) {
  37. // line 11
  38. echo " ";
  39. $context['_parent'] = $context;
  40. $context['_seq'] = twig_ensure_traversable($this->getAttribute($this->getAttribute(($context["grav"] ?? null), "twig", array()), "plugins_quick_tray", array()));
  41. foreach ($context['_seq'] as $context["label"] => $context["item"]) {
  42. // line 12
  43. echo " ";
  44. 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"))))) {
  45. // line 13
  46. echo " ";
  47. $context["data_tags"] = "";
  48. // line 14
  49. echo " ";
  50. if ($this->getAttribute($context["item"], "data", array())) {
  51. // line 15
  52. echo " ";
  53. $context['_parent'] = $context;
  54. $context['_seq'] = twig_ensure_traversable($this->getAttribute($context["item"], "data", array()));
  55. foreach ($context['_seq'] as $context["key"] => $context["value"]) {
  56. // line 16
  57. echo " ";
  58. $context["data_tags"] = (((((($context["data_tags"] ?? null) . " data-") . $context["key"]) . "=\"") . $context["value"]) . "\"");
  59. // line 17
  60. echo " ";
  61. }
  62. $_parent = $context['_parent'];
  63. unset($context['_seq'], $context['_iterated'], $context['key'], $context['value'], $context['_parent'], $context['loop']);
  64. $context = array_intersect_key($context, $_parent) + $_parent;
  65. // line 18
  66. echo " ";
  67. }
  68. // line 19
  69. echo " <li class=\"";
  70. echo twig_escape_filter($this->env, $this->getAttribute($context["item"], "class", array()), "html", null, true);
  71. echo " hint--bottom\" data-hint=\"";
  72. echo twig_escape_filter($this->env, $this->getAttribute($context["item"], "hint", array()), "html", null, true);
  73. echo "\" ";
  74. echo ($context["data_tags"] ?? null);
  75. echo ">
  76. ";
  77. // line 20
  78. if ($this->getAttribute($context["item"], "route", array())) {
  79. // line 21
  80. echo " <a href=\"";
  81. echo twig_escape_filter($this->env, $this->env->getExtension('Grav\Common\Twig\TwigExtension')->urlFunc($this->getAttribute($context["item"], "route", array())), "html", null, true);
  82. echo "\">
  83. <i class=\"fa fa-fw ";
  84. // line 22
  85. echo twig_escape_filter($this->env, $this->getAttribute($context["item"], "icon", array()), "html", null, true);
  86. echo "\"></i>
  87. </a>
  88. ";
  89. } else {
  90. // line 25
  91. echo " <i class=\"fa fa-fw ";
  92. echo twig_escape_filter($this->env, $this->getAttribute($context["item"], "icon", array()), "html", null, true);
  93. echo "\"></i>
  94. ";
  95. }
  96. // line 27
  97. echo " </li>
  98. ";
  99. }
  100. // line 29
  101. echo " ";
  102. }
  103. $_parent = $context['_parent'];
  104. unset($context['_seq'], $context['_iterated'], $context['label'], $context['item'], $context['_parent'], $context['loop']);
  105. $context = array_intersect_key($context, $_parent) + $_parent;
  106. // line 30
  107. echo " ";
  108. } else {
  109. // line 31
  110. echo " ";
  111. if ($this->env->getExtension('Grav\Common\Twig\TwigExtension')->authorize(array(0 => "admin.maintenance", 1 => "admin.super"))) {
  112. // line 32
  113. echo " <li class=\"hint--bottom\" data-hint=\"Add the 'quick-tray-links' plugin for more...\">
  114. <a href=\"";
  115. // line 33
  116. echo twig_escape_filter($this->env, (($context["base_url_relative"] ?? null) . "/plugins/install"), "html", null, true);
  117. echo "\">
  118. <i class=\"fa fa-plus\"></i>
  119. </a>
  120. </li>
  121. ";
  122. }
  123. // line 38
  124. echo " ";
  125. }
  126. // line 39
  127. echo "</ul>
  128. ";
  129. }
  130. public function getTemplateName()
  131. {
  132. return "partials/nav-quick-tray.html.twig";
  133. }
  134. public function isTraitable()
  135. {
  136. return false;
  137. }
  138. public function getDebugInfo()
  139. {
  140. return array ( 131 => 39, 128 => 38, 120 => 33, 117 => 32, 114 => 31, 111 => 30, 105 => 29, 101 => 27, 95 => 25, 89 => 22, 84 => 21, 82 => 20, 73 => 19, 70 => 18, 64 => 17, 61 => 16, 56 => 15, 53 => 14, 50 => 13, 47 => 12, 42 => 11, 39 => 10, 31 => 5, 26 => 4, 24 => 3, 21 => 2, 19 => 1,);
  141. }
  142. /** @deprecated since 1.27 (to be removed in 2.0). Use getSourceContext() instead */
  143. public function getSource()
  144. {
  145. @trigger_error('The '.__METHOD__.' method is deprecated since version 1.27 and will be removed in 2.0. Use getSourceContext() instead.', E_USER_DEPRECATED);
  146. return $this->getSourceContext()->getCode();
  147. }
  148. public function getSourceContext()
  149. {
  150. return new Twig_Source("{% set clear_cache_url = base_url_relative ~ '/cache.json/task' ~ config.system.param_sep ~ 'clearCache'|e('html_attr') %}
  151. <ul id=\"admin-nav-quick-tray\">
  152. {% if authorize(['admin.maintenance', 'admin.super', 'admin.cache']) %}
  153. <li class=\"hint--bottom\" data-hint=\"{{ \"PLUGIN_ADMIN.CLEAR_CACHE\"|tu }}\">
  154. <a data-clear-cache-type=\"\" data-clear-cache=\"{{ uri.addNonce(clear_cache_url, 'admin-form', 'admin-nonce') }}\">
  155. <i class=\"fa fa-trash\"></i>
  156. </a>
  157. </li>
  158. {% endif %}
  159. {% if grav.twig.plugins_quick_tray %}
  160. {% for label, item in grav.twig.plugins_quick_tray %}
  161. {% if authorize((item.authorize is defined and item.authorize is iterable) ? item.authorize : [item.authorize ?: ('admin.' ~ (item.location ?: item.route)), 'admin.super']) %}
  162. {% set data_tags = '' %}
  163. {% if (item.data) %}
  164. {% for key, value in item.data %}
  165. {% set data_tags = data_tags ~ ' data-' ~ key ~ '=\"' ~ value ~ '\"' %}
  166. {% endfor %}
  167. {% endif %}
  168. <li class=\"{{ item.class }} hint--bottom\" data-hint=\"{{ item.hint }}\" {{ data_tags|raw }}>
  169. {% if item.route %}
  170. <a href=\"{{ url(item.route) }}\">
  171. <i class=\"fa fa-fw {{ item.icon }}\"></i>
  172. </a>
  173. {% else %}
  174. <i class=\"fa fa-fw {{ item.icon }}\"></i>
  175. {% endif %}
  176. </li>
  177. {% endif %}
  178. {% endfor %}
  179. {% else %}
  180. {% if authorize(['admin.maintenance', 'admin.super']) %}
  181. <li class=\"hint--bottom\" data-hint=\"Add the 'quick-tray-links' plugin for more...\">
  182. <a href=\"{{ base_url_relative ~ '/plugins/install' }}\">
  183. <i class=\"fa fa-plus\"></i>
  184. </a>
  185. </li>
  186. {% endif %}
  187. {% endif %}
  188. </ul>
  189. ", "partials/nav-quick-tray.html.twig", "/mnt/data/Sites/r2c.net/user/plugins/admin/themes/grav/templates/partials/nav-quick-tray.html.twig");
  190. }
  191. }