95ec9d7d4df4e318fe893b25ecbd5bfb10d814b80fdf216567ca2fa5ccd9f90f.php 16 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356
  1. <?php
  2. /* plugins.html.twig */
  3. class __TwigTemplate_0a88cd3b15a7af726c8977a4aa739a6660822fc689730503854aaa7c8bc95780 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", "plugins.html.twig", 1);
  10. $this->blocks = array(
  11. 'stylesheets' => array($this, 'block_stylesheets'),
  12. 'javascripts' => array($this, 'block_javascripts'),
  13. 'titlebar' => array($this, 'block_titlebar'),
  14. 'messages' => array($this, 'block_messages'),
  15. 'content' => array($this, 'block_content'),
  16. );
  17. }
  18. protected function doGetParent(array $context)
  19. {
  20. return "partials/base.html.twig";
  21. }
  22. protected function doDisplay(array $context, array $blocks = array())
  23. {
  24. // line 3
  25. $context["plugin_slug"] = $this->getAttribute(($context["admin"] ?? null), "route", array());
  26. // line 5
  27. if (($context["plugin_slug"] ?? null)) {
  28. // line 6
  29. $context["installing"] = (is_string($__internal_f0cf81ce7681fda8f066184e9e8db4d5ef6086c109b9ff8a4ae05616dbb88373 = ($context["plugin_slug"] ?? null)) && is_string($__internal_5b12cae85121d9d6f71768c3760ec691341315eb682041435a4f11a2de7a791d = "install") && ('' === $__internal_5b12cae85121d9d6f71768c3760ec691341315eb682041435a4f11a2de7a791d || 0 === strpos($__internal_f0cf81ce7681fda8f066184e9e8db4d5ef6086c109b9ff8a4ae05616dbb88373, $__internal_5b12cae85121d9d6f71768c3760ec691341315eb682041435a4f11a2de7a791d)));
  30. // line 8
  31. if (($context["installing"] ?? null)) {
  32. // line 9
  33. $context["title"] = $this->env->getExtension('Grav\Plugin\Admin\AdminTwigExtension')->tuFilter("PLUGIN_ADMIN.PLUGINS");
  34. } else {
  35. // line 11
  36. $context["installed"] = true;
  37. // line 14
  38. $context["package"] = $this->getAttribute($this->getAttribute(($context["admin"] ?? null), "plugins", array(0 => true), "method"), $this->getAttribute(($context["admin"] ?? null), "route", array()), array(), "array");
  39. // line 15
  40. if ( !($context["package"] ?? null)) {
  41. // line 16
  42. $context["package"] = $this->getAttribute($this->getAttribute(($context["admin"] ?? null), "plugins", array(0 => false), "method"), $this->getAttribute(($context["admin"] ?? null), "route", array()), array(), "array");
  43. // line 17
  44. $context["installed"] = false;
  45. }
  46. // line 20
  47. $context["plugin"] = $this->getAttribute(($context["package"] ?? null), "toArray", array(), "method");
  48. // line 21
  49. $context["title"] = (($this->env->getExtension('Grav\Plugin\Admin\AdminTwigExtension')->tuFilter("PLUGIN_ADMIN.PLUGIN") . ": ") . twig_escape_filter($this->env, $this->getAttribute(($context["plugin"] ?? null), "name", array())));
  50. }
  51. } else {
  52. // line 24
  53. $context["title"] = $this->env->getExtension('Grav\Plugin\Admin\AdminTwigExtension')->tuFilter("PLUGIN_ADMIN.PLUGINS");
  54. }
  55. // line 27
  56. if (($this->getAttribute(($context["admin"] ?? null), "route", array()) || ($context["installing"] ?? null))) {
  57. }
  58. // line 1
  59. $this->parent->display($context, array_merge($this->blocks, $blocks));
  60. }
  61. // line 28
  62. public function block_stylesheets($context, array $blocks = array())
  63. {
  64. // line 29
  65. echo " ";
  66. $this->getAttribute(($context["assets"] ?? null), "addCss", array(0 => (($context["theme_url"] ?? null) . "/css/codemirror/codemirror.css")), "method");
  67. // line 30
  68. echo " ";
  69. $this->displayParentBlock("stylesheets", $context, $blocks);
  70. echo "
  71. ";
  72. }
  73. // line 33
  74. public function block_javascripts($context, array $blocks = array())
  75. {
  76. // line 34
  77. echo " ";
  78. $this->displayParentBlock("javascripts", $context, $blocks);
  79. echo "
  80. ";
  81. }
  82. // line 38
  83. public function block_titlebar($context, array $blocks = array())
  84. {
  85. // line 39
  86. echo " ";
  87. if (( !$this->getAttribute(($context["admin"] ?? null), "route", array()) || ($context["installing"] ?? null))) {
  88. // line 40
  89. echo " <div class=\"button-bar\">
  90. ";
  91. // line 41
  92. if (($context["installing"] ?? null)) {
  93. // line 42
  94. echo " <a class=\"button\" href=\"";
  95. echo twig_escape_filter($this->env, ($context["base_url_relative"] ?? null), "html", null, true);
  96. echo "/plugins\"><i class=\"fa fa-reply\"></i> ";
  97. echo twig_escape_filter($this->env, $this->env->getExtension('Grav\Plugin\Admin\AdminTwigExtension')->tuFilter("PLUGIN_ADMIN.BACK"), "html", null, true);
  98. echo "</a>
  99. ";
  100. } else {
  101. // line 44
  102. echo " <a class=\"button\" href=\"";
  103. echo twig_escape_filter($this->env, ($context["base_url"] ?? null), "html", null, true);
  104. echo "\"><i class=\"fa fa-reply\"></i> ";
  105. echo twig_escape_filter($this->env, $this->env->getExtension('Grav\Plugin\Admin\AdminTwigExtension')->tuFilter("PLUGIN_ADMIN.BACK"), "html", null, true);
  106. echo "</a>
  107. <a class=\"button\" href=\"";
  108. // line 45
  109. echo twig_escape_filter($this->env, ($context["base_url_relative"] ?? null), "html", null, true);
  110. echo "/plugins/install\"><i class=\"fa fa-plus\"></i> ";
  111. echo twig_escape_filter($this->env, $this->env->getExtension('Grav\Plugin\Admin\AdminTwigExtension')->tuFilter("PLUGIN_ADMIN.ADD"), "html", null, true);
  112. echo "</a>
  113. ";
  114. // line 46
  115. if ($this->env->getExtension('Grav\Common\Twig\TwigExtension')->authorize(array(0 => "admin.maintenance", 1 => "admin.super"))) {
  116. // line 47
  117. echo " <button data-gpm-checkupdates=\"\" class=\"button\"><i class=\"fa fa-refresh\"></i> ";
  118. echo twig_escape_filter($this->env, $this->env->getExtension('Grav\Plugin\Admin\AdminTwigExtension')->tuFilter("PLUGIN_ADMIN.CHECK_FOR_UPDATES"), "html", null, true);
  119. echo "</button>
  120. ";
  121. }
  122. // line 49
  123. echo " ";
  124. }
  125. // line 50
  126. echo " </div>
  127. <h1><i class=\"fa fa-fw fa-plug\"></i> ";
  128. // line 51
  129. echo twig_escape_filter($this->env, $this->env->getExtension('Grav\Plugin\Admin\AdminTwigExtension')->tuFilter("PLUGIN_ADMIN.PLUGINS"), "html", null, true);
  130. echo "</h1>
  131. ";
  132. } else {
  133. // line 53
  134. echo " ";
  135. if (($context["installed"] ?? null)) {
  136. // line 54
  137. echo " <div class=\"button-bar\">
  138. <a class=\"button\" href=\"";
  139. // line 55
  140. echo twig_escape_filter($this->env, ($context["base_url_relative"] ?? null), "html", null, true);
  141. echo "/plugins\"><i class=\"fa fa-arrow-left\"></i> ";
  142. echo twig_escape_filter($this->env, $this->env->getExtension('Grav\Plugin\Admin\AdminTwigExtension')->tuFilter("PLUGIN_ADMIN.BACK_TO_PLUGINS"), "html", null, true);
  143. echo "</a>
  144. ";
  145. // line 56
  146. try {
  147. $this->loadTemplate((("plugins/" . $this->getAttribute(($context["admin"] ?? null), "route", array())) . "-buttons.html.twig"), "plugins.html.twig", 56)->display($context);
  148. } catch (Twig_Error_Loader $e) {
  149. // ignore missing template
  150. }
  151. // line 57
  152. echo " <button class=\"button\" type=\"submit\" name=\"task\" value=\"save\" form=\"blueprints\"><i class=\"fa fa-check\"></i> ";
  153. echo twig_escape_filter($this->env, $this->env->getExtension('Grav\Plugin\Admin\AdminTwigExtension')->tuFilter("PLUGIN_ADMIN.SAVE"), "html", null, true);
  154. echo "</button>
  155. </div>
  156. ";
  157. } else {
  158. // line 60
  159. echo " <div class=\"button-bar\">
  160. <a class=\"button\" href=\"";
  161. // line 61
  162. echo twig_escape_filter($this->env, ($context["base_url_relative"] ?? null), "html", null, true);
  163. echo "/plugins/install\"><i class=\"fa fa-arrow-left\"></i> ";
  164. echo twig_escape_filter($this->env, $this->env->getExtension('Grav\Plugin\Admin\AdminTwigExtension')->tuFilter("PLUGIN_ADMIN.BACK_TO_PLUGINS"), "html", null, true);
  165. echo "</a>
  166. </div>
  167. ";
  168. }
  169. // line 64
  170. echo "
  171. <h1><i class=\"fa fa-fw fa-plug\"></i> ";
  172. // line 65
  173. echo twig_escape_filter($this->env, $this->env->getExtension('Grav\Plugin\Admin\AdminTwigExtension')->tuFilter("PLUGIN_ADMIN.PLUGIN"), "html", null, true);
  174. echo ": ";
  175. echo twig_escape_filter($this->env, $this->getAttribute(($context["plugin"] ?? null), "name", array()));
  176. echo "</h1>
  177. ";
  178. }
  179. }
  180. // line 69
  181. public function block_messages($context, array $blocks = array())
  182. {
  183. // line 70
  184. echo " ";
  185. $this->displayParentBlock("messages", $context, $blocks);
  186. echo "
  187. ";
  188. // line 71
  189. if ($this->getAttribute($this->getAttribute($this->getAttribute($this->getAttribute(($context["config"] ?? null), "plugins", array()), "admin", array()), "notifications", array()), "plugins", array())) {
  190. // line 72
  191. echo " <div class=\"plugins-notifications-container hidden\"></div>
  192. ";
  193. }
  194. }
  195. // line 76
  196. public function block_content($context, array $blocks = array())
  197. {
  198. // line 77
  199. echo " <div class=\"gpm gpm-plugins\">
  200. ";
  201. // line 78
  202. if (( !$this->getAttribute(($context["admin"] ?? null), "route", array()) || ($context["installing"] ?? null))) {
  203. // line 79
  204. echo " ";
  205. $this->loadTemplate("partials/plugins-list.html.twig", "plugins.html.twig", 79)->display($context);
  206. // line 80
  207. echo " ";
  208. } else {
  209. // line 81
  210. echo " ";
  211. if ((null === ($context["plugin"] ?? null))) {
  212. // line 82
  213. echo " ";
  214. echo twig_escape_filter($this->env, $this->env->getExtension('Grav\Common\Twig\TwigExtension')->redirectFunc((($context["base_url_relative"] ?? null) . "/404")), "html", null, true);
  215. echo "
  216. ";
  217. }
  218. // line 84
  219. echo "
  220. ";
  221. // line 85
  222. $this->loadTemplate("partials/plugins-details.html.twig", "plugins.html.twig", 85)->display($context);
  223. // line 86
  224. echo " ";
  225. }
  226. // line 87
  227. echo " </div>
  228. ";
  229. }
  230. public function getTemplateName()
  231. {
  232. return "plugins.html.twig";
  233. }
  234. public function isTraitable()
  235. {
  236. return false;
  237. }
  238. public function getDebugInfo()
  239. {
  240. return array ( 237 => 87, 234 => 86, 232 => 85, 229 => 84, 223 => 82, 220 => 81, 217 => 80, 214 => 79, 212 => 78, 209 => 77, 206 => 76, 200 => 72, 198 => 71, 193 => 70, 190 => 69, 181 => 65, 178 => 64, 170 => 61, 167 => 60, 160 => 57, 153 => 56, 147 => 55, 144 => 54, 141 => 53, 136 => 51, 133 => 50, 130 => 49, 124 => 47, 122 => 46, 116 => 45, 109 => 44, 101 => 42, 99 => 41, 96 => 40, 93 => 39, 90 => 38, 83 => 34, 80 => 33, 73 => 30, 70 => 29, 67 => 28, 63 => 1, 60 => 27, 57 => 24, 53 => 21, 51 => 20, 48 => 17, 46 => 16, 44 => 15, 42 => 14, 40 => 11, 37 => 9, 35 => 8, 33 => 6, 31 => 5, 29 => 3, 11 => 1,);
  241. }
  242. /** @deprecated since 1.27 (to be removed in 2.0). Use getSourceContext() instead */
  243. public function getSource()
  244. {
  245. @trigger_error('The '.__METHOD__.' method is deprecated since version 1.27 and will be removed in 2.0. Use getSourceContext() instead.', E_USER_DEPRECATED);
  246. return $this->getSourceContext()->getCode();
  247. }
  248. public function getSourceContext()
  249. {
  250. return new Twig_Source("{% extends 'partials/base.html.twig' %}
  251. {% set plugin_slug = admin.route %}
  252. {% if plugin_slug %}
  253. {% set installing = plugin_slug starts with 'install' %}
  254. {% if installing %}
  255. {% set title = \"PLUGIN_ADMIN.PLUGINS\"|tu %}
  256. {% else %}
  257. {% set installed = true %}
  258. {# Try installed packages first, then remote #}
  259. {% set package = admin.plugins(true)[admin.route] %}
  260. {% if (not package) %}
  261. {% set package = admin.plugins(false)[admin.route] %}
  262. {% set installed = false %}
  263. {% endif %}
  264. {% set plugin = package.toArray() %}
  265. {% set title = \"PLUGIN_ADMIN.PLUGIN\"|tu ~ \": \" ~ plugin.name|e %}
  266. {% endif %}
  267. {% else %}
  268. {% set title = \"PLUGIN_ADMIN.PLUGINS\"|tu %}
  269. {% endif %}
  270. {% if admin.route or installing %}
  271. {% block stylesheets %}
  272. {% do assets.addCss(theme_url~'/css/codemirror/codemirror.css') %}
  273. {{ parent() }}
  274. {% endblock %}
  275. {% block javascripts %}
  276. {{ parent() }}
  277. {% endblock %}
  278. {% endif %}
  279. {% block titlebar %}
  280. {% if not admin.route or installing %}
  281. <div class=\"button-bar\">
  282. {% if (installing) %}
  283. <a class=\"button\" href=\"{{ base_url_relative }}/plugins\"><i class=\"fa fa-reply\"></i> {{ \"PLUGIN_ADMIN.BACK\"|tu }}</a>
  284. {% else %}
  285. <a class=\"button\" href=\"{{ base_url }}\"><i class=\"fa fa-reply\"></i> {{ \"PLUGIN_ADMIN.BACK\"|tu }}</a>
  286. <a class=\"button\" href=\"{{ base_url_relative }}/plugins/install\"><i class=\"fa fa-plus\"></i> {{ \"PLUGIN_ADMIN.ADD\"|tu }}</a>
  287. {% if authorize(['admin.maintenance', 'admin.super']) %}
  288. <button data-gpm-checkupdates=\"\" class=\"button\"><i class=\"fa fa-refresh\"></i> {{ \"PLUGIN_ADMIN.CHECK_FOR_UPDATES\"|tu }}</button>
  289. {% endif %}
  290. {% endif %}
  291. </div>
  292. <h1><i class=\"fa fa-fw fa-plug\"></i> {{ \"PLUGIN_ADMIN.PLUGINS\"|tu }}</h1>
  293. {% else %}
  294. {% if (installed) %}
  295. <div class=\"button-bar\">
  296. <a class=\"button\" href=\"{{ base_url_relative }}/plugins\"><i class=\"fa fa-arrow-left\"></i> {{ \"PLUGIN_ADMIN.BACK_TO_PLUGINS\"|tu }}</a>
  297. {% include 'plugins/'~admin.route~'-buttons.html.twig' ignore missing %}
  298. <button class=\"button\" type=\"submit\" name=\"task\" value=\"save\" form=\"blueprints\"><i class=\"fa fa-check\"></i> {{ \"PLUGIN_ADMIN.SAVE\"|tu }}</button>
  299. </div>
  300. {% else %}
  301. <div class=\"button-bar\">
  302. <a class=\"button\" href=\"{{ base_url_relative }}/plugins/install\"><i class=\"fa fa-arrow-left\"></i> {{ \"PLUGIN_ADMIN.BACK_TO_PLUGINS\"|tu }}</a>
  303. </div>
  304. {% endif %}
  305. <h1><i class=\"fa fa-fw fa-plug\"></i> {{ \"PLUGIN_ADMIN.PLUGIN\"|tu }}: {{ plugin.name|e }}</h1>
  306. {% endif %}
  307. {% endblock %}
  308. {% block messages %}
  309. {{ parent() }}
  310. {% if config.plugins.admin.notifications.plugins %}
  311. <div class=\"plugins-notifications-container hidden\"></div>
  312. {% endif %}
  313. {% endblock %}
  314. {% block content %}
  315. <div class=\"gpm gpm-plugins\">
  316. {% if not admin.route or installing %}
  317. {% include 'partials/plugins-list.html.twig' %}
  318. {% else %}
  319. {% if plugin is null %}
  320. {{redirect_me(base_url_relative ~ '/404')}}
  321. {% endif %}
  322. {% include 'partials/plugins-details.html.twig' %}
  323. {% endif %}
  324. </div>
  325. {% endblock %}
  326. ", "plugins.html.twig", "/home/kevin/Sites/static-ethica.net/user/plugins/admin/themes/grav/templates/plugins.html.twig");
  327. }
  328. }