3eb87e39a766f1d7305e357c0e31a3fe94b1fc728ae90a2cc7abb3067ef2114b.php 19 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360
  1. <?php
  2. /* partials/themes-list.html.twig */
  3. class __TwigTemplate_d26acc8c61e336dc4dad5700a7e0e14ccf0777d6be069277d7511fe1a2c54165 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. echo "<div class=\"grav-update themes\"></div>
  16. ";
  17. // line 2
  18. if (($context["installing"] ?? null)) {
  19. // line 3
  20. echo " ";
  21. $this->loadTemplate("partials/release-toggle.html.twig", "partials/themes-list.html.twig", 3)->display($context);
  22. }
  23. // line 5
  24. $this->loadTemplate("partials/list-sort.html.twig", "partials/themes-list.html.twig", 5)->display(array_merge($context, array("list_view" => "themes")));
  25. // line 6
  26. echo "<h1>
  27. ";
  28. // line 7
  29. echo twig_escape_filter($this->env, ((($context["installing"] ?? null)) ? ($this->env->getExtension('Grav\Plugin\Admin\AdminTwigExtension')->tuFilter("PLUGIN_ADMIN.AVAILABLE_THEMES")) : ($this->env->getExtension('Grav\Plugin\Admin\AdminTwigExtension')->tuFilter("PLUGIN_ADMIN.INSTALLED_THEMES"))), "html", null, true);
  30. echo "
  31. </h1>
  32. <form>
  33. <div class=\"gpm-search\">
  34. <input type=\"text\" placeholder=\"";
  35. // line 11
  36. echo twig_escape_filter($this->env, $this->env->getExtension('Grav\Plugin\Admin\AdminTwigExtension')->tuFilter("PLUGIN_ADMIN.RESOURCE_FILTER"), "html", null, true);
  37. echo "\" data-gpm-filter>
  38. </div>
  39. </form>
  40. <div class=\"themes card-row grid fixed-blocks pure-g\">
  41. ";
  42. // line 16
  43. $context['_parent'] = $context;
  44. $context['_seq'] = twig_ensure_traversable($this->env->getExtension('Grav\Common\Twig\TwigExtension')->ksortFilter($this->getAttribute($this->getAttribute(($context["admin"] ?? null), "themes", array(0 => !($context["installing"] ?? null)), "method"), "toArray", array())));
  45. $context['_iterated'] = false;
  46. foreach ($context['_seq'] as $context["slug"] => $context["theme"]) {
  47. // line 17
  48. echo " ";
  49. $context["state"] = "inactive";
  50. // line 18
  51. echo " ";
  52. if (($context["installing"] ?? null)) {
  53. $context["state"] = "installing";
  54. }
  55. // line 19
  56. echo " ";
  57. if (($this->getAttribute(($context["config"] ?? null), "get", array(0 => "system.pages.theme"), "method") == $context["slug"])) {
  58. $context["state"] = "active";
  59. }
  60. // line 20
  61. echo " ";
  62. $context["isTestingRelease"] = $this->getAttribute($this->getAttribute(($context["admin"] ?? null), "gpm", array()), "isTestingRelease", array(0 => $context["slug"]), "method");
  63. // line 21
  64. echo " ";
  65. $context["releaseDate"] = (($this->getAttribute($context["theme"], "date", array())) ? ($this->getAttribute($context["theme"], "date", array())) : ($this->getAttribute($this->getAttribute($this->getAttribute(($context["admin"] ?? null), "gpm", array()), "findPackage", array(0 => $context["slug"], 1 => true), "method"), "date", array())));
  66. // line 22
  67. echo "
  68. <div class=\"theme card-item pure-u-1-3 ";
  69. // line 23
  70. echo twig_escape_filter($this->env, ($context["state"] ?? null), "html", null, true);
  71. echo "-theme\" data-gpm-theme=\"";
  72. echo twig_escape_filter($this->env, twig_urlencode_filter($context["slug"]), "html", null, true);
  73. echo "\" data-gpm-name=\"";
  74. echo twig_escape_filter($this->env, $this->getAttribute($context["theme"], "name", array()), "html", null, true);
  75. echo "\" data-gpm-release-date=\"";
  76. echo twig_escape_filter($this->env, ($context["releaseDate"] ?? null), "html", null, true);
  77. echo "\" data-gpm-author=\"";
  78. echo twig_escape_filter($this->env, $this->getAttribute($this->getAttribute($context["theme"], "author", array()), "name", array()), "html", null, true);
  79. echo "\" data-gpm-official=\"";
  80. echo (($this->getAttribute(($context["admin"] ?? null), "isTeamGrav", array(0 => $context["theme"]), "method")) ? ("1") : ("2"));
  81. echo "\" data-gpm-updatable=\"";
  82. echo (($this->getAttribute($this->getAttribute(($context["admin"] ?? null), "gpm", array()), "isUpdatable", array(0 => $context["slug"]), "method")) ? ("1") : ("2"));
  83. echo "\" data-gpm-enabled=\"";
  84. echo (($this->getAttribute(($context["data"] ?? null), "get", array(0 => "enabled"), "method")) ? ("1") : ("2"));
  85. echo "\" data-gpm-testing=\"";
  86. echo ((($context["isTestingRelease"] ?? null)) ? ("1") : ("2"));
  87. echo "\">
  88. <div class=\"gpm-name\">
  89. <i class=\"fa fa-fw fa-";
  90. // line 25
  91. echo twig_escape_filter($this->env, $this->getAttribute($context["theme"], "icon", array()), "html", null, true);
  92. echo "\"></i>
  93. <a href=\"";
  94. // line 26
  95. echo twig_escape_filter($this->env, ($context["base_url_relative"] ?? null), "html", null, true);
  96. echo "/themes/";
  97. echo twig_escape_filter($this->env, twig_urlencode_filter($context["slug"]), "html", null, true);
  98. echo "\">";
  99. echo twig_escape_filter($this->env, $this->getAttribute($context["theme"], "name", array()), "html", null, true);
  100. echo "</a>
  101. ";
  102. // line 27
  103. if ($this->getAttribute(($context["admin"] ?? null), "isTeamGrav", array(0 => $context["theme"]), "method")) {
  104. // line 28
  105. echo " <small><span class=\"info-reverse\"><i class=\"fa fa-check-circle\" title=\"";
  106. echo twig_escape_filter($this->env, $this->env->getExtension('Grav\Plugin\Admin\AdminTwigExtension')->tuFilter("PLUGIN_ADMIN.GRAV_OFFICIAL_THEME"), "html", null, true);
  107. echo "\"></i></span></small>
  108. ";
  109. }
  110. // line 30
  111. echo " ";
  112. if ($this->getAttribute(($context["admin"] ?? null), "isPremiumProduct", array(0 => $context["theme"]), "method")) {
  113. // line 31
  114. echo " <small><span class=\"badge warning premium\"><i class=\"fa fa-star-o\"></i> ";
  115. echo twig_escape_filter($this->env, $this->env->getExtension('Grav\Plugin\Admin\AdminTwigExtension')->tuFilter("PLUGIN_ADMIN.PREMIUM_PRODUCT"), "html", null, true);
  116. echo "</span></small>
  117. ";
  118. }
  119. // line 33
  120. echo " ";
  121. if ($this->getAttribute($context["theme"], "symlink", array())) {
  122. // line 34
  123. echo " <span class=\"hint--bottom\" data-hint=\"";
  124. echo twig_escape_filter($this->env, $this->env->getExtension('Grav\Plugin\Admin\AdminTwigExtension')->tuFilter("PLUGIN_ADMIN.THEME_SYMBOLICALLY_LINKED"), "html", null, true);
  125. echo "\">
  126. <i class=\"fa fa-fw fa-link\"></i>
  127. </span>
  128. ";
  129. }
  130. // line 38
  131. echo " <span class=\"gpm-version\">v";
  132. echo twig_escape_filter($this->env, $this->getAttribute($context["theme"], "version", array()), "html", null, true);
  133. echo "</span>
  134. ";
  135. // line 39
  136. if (($context["isTestingRelease"] ?? null)) {
  137. echo "<span class=\"gpm-testing\">test release</span>";
  138. }
  139. // line 40
  140. echo " </div>
  141. <div class=\"gpm-screenshot\">
  142. ";
  143. // line 42
  144. $context["thumb"] = ((($context["installing"] ?? null)) ? (("//getgrav.org/images/" . $this->getAttribute($context["theme"], "screenshot", array()))) : ($this->getAttribute($context["theme"], "thumbnail", array())));
  145. // line 43
  146. echo " <a href=\"";
  147. echo twig_escape_filter($this->env, ($context["base_url_relative"] ?? null), "html", null, true);
  148. echo "/themes/";
  149. echo twig_escape_filter($this->env, twig_urlencode_filter($context["slug"]), "html", null, true);
  150. echo "\"><img src=\"";
  151. echo twig_escape_filter($this->env, ($context["thumb"] ?? null), "html", null, true);
  152. echo "\" /></a>
  153. </div>
  154. ";
  155. // line 45
  156. if ((($context["state"] ?? null) == "installing")) {
  157. // line 46
  158. echo " <div class=\"gpm-actions\">
  159. <a class=\"button\" href=\"#\" data-remodal-target=\"add-package\" data-packages-slugs=\"";
  160. // line 47
  161. echo twig_escape_filter($this->env, $context["slug"], "html", null, true);
  162. echo "\" data-theme-action=\"start-package-installation\"><i class=\"fa fa-plus\"></i> ";
  163. echo twig_escape_filter($this->env, $this->env->getExtension('Grav\Plugin\Admin\AdminTwigExtension')->tuFilter("PLUGIN_ADMIN.INSTALL"), "html", null, true);
  164. echo "</a>
  165. </div>
  166. ";
  167. } elseif (( // line 49
  168. ($context["state"] ?? null) == "active")) {
  169. // line 50
  170. echo " <div class=\"gpm-actions\">
  171. <i class=\"fa fa-star\"></i> ";
  172. // line 51
  173. echo twig_escape_filter($this->env, $this->env->getExtension('Grav\Plugin\Admin\AdminTwigExtension')->tuFilter("PLUGIN_ADMIN.ACTIVE_THEME"), "html", null, true);
  174. echo "
  175. </div>
  176. ";
  177. } else {
  178. // line 54
  179. echo " <a data-remodal-target=\"theme-switch-warn\" href=\"";
  180. echo twig_escape_filter($this->env, $this->getAttribute(($context["uri"] ?? null), "addNonce", array(0 => (((((($context["base_url_relative"] ?? null) . "/themes/") . $context["slug"]) . "/task") . $this->getAttribute($this->getAttribute(($context["config"] ?? null), "system", array()), "param_sep", array())) . "activate"), 1 => "admin-form", 2 => "admin-nonce"), "method"), "html", null, true);
  181. echo "\" class=\"gpm-actions\">
  182. ";
  183. // line 55
  184. echo twig_escape_filter($this->env, $this->env->getExtension('Grav\Plugin\Admin\AdminTwigExtension')->tuFilter("PLUGIN_ADMIN.ACTIVATE"), "html", null, true);
  185. echo "
  186. </a>
  187. ";
  188. }
  189. // line 58
  190. echo " </div>
  191. ";
  192. $context['_iterated'] = true;
  193. }
  194. if (!$context['_iterated']) {
  195. // line 60
  196. echo " <tr><td>";
  197. echo twig_escape_filter($this->env, $this->env->getExtension('Grav\Plugin\Admin\AdminTwigExtension')->tuFilter("PLUGIN_ADMIN.OFFLINE_WARNING"), "html", null, true);
  198. echo "</td></tr>
  199. ";
  200. }
  201. $_parent = $context['_parent'];
  202. unset($context['_seq'], $context['_iterated'], $context['slug'], $context['theme'], $context['_parent'], $context['loop']);
  203. $context = array_intersect_key($context, $_parent) + $_parent;
  204. // line 62
  205. echo "</div>
  206. <div class=\"remodal theme-switcher\" data-remodal-id=\"theme-switch-warn\" data-remodal-options=\"hashTracking: false\">
  207. <form>
  208. <h1>";
  209. // line 66
  210. echo twig_escape_filter($this->env, $this->env->getExtension('Grav\Plugin\Admin\AdminTwigExtension')->tuFilter("PLUGIN_ADMIN.SWITCHING_TO"), "html", null, true);
  211. echo " <strong>{theme_name}</strong></h1>
  212. <p class=\"bigger\">
  213. ";
  214. // line 68
  215. echo twig_escape_filter($this->env, $this->env->getExtension('Grav\Plugin\Admin\AdminTwigExtension')->tuFilter("PLUGIN_ADMIN.SWITCHING_TO_DESCRIPTION"), "html", null, true);
  216. echo "
  217. </p>
  218. <p class=\"bigger\">
  219. ";
  220. // line 71
  221. echo twig_escape_filter($this->env, $this->env->getExtension('Grav\Plugin\Admin\AdminTwigExtension')->tuFilter("PLUGIN_ADMIN.SWITCHING_TO_CONFIRMATION"), "html", null, true);
  222. echo " <strong>{theme_name}</strong>?
  223. </p>
  224. <br>
  225. <div class=\"button-bar\">
  226. <button data-remodal-action=\"cancel\" class=\"button secondary remodal-cancel\"><i class=\"fa fa-fw fa-close\"></i> ";
  227. // line 75
  228. echo twig_escape_filter($this->env, $this->env->getExtension('Grav\Plugin\Admin\AdminTwigExtension')->tuFilter("PLUGIN_ADMIN.CANCEL"), "html", null, true);
  229. echo "</button>
  230. <a class=\"button continue\" href=\"#\"><i class=\"fa fa-fw fa-check\"></i>";
  231. // line 76
  232. echo twig_escape_filter($this->env, $this->env->getExtension('Grav\Plugin\Admin\AdminTwigExtension')->tuFilter("PLUGIN_ADMIN.CONTINUE"), "html", null, true);
  233. echo "</a>
  234. </div>
  235. </form>
  236. </div>
  237. ";
  238. // line 81
  239. $this->loadTemplate("partials/modal-add-package.html.twig", "partials/themes-list.html.twig", 81)->display(array_merge($context, array("type" => "theme")));
  240. // line 82
  241. $this->loadTemplate("partials/modal-update-packages.html.twig", "partials/themes-list.html.twig", 82)->display(array_merge($context, array("type" => "theme")));
  242. }
  243. public function getTemplateName()
  244. {
  245. return "partials/themes-list.html.twig";
  246. }
  247. public function isTraitable()
  248. {
  249. return false;
  250. }
  251. public function getDebugInfo()
  252. {
  253. return array ( 248 => 82, 246 => 81, 238 => 76, 234 => 75, 227 => 71, 221 => 68, 216 => 66, 210 => 62, 201 => 60, 195 => 58, 189 => 55, 184 => 54, 178 => 51, 175 => 50, 173 => 49, 166 => 47, 163 => 46, 161 => 45, 151 => 43, 149 => 42, 145 => 40, 141 => 39, 136 => 38, 128 => 34, 125 => 33, 119 => 31, 116 => 30, 110 => 28, 108 => 27, 100 => 26, 96 => 25, 75 => 23, 72 => 22, 69 => 21, 66 => 20, 61 => 19, 56 => 18, 53 => 17, 48 => 16, 40 => 11, 33 => 7, 30 => 6, 28 => 5, 24 => 3, 22 => 2, 19 => 1,);
  254. }
  255. /** @deprecated since 1.27 (to be removed in 2.0). Use getSourceContext() instead */
  256. public function getSource()
  257. {
  258. @trigger_error('The '.__METHOD__.' method is deprecated since version 1.27 and will be removed in 2.0. Use getSourceContext() instead.', E_USER_DEPRECATED);
  259. return $this->getSourceContext()->getCode();
  260. }
  261. public function getSourceContext()
  262. {
  263. return new Twig_Source("<div class=\"grav-update themes\"></div>
  264. {% if installing %}
  265. {% include 'partials/release-toggle.html.twig' %}
  266. {% endif %}
  267. {% include 'partials/list-sort.html.twig' with { list_view: 'themes' } %}
  268. <h1>
  269. {{ installing ? \"PLUGIN_ADMIN.AVAILABLE_THEMES\"|tu : \"PLUGIN_ADMIN.INSTALLED_THEMES\"|tu }}
  270. </h1>
  271. <form>
  272. <div class=\"gpm-search\">
  273. <input type=\"text\" placeholder=\"{{ \"PLUGIN_ADMIN.RESOURCE_FILTER\"|tu }}\" data-gpm-filter>
  274. </div>
  275. </form>
  276. <div class=\"themes card-row grid fixed-blocks pure-g\">
  277. {% for slug, theme in admin.themes(not installing).toArray|ksort %}
  278. {% set state = 'inactive' %}
  279. {% if (installing) %}{% set state = 'installing' %}{% endif %}
  280. {% if (config.get('system.pages.theme') == slug) %}{% set state = 'active' %}{% endif %}
  281. {% set isTestingRelease = admin.gpm.isTestingRelease(slug) %}
  282. {% set releaseDate = theme.date ?: admin.gpm.findPackage(slug, true).date %}
  283. <div class=\"theme card-item pure-u-1-3 {{ state }}-theme\" data-gpm-theme=\"{{ slug|url_encode }}\" data-gpm-name=\"{{ theme.name }}\" data-gpm-release-date=\"{{ releaseDate }}\" data-gpm-author=\"{{ theme.author.name }}\" data-gpm-official=\"{{ admin.isTeamGrav(theme) ? '1' : '2' }}\" data-gpm-updatable=\"{{ admin.gpm.isUpdatable(slug) ? '1' : '2' }}\" data-gpm-enabled=\"{{ data.get('enabled') ? '1' : '2' }}\" data-gpm-testing=\"{{ isTestingRelease ? '1' : '2' }}\">
  284. <div class=\"gpm-name\">
  285. <i class=\"fa fa-fw fa-{{ theme.icon }}\"></i>
  286. <a href=\"{{ base_url_relative }}/themes/{{ slug|url_encode }}\">{{ theme.name }}</a>
  287. {% if admin.isTeamGrav(theme) %}
  288. <small><span class=\"info-reverse\"><i class=\"fa fa-check-circle\" title=\"{{ \"PLUGIN_ADMIN.GRAV_OFFICIAL_THEME\"|tu }}\"></i></span></small>
  289. {% endif %}
  290. {% if admin.isPremiumProduct(theme) %}
  291. <small><span class=\"badge warning premium\"><i class=\"fa fa-star-o\"></i> {{ \"PLUGIN_ADMIN.PREMIUM_PRODUCT\"|tu }}</span></small>
  292. {% endif %}
  293. {% if theme.symlink %}
  294. <span class=\"hint--bottom\" data-hint=\"{{ \"PLUGIN_ADMIN.THEME_SYMBOLICALLY_LINKED\"|tu }}\">
  295. <i class=\"fa fa-fw fa-link\"></i>
  296. </span>
  297. {% endif %}
  298. <span class=\"gpm-version\">v{{ theme.version }}</span>
  299. {% if isTestingRelease %}<span class=\"gpm-testing\">test release</span>{% endif %}
  300. </div>
  301. <div class=\"gpm-screenshot\">
  302. {% set thumb = installing ? '//getgrav.org/images/' ~ theme.screenshot : theme.thumbnail %}
  303. <a href=\"{{ base_url_relative }}/themes/{{ slug|url_encode }}\"><img src=\"{{ thumb }}\" /></a>
  304. </div>
  305. {% if (state == 'installing') %}
  306. <div class=\"gpm-actions\">
  307. <a class=\"button\" href=\"#\" data-remodal-target=\"add-package\" data-packages-slugs=\"{{ slug }}\" data-theme-action=\"start-package-installation\"><i class=\"fa fa-plus\"></i> {{ \"PLUGIN_ADMIN.INSTALL\"|tu }}</a>
  308. </div>
  309. {% elseif state == 'active' %}
  310. <div class=\"gpm-actions\">
  311. <i class=\"fa fa-star\"></i> {{ \"PLUGIN_ADMIN.ACTIVE_THEME\"|tu }}
  312. </div>
  313. {% else %}
  314. <a data-remodal-target=\"theme-switch-warn\" href=\"{{ uri.addNonce(base_url_relative ~ '/themes/' ~ slug ~ '/task' ~ config.system.param_sep ~ 'activate', 'admin-form', 'admin-nonce') }}\" class=\"gpm-actions\">
  315. {{ \"PLUGIN_ADMIN.ACTIVATE\"|tu }}
  316. </a>
  317. {% endif %}
  318. </div>
  319. {% else %}
  320. <tr><td>{{ \"PLUGIN_ADMIN.OFFLINE_WARNING\"|tu }}</td></tr>
  321. {% endfor %}
  322. </div>
  323. <div class=\"remodal theme-switcher\" data-remodal-id=\"theme-switch-warn\" data-remodal-options=\"hashTracking: false\">
  324. <form>
  325. <h1>{{ \"PLUGIN_ADMIN.SWITCHING_TO\"|tu }} <strong>{theme_name}</strong></h1>
  326. <p class=\"bigger\">
  327. {{ \"PLUGIN_ADMIN.SWITCHING_TO_DESCRIPTION\"|tu }}
  328. </p>
  329. <p class=\"bigger\">
  330. {{ \"PLUGIN_ADMIN.SWITCHING_TO_CONFIRMATION\"|tu }} <strong>{theme_name}</strong>?
  331. </p>
  332. <br>
  333. <div class=\"button-bar\">
  334. <button data-remodal-action=\"cancel\" class=\"button secondary remodal-cancel\"><i class=\"fa fa-fw fa-close\"></i> {{ \"PLUGIN_ADMIN.CANCEL\"|tu }}</button>
  335. <a class=\"button continue\" href=\"#\"><i class=\"fa fa-fw fa-check\"></i>{{ \"PLUGIN_ADMIN.CONTINUE\"|tu }}</a>
  336. </div>
  337. </form>
  338. </div>
  339. {% include 'partials/modal-add-package.html.twig' with { type: 'theme' } %}
  340. {% include 'partials/modal-update-packages.html.twig' with { type: 'theme' } %}
  341. ", "partials/themes-list.html.twig", "/home/kevin/Sites/static-ethica.net/user/plugins/admin/themes/grav/templates/partials/themes-list.html.twig");
  342. }
  343. }