cf3b0cb9b85161e32027dd416a647e59957d6c5c45a1e3b092d26b4775437031.php 20 KB

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