ebdf4b0b7a11851ed7d2c5fa2a4794de775422c501c926062b22055f4f06fea7.php 21 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366
  1. <?php
  2. /* dashboard.html.twig */
  3. class __TwigTemplate_bb909058d0091bbe701e346d80e7a7d14013f7a8c46933c41cab02e6bc46d0d2 extends Twig_Template
  4. {
  5. public function __construct(Twig_Environment $env)
  6. {
  7. parent::__construct($env);
  8. // line 1
  9. $this->parent = $this->loadTemplate("partials/base.html.twig", "dashboard.html.twig", 1);
  10. $this->blocks = array(
  11. 'titlebar' => array($this, 'block_titlebar'),
  12. 'widgets' => array($this, 'block_widgets'),
  13. 'content' => array($this, 'block_content'),
  14. 'content_bottom' => array($this, 'block_content_bottom'),
  15. );
  16. }
  17. protected function doGetParent(array $context)
  18. {
  19. return "partials/base.html.twig";
  20. }
  21. protected function doDisplay(array $context, array $blocks = array())
  22. {
  23. // line 3
  24. $context["title"] = $this->env->getExtension('Grav\Plugin\Admin\AdminTwigExtension')->tuFilter("PLUGIN_ADMIN.DASHBOARD");
  25. // line 5
  26. $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"));
  27. // line 1
  28. $this->parent->display($context, array_merge($this->blocks, $blocks));
  29. }
  30. // line 7
  31. public function block_titlebar($context, array $blocks = array())
  32. {
  33. // line 8
  34. echo " <div class=\"button-bar\">
  35. ";
  36. // line 9
  37. if ($this->env->getExtension('Grav\Common\Twig\TwigExtension')->authorize(array(0 => "admin.maintenance", 1 => "admin.super", 2 => "admin.cache"))) {
  38. // line 10
  39. echo " <div class=\"button-group\">
  40. <button data-clear-cache-type=\"\" data-clear-cache=\"";
  41. // line 11
  42. 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);
  43. echo "\" class=\"button\"><i class=\"fa fa-trash\"></i> ";
  44. echo twig_escape_filter($this->env, $this->env->getExtension('Grav\Plugin\Admin\AdminTwigExtension')->tuFilter("PLUGIN_ADMIN.CLEAR_CACHE"), "html", null, true);
  45. echo "</button>
  46. <button type=\"button\" class=\"button dropdown-toggle\" data-toggle=\"dropdown\">
  47. <i class=\"fa fa-caret-down\"></i>
  48. </button>
  49. <ul class=\"dropdown-menu\">
  50. <li><a data-clear-cache-type=\"all\" data-clear-cache=\"";
  51. // line 16
  52. echo twig_escape_filter($this->env, $this->getAttribute(($context["uri"] ?? null), "addNonce", array(0 => (((($context["clear_cache_url"] ?? null) . "/cleartype") . $this->getAttribute($this->getAttribute(($context["config"] ?? null), "system", array()), "param_sep", array())) . "all"), 1 => "admin-form", 2 => "admin-nonce"), "method"), "html", null, true);
  53. echo "\" href=\"#\">";
  54. echo twig_escape_filter($this->env, $this->env->getExtension('Grav\Plugin\Admin\AdminTwigExtension')->tuFilter("PLUGIN_ADMIN.CLEAR_CACHE_ALL_CACHE"), "html", null, true);
  55. echo "</a></li>
  56. <li><a data-clear-cache-type=\"assets-only\" data-clear-cache=\"";
  57. // line 17
  58. echo twig_escape_filter($this->env, $this->getAttribute(($context["uri"] ?? null), "addNonce", array(0 => (((($context["clear_cache_url"] ?? null) . "/cleartype") . $this->getAttribute($this->getAttribute(($context["config"] ?? null), "system", array()), "param_sep", array())) . "assets-only"), 1 => "admin-form", 2 => "admin-nonce"), "method"), "html", null, true);
  59. echo "\" href=\"#\">";
  60. echo twig_escape_filter($this->env, $this->env->getExtension('Grav\Plugin\Admin\AdminTwigExtension')->tuFilter("PLUGIN_ADMIN.CLEAR_CACHE_ASSETS_ONLY"), "html", null, true);
  61. echo "</a></li>
  62. <li><a data-clear-cache-type=\"images-only\" data-clear-cache=\"";
  63. // line 18
  64. echo twig_escape_filter($this->env, $this->getAttribute(($context["uri"] ?? null), "addNonce", array(0 => (((($context["clear_cache_url"] ?? null) . "/cleartype") . $this->getAttribute($this->getAttribute(($context["config"] ?? null), "system", array()), "param_sep", array())) . "images-only"), 1 => "admin-form", 2 => "admin-nonce"), "method"), "html", null, true);
  65. echo "\" href=\"#\">";
  66. echo twig_escape_filter($this->env, $this->env->getExtension('Grav\Plugin\Admin\AdminTwigExtension')->tuFilter("PLUGIN_ADMIN.CLEAR_CACHE_IMAGES_ONLY"), "html", null, true);
  67. echo "</a></li>
  68. <li><a data-clear-cache-type=\"cache-only\" data-clear-cache=\"";
  69. // line 19
  70. echo twig_escape_filter($this->env, $this->getAttribute(($context["uri"] ?? null), "addNonce", array(0 => (((($context["clear_cache_url"] ?? null) . "/cleartype") . $this->getAttribute($this->getAttribute(($context["config"] ?? null), "system", array()), "param_sep", array())) . "cache-only"), 1 => "admin-form", 2 => "admin-nonce"), "method"), "html", null, true);
  71. echo "\" href=\"#\">";
  72. echo twig_escape_filter($this->env, $this->env->getExtension('Grav\Plugin\Admin\AdminTwigExtension')->tuFilter("PLUGIN_ADMIN.CLEAR_CACHE_CACHE_ONLY"), "html", null, true);
  73. echo "</a></li>
  74. <li><a data-clear-cache-type=\"tmp-only\" data-clear-cache=\"";
  75. // line 20
  76. echo twig_escape_filter($this->env, $this->getAttribute(($context["uri"] ?? null), "addNonce", array(0 => (((($context["clear_cache_url"] ?? null) . "/cleartype") . $this->getAttribute($this->getAttribute(($context["config"] ?? null), "system", array()), "param_sep", array())) . "tmp-only"), 1 => "admin-form", 2 => "admin-nonce"), "method"), "html", null, true);
  77. echo "\" href=\"#\">";
  78. echo twig_escape_filter($this->env, $this->env->getExtension('Grav\Plugin\Admin\AdminTwigExtension')->tuFilter("PLUGIN_ADMIN.CLEAR_CACHE_TMP_ONLY"), "html", null, true);
  79. echo "</a></li>
  80. </ul>
  81. </div>
  82. ";
  83. }
  84. // line 24
  85. echo " ";
  86. if ($this->env->getExtension('Grav\Common\Twig\TwigExtension')->authorize(array(0 => "admin.maintenance", 1 => "admin.super"))) {
  87. // line 25
  88. echo " <button data-gpm-checkupdates=\"\" class=\"button\"><i class=\"fa fa-refresh\"></i> ";
  89. echo twig_escape_filter($this->env, $this->env->getExtension('Grav\Plugin\Admin\AdminTwigExtension')->tuFilter("PLUGIN_ADMIN.CHECK_FOR_UPDATES"), "html", null, true);
  90. echo "</button>
  91. ";
  92. }
  93. // line 27
  94. echo " </div>
  95. <h1><i class=\"fa fa-fw fa-th\"></i> ";
  96. // line 28
  97. echo twig_escape_filter($this->env, $this->env->getExtension('Grav\Plugin\Admin\AdminTwigExtension')->tuFilter("PLUGIN_ADMIN.DASHBOARD"), "html", null, true);
  98. echo "</h1>
  99. ";
  100. }
  101. // line 31
  102. public function block_widgets($context, array $blocks = array())
  103. {
  104. // line 32
  105. echo " ";
  106. if ($this->getAttribute($this->getAttribute($this->getAttribute($this->getAttribute(($context["config"] ?? null), "plugins", array()), "admin", array()), "notifications", array()), "dashboard", array())) {
  107. // line 33
  108. echo " <div class=\"dashboard-notifications-container\"></div>
  109. ";
  110. }
  111. // line 35
  112. echo "
  113. <div id=\"admin-dashboard\">
  114. ";
  115. // line 37
  116. if ($this->getAttribute($this->getAttribute(($context["grav"] ?? null), "twig", array()), "plugins_hooked_dashboard_widgets_top", array())) {
  117. // line 38
  118. echo " ";
  119. $context['_parent'] = $context;
  120. $context['_seq'] = twig_ensure_traversable($this->getAttribute($this->getAttribute(($context["grav"] ?? null), "twig", array()), "plugins_hooked_dashboard_widgets_top", array()));
  121. $context['loop'] = array(
  122. 'parent' => $context['_parent'],
  123. 'index0' => 0,
  124. 'index' => 1,
  125. 'first' => true,
  126. );
  127. if (is_array($context['_seq']) || (is_object($context['_seq']) && $context['_seq'] instanceof Countable)) {
  128. $length = count($context['_seq']);
  129. $context['loop']['revindex0'] = $length - 1;
  130. $context['loop']['revindex'] = $length;
  131. $context['loop']['length'] = $length;
  132. $context['loop']['last'] = 1 === $length;
  133. }
  134. foreach ($context['_seq'] as $context["_key"] => $context["widget"]) {
  135. // line 39
  136. echo " ";
  137. if (($this->getAttribute($this->getAttribute($this->getAttribute($this->getAttribute(($context["config"] ?? null), "plugins", array()), "admin", array()), "widgets", array()), $this->getAttribute($context["widget"], "template", array())) == true)) {
  138. // line 40
  139. echo " <div class=\"dashboard-item-flex\">
  140. ";
  141. // line 41
  142. $this->loadTemplate((("partials/" . $this->getAttribute($context["widget"], "template", array())) . ".html.twig"), "dashboard.html.twig", 41)->display($context);
  143. // line 42
  144. echo " </div>
  145. ";
  146. }
  147. // line 44
  148. echo " ";
  149. ++$context['loop']['index0'];
  150. ++$context['loop']['index'];
  151. $context['loop']['first'] = false;
  152. if (isset($context['loop']['length'])) {
  153. --$context['loop']['revindex0'];
  154. --$context['loop']['revindex'];
  155. $context['loop']['last'] = 0 === $context['loop']['revindex0'];
  156. }
  157. }
  158. $_parent = $context['_parent'];
  159. unset($context['_seq'], $context['_iterated'], $context['_key'], $context['widget'], $context['_parent'], $context['loop']);
  160. $context = array_intersect_key($context, $_parent) + $_parent;
  161. // line 45
  162. echo " ";
  163. }
  164. // line 46
  165. echo " </div>
  166. ";
  167. }
  168. // line 49
  169. public function block_content($context, array $blocks = array())
  170. {
  171. // line 50
  172. if ($this->getAttribute($this->getAttribute(($context["grav"] ?? null), "twig", array()), "plugins_hooked_dashboard_widgets_main", array())) {
  173. // line 51
  174. $context['_parent'] = $context;
  175. $context['_seq'] = twig_ensure_traversable($this->getAttribute($this->getAttribute(($context["grav"] ?? null), "twig", array()), "plugins_hooked_dashboard_widgets_main", array()));
  176. $context['loop'] = array(
  177. 'parent' => $context['_parent'],
  178. 'index0' => 0,
  179. 'index' => 1,
  180. 'first' => true,
  181. );
  182. if (is_array($context['_seq']) || (is_object($context['_seq']) && $context['_seq'] instanceof Countable)) {
  183. $length = count($context['_seq']);
  184. $context['loop']['revindex0'] = $length - 1;
  185. $context['loop']['revindex'] = $length;
  186. $context['loop']['length'] = $length;
  187. $context['loop']['last'] = 1 === $length;
  188. }
  189. foreach ($context['_seq'] as $context["_key"] => $context["widget"]) {
  190. // line 52
  191. if (($this->getAttribute($this->getAttribute($this->getAttribute($this->getAttribute(($context["config"] ?? null), "plugins", array()), "admin", array()), "widgets", array()), $this->getAttribute($context["widget"], "template", array())) == true)) {
  192. // line 53
  193. echo " ";
  194. $this->loadTemplate((("partials/" . $this->getAttribute($context["widget"], "template", array())) . ".html.twig"), "dashboard.html.twig", 53)->display($context);
  195. // line 54
  196. echo " ";
  197. }
  198. ++$context['loop']['index0'];
  199. ++$context['loop']['index'];
  200. $context['loop']['first'] = false;
  201. if (isset($context['loop']['length'])) {
  202. --$context['loop']['revindex0'];
  203. --$context['loop']['revindex'];
  204. $context['loop']['last'] = 0 === $context['loop']['revindex0'];
  205. }
  206. }
  207. $_parent = $context['_parent'];
  208. unset($context['_seq'], $context['_iterated'], $context['_key'], $context['widget'], $context['_parent'], $context['loop']);
  209. $context = array_intersect_key($context, $_parent) + $_parent;
  210. }
  211. }
  212. // line 59
  213. public function block_content_bottom($context, array $blocks = array())
  214. {
  215. // line 60
  216. echo " <div id=\"admin-dashboard\">";
  217. // line 61
  218. if ($this->getAttribute($this->getAttribute(($context["grav"] ?? null), "twig", array()), "plugins_hooked_dashboard_widgets_bottom", array())) {
  219. // line 62
  220. $context['_parent'] = $context;
  221. $context['_seq'] = twig_ensure_traversable($this->getAttribute($this->getAttribute(($context["grav"] ?? null), "twig", array()), "plugins_hooked_dashboard_widgets_bottom", array()));
  222. $context['loop'] = array(
  223. 'parent' => $context['_parent'],
  224. 'index0' => 0,
  225. 'index' => 1,
  226. 'first' => true,
  227. );
  228. if (is_array($context['_seq']) || (is_object($context['_seq']) && $context['_seq'] instanceof Countable)) {
  229. $length = count($context['_seq']);
  230. $context['loop']['revindex0'] = $length - 1;
  231. $context['loop']['revindex'] = $length;
  232. $context['loop']['length'] = $length;
  233. $context['loop']['last'] = 1 === $length;
  234. }
  235. foreach ($context['_seq'] as $context["_key"] => $context["widget"]) {
  236. // line 63
  237. if (($this->getAttribute($this->getAttribute($this->getAttribute($this->getAttribute(($context["config"] ?? null), "plugins", array()), "admin", array()), "widgets", array()), $this->getAttribute($context["widget"], "template", array())) == true)) {
  238. // line 64
  239. echo " ";
  240. $this->loadTemplate((("partials/" . $this->getAttribute($context["widget"], "template", array())) . ".html.twig"), "dashboard.html.twig", 64)->display($context);
  241. // line 65
  242. echo " ";
  243. }
  244. ++$context['loop']['index0'];
  245. ++$context['loop']['index'];
  246. $context['loop']['first'] = false;
  247. if (isset($context['loop']['length'])) {
  248. --$context['loop']['revindex0'];
  249. --$context['loop']['revindex'];
  250. $context['loop']['last'] = 0 === $context['loop']['revindex0'];
  251. }
  252. }
  253. $_parent = $context['_parent'];
  254. unset($context['_seq'], $context['_iterated'], $context['_key'], $context['widget'], $context['_parent'], $context['loop']);
  255. $context = array_intersect_key($context, $_parent) + $_parent;
  256. }
  257. // line 68
  258. echo "</div>
  259. ";
  260. }
  261. public function getTemplateName()
  262. {
  263. return "dashboard.html.twig";
  264. }
  265. public function isTraitable()
  266. {
  267. return false;
  268. }
  269. public function getDebugInfo()
  270. {
  271. return array ( 266 => 68, 250 => 65, 247 => 64, 245 => 63, 228 => 62, 226 => 61, 224 => 60, 221 => 59, 203 => 54, 200 => 53, 198 => 52, 181 => 51, 179 => 50, 176 => 49, 171 => 46, 168 => 45, 154 => 44, 150 => 42, 148 => 41, 145 => 40, 142 => 39, 124 => 38, 122 => 37, 118 => 35, 114 => 33, 111 => 32, 108 => 31, 102 => 28, 99 => 27, 93 => 25, 90 => 24, 81 => 20, 75 => 19, 69 => 18, 63 => 17, 57 => 16, 47 => 11, 44 => 10, 42 => 9, 39 => 8, 36 => 7, 32 => 1, 30 => 5, 28 => 3, 11 => 1,);
  272. }
  273. /** @deprecated since 1.27 (to be removed in 2.0). Use getSourceContext() instead */
  274. public function getSource()
  275. {
  276. @trigger_error('The '.__METHOD__.' method is deprecated since version 1.27 and will be removed in 2.0. Use getSourceContext() instead.', E_USER_DEPRECATED);
  277. return $this->getSourceContext()->getCode();
  278. }
  279. public function getSourceContext()
  280. {
  281. return new Twig_Source("{% extends 'partials/base.html.twig' %}
  282. {% set title = \"PLUGIN_ADMIN.DASHBOARD\"|tu %}
  283. {% set clear_cache_url = base_url_relative ~ '/cache.json/task' ~ config.system.param_sep ~ 'clearCache'|e('html_attr') %}
  284. {% block titlebar %}
  285. <div class=\"button-bar\">
  286. {% if authorize(['admin.maintenance', 'admin.super', 'admin.cache']) %}
  287. <div class=\"button-group\">
  288. <button data-clear-cache-type=\"\" data-clear-cache=\"{{ uri.addNonce(clear_cache_url, 'admin-form', 'admin-nonce') }}\" class=\"button\"><i class=\"fa fa-trash\"></i> {{ \"PLUGIN_ADMIN.CLEAR_CACHE\"|tu }}</button>
  289. <button type=\"button\" class=\"button dropdown-toggle\" data-toggle=\"dropdown\">
  290. <i class=\"fa fa-caret-down\"></i>
  291. </button>
  292. <ul class=\"dropdown-menu\">
  293. <li><a data-clear-cache-type=\"all\" data-clear-cache=\"{{ uri.addNonce(clear_cache_url ~'/cleartype' ~ config.system.param_sep ~ 'all', 'admin-form', 'admin-nonce') }}\" href=\"#\">{{ \"PLUGIN_ADMIN.CLEAR_CACHE_ALL_CACHE\"|tu }}</a></li>
  294. <li><a data-clear-cache-type=\"assets-only\" data-clear-cache=\"{{ uri.addNonce(clear_cache_url ~'/cleartype' ~ config.system.param_sep ~ 'assets-only', 'admin-form', 'admin-nonce') }}\" href=\"#\">{{ \"PLUGIN_ADMIN.CLEAR_CACHE_ASSETS_ONLY\"|tu }}</a></li>
  295. <li><a data-clear-cache-type=\"images-only\" data-clear-cache=\"{{ uri.addNonce(clear_cache_url ~'/cleartype' ~ config.system.param_sep ~ 'images-only', 'admin-form', 'admin-nonce') }}\" href=\"#\">{{ \"PLUGIN_ADMIN.CLEAR_CACHE_IMAGES_ONLY\"|tu }}</a></li>
  296. <li><a data-clear-cache-type=\"cache-only\" data-clear-cache=\"{{ uri.addNonce(clear_cache_url ~'/cleartype' ~ config.system.param_sep ~ 'cache-only', 'admin-form', 'admin-nonce') }}\" href=\"#\">{{ \"PLUGIN_ADMIN.CLEAR_CACHE_CACHE_ONLY\"|tu }}</a></li>
  297. <li><a data-clear-cache-type=\"tmp-only\" data-clear-cache=\"{{ uri.addNonce(clear_cache_url ~'/cleartype' ~ config.system.param_sep ~ 'tmp-only', 'admin-form', 'admin-nonce') }}\" href=\"#\">{{ \"PLUGIN_ADMIN.CLEAR_CACHE_TMP_ONLY\"|tu }}</a></li>
  298. </ul>
  299. </div>
  300. {% endif %}
  301. {% if authorize(['admin.maintenance', 'admin.super']) %}
  302. <button data-gpm-checkupdates=\"\" class=\"button\"><i class=\"fa fa-refresh\"></i> {{ \"PLUGIN_ADMIN.CHECK_FOR_UPDATES\"|tu }}</button>
  303. {% endif %}
  304. </div>
  305. <h1><i class=\"fa fa-fw fa-th\"></i> {{ \"PLUGIN_ADMIN.DASHBOARD\"|tu }}</h1>
  306. {% endblock %}
  307. {% block widgets %}
  308. {% if config.plugins.admin.notifications.dashboard %}
  309. <div class=\"dashboard-notifications-container\"></div>
  310. {% endif %}
  311. <div id=\"admin-dashboard\">
  312. {% if grav.twig.plugins_hooked_dashboard_widgets_top %}
  313. {% for widget in grav.twig.plugins_hooked_dashboard_widgets_top %}
  314. {% if attribute(config.plugins.admin.widgets, widget.template) == true %}
  315. <div class=\"dashboard-item-flex\">
  316. {% include 'partials/' ~ widget.template ~ '.html.twig' %}
  317. </div>
  318. {% endif %}
  319. {% endfor %}
  320. {% endif %}
  321. </div>
  322. {% endblock %}
  323. {% block content %}
  324. {%- if grav.twig.plugins_hooked_dashboard_widgets_main -%}
  325. {%- for widget in grav.twig.plugins_hooked_dashboard_widgets_main -%}
  326. {%- if attribute(config.plugins.admin.widgets, widget.template) == true %}
  327. {% include 'partials/' ~ widget.template ~ '.html.twig' %}
  328. {% endif -%}
  329. {%- endfor -%}
  330. {%- endif -%}
  331. {% endblock %}
  332. {% block content_bottom %}
  333. <div id=\"admin-dashboard\">
  334. {%- if grav.twig.plugins_hooked_dashboard_widgets_bottom -%}
  335. {%- for widget in grav.twig.plugins_hooked_dashboard_widgets_bottom -%}
  336. {%- if attribute(config.plugins.admin.widgets, widget.template) == true %}
  337. {% include 'partials/' ~ widget.template ~ '.html.twig' %}
  338. {% endif -%}
  339. {%- endfor -%}
  340. {%- endif -%}
  341. </div>
  342. {% endblock %}
  343. ", "dashboard.html.twig", "/mnt/data/Sites/static-ethica.net/user/plugins/admin/themes/grav/templates/dashboard.html.twig");
  344. }
  345. }