1871fb2d2d03e7d0d43215bff69c642d0ec876390d460ab66bd8aca68306844d.php 15 KB

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