50b7414f5ac7ebf35072ffca56a848c16a2831e5a9d0ac1aed2ce44f886ee0e7.php 13 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263
  1. <?php
  2. /* user.html.twig */
  3. class __TwigTemplate_21922495777088910c21aef2315c047ccdc8d6877b01b0294cd2c1658a3f5c9b 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", "user.html.twig", 1);
  10. $this->blocks = array(
  11. 'titlebar' => array($this, 'block_titlebar'),
  12. 'content' => array($this, 'block_content'),
  13. );
  14. }
  15. protected function doGetParent(array $context)
  16. {
  17. return "partials/base.html.twig";
  18. }
  19. protected function doDisplay(array $context, array $blocks = array())
  20. {
  21. // line 3
  22. if ($this->getAttribute(($context["admin"] ?? null), "route", array())) {
  23. // line 4
  24. $context["user"] = $this->getAttribute(($context["admin"] ?? null), "data", array(0 => ("users/" . $this->getAttribute(($context["admin"] ?? null), "route", array()))), "method");
  25. // line 5
  26. $context["title"] = (($this->env->getExtension('Grav\Plugin\Admin\AdminTwigExtension')->tuFilter("PLUGIN_ADMIN.USER") . ": ") . twig_escape_filter($this->env, $this->getAttribute(($context["admin"] ?? null), "route", array())));
  27. } else {
  28. // line 7
  29. $context["title"] = $this->env->getExtension('Grav\Plugin\Admin\AdminTwigExtension')->tuFilter("PLUGIN_ADMIN_PRO.USERS");
  30. }
  31. // line 1
  32. $this->parent->display($context, array_merge($this->blocks, $blocks));
  33. }
  34. // line 10
  35. public function block_titlebar($context, array $blocks = array())
  36. {
  37. // line 11
  38. echo " ";
  39. if ( !$this->getAttribute(($context["admin"] ?? null), "route", array())) {
  40. // line 12
  41. echo " ";
  42. if ($this->env->getExtension('Grav\Common\Twig\TwigExtension')->authorize(array(0 => "admin.users", 1 => "admin.super"))) {
  43. // line 13
  44. echo " <div class=\"button-bar\">
  45. <a class=\"button\" href=\"#modal\" data-remodal-target=\"modal\"><i class=\"fa fa-plus\"></i> ";
  46. // line 14
  47. echo twig_escape_filter($this->env, $this->env->getExtension('Grav\Plugin\Admin\AdminTwigExtension')->tuFilter("PLUGIN_ADMIN.ADD_ACCOUNT"), "html", null, true);
  48. echo "</a>
  49. </div>
  50. <h1><i class=\"fa fa-fw fa-users\"></i> ";
  51. // line 16
  52. echo twig_escape_filter($this->env, $this->env->getExtension('Grav\Plugin\Admin\AdminTwigExtension')->tuFilter("PLUGIN_ADMIN.USERS"), "html", null, true);
  53. echo "</h1>
  54. ";
  55. } else {
  56. // line 18
  57. echo " <h1>";
  58. echo twig_escape_filter($this->env, $this->env->getExtension('Grav\Plugin\Admin\AdminTwigExtension')->tuFilter("PLUGIN_ADMIN.ACCESS_DENIED"), "html", null, true);
  59. echo "</h1>
  60. ";
  61. }
  62. // line 20
  63. echo " ";
  64. } else {
  65. // line 21
  66. echo " ";
  67. if (($this->env->getExtension('Grav\Common\Twig\TwigExtension')->authorize(array(0 => "admin.users", 1 => "admin.super")) || ($this->getAttribute($this->getAttribute(($context["grav"] ?? null), "user", array()), "username", array()) == $this->getAttribute(($context["user"] ?? null), "username", array())))) {
  68. // line 22
  69. echo " <div class=\"button-bar\">
  70. ";
  71. // line 23
  72. if ($this->getAttribute($this->getAttribute($this->getAttribute(($context["config"] ?? null), "plugins", array()), "admin-pro", array(), "array"), "enabled", array())) {
  73. // line 24
  74. echo " <a class=\"button\" href=\"";
  75. echo twig_escape_filter($this->env, ($context["base_url"] ?? null), "html", null, true);
  76. echo "/users\"><i class=\"fa fa-reply\"></i> ";
  77. echo twig_escape_filter($this->env, $this->env->getExtension('Grav\Plugin\Admin\AdminTwigExtension')->tuFilter("PLUGIN_ADMIN.BACK"), "html", null, true);
  78. echo "</a>
  79. ";
  80. }
  81. // line 26
  82. echo " <button class=\"button\" type=\"submit\" name=\"task\" value=\"save\" form=\"blueprints\"><i class=\"fa fa-check\"></i> ";
  83. echo twig_escape_filter($this->env, $this->env->getExtension('Grav\Plugin\Admin\AdminTwigExtension')->tuFilter("PLUGIN_ADMIN.SAVE"), "html", null, true);
  84. echo "</button>
  85. </div>
  86. <h1><i class=\"fa fa-fw fa-user\"></i> ";
  87. // line 28
  88. echo twig_escape_filter($this->env, $this->env->getExtension('Grav\Plugin\Admin\AdminTwigExtension')->tuFilter("PLUGIN_ADMIN.USER"), "html", null, true);
  89. echo ": ";
  90. echo twig_escape_filter($this->env, $this->getAttribute(($context["user"] ?? null), "username", array()));
  91. echo "</h1>
  92. ";
  93. } else {
  94. // line 30
  95. echo " <h1>";
  96. echo twig_escape_filter($this->env, $this->env->getExtension('Grav\Plugin\Admin\AdminTwigExtension')->tuFilter("PLUGIN_ADMIN.ACCESS_DENIED"), "html", null, true);
  97. echo "</h1>
  98. ";
  99. }
  100. // line 32
  101. echo " ";
  102. }
  103. }
  104. // line 35
  105. public function block_content($context, array $blocks = array())
  106. {
  107. // line 36
  108. echo " ";
  109. if (($this->env->getExtension('Grav\Common\Twig\TwigExtension')->authorize(array(0 => "admin.users", 1 => "admin.super")) || ($this->getAttribute($this->getAttribute(($context["grav"] ?? null), "user", array()), "username", array()) == $this->getAttribute(($context["user"] ?? null), "username", array())))) {
  110. // line 37
  111. echo " <div>
  112. ";
  113. // line 38
  114. if ( !$this->getAttribute(($context["admin"] ?? null), "route", array())) {
  115. // line 39
  116. echo " ";
  117. $this->loadTemplate("partials/users-list.html.twig", "user.html.twig", 39)->display($context);
  118. // line 40
  119. echo "
  120. <div class=\"remodal\" data-remodal-id=\"modal\" data-remodal-options=\"hashTracking: false\">
  121. ";
  122. // line 42
  123. $this->loadTemplate("partials/blueprints-new.html.twig", "user.html.twig", 42)->display(array_merge($context, array("blueprints" => $this->getAttribute(($context["admin"] ?? null), "blueprints", array(0 => "user/account_new"), "method"))));
  124. // line 43
  125. echo " </div>
  126. ";
  127. } else {
  128. // line 45
  129. echo " ";
  130. $this->loadTemplate("partials/blueprints.html.twig", "user.html.twig", 45)->display(array_merge($context, array("data" => ($context["user"] ?? null), "blueprints" => $this->getAttribute(($context["user"] ?? null), "blueprints", array()))));
  131. // line 46
  132. echo " ";
  133. }
  134. // line 47
  135. echo " </div>
  136. <div class=\"remodal\" data-remodal-id=\"changes\">
  137. <form>
  138. <h1>";
  139. // line 51
  140. echo twig_escape_filter($this->env, $this->env->getExtension('Grav\Plugin\Admin\AdminTwigExtension')->tuFilter("PLUGIN_ADMIN.MODAL_CHANGED_DETECTED_TITLE"), "html", null, true);
  141. echo "</h1>
  142. <p class=\"bigger\">
  143. ";
  144. // line 53
  145. echo twig_escape_filter($this->env, $this->env->getExtension('Grav\Plugin\Admin\AdminTwigExtension')->tuFilter("PLUGIN_ADMIN.MODAL_CHANGED_DETECTED_DESC"), "html", null, true);
  146. echo "
  147. </p>
  148. <br>
  149. <div class=\"button-bar\">
  150. <a class=\"button secondary\" data-leave-action=\"cancel\" href=\"#\"><i class=\"fa fa-fw fa-close\"></i> ";
  151. // line 57
  152. echo twig_escape_filter($this->env, $this->env->getExtension('Grav\Plugin\Admin\AdminTwigExtension')->tuFilter("PLUGIN_ADMIN.CANCEL"), "html", null, true);
  153. echo "</a>
  154. <a class=\"button\" data-leave-action=\"continue\" href=\"#\"><i class=\"fa fa-fw fa-check\"></i> ";
  155. // line 58
  156. echo twig_escape_filter($this->env, $this->env->getExtension('Grav\Plugin\Admin\AdminTwigExtension')->tuFilter("PLUGIN_ADMIN.CONTINUE"), "html", null, true);
  157. echo "</a>
  158. </div>
  159. </form>
  160. </div>
  161. ";
  162. }
  163. }
  164. public function getTemplateName()
  165. {
  166. return "user.html.twig";
  167. }
  168. public function isTraitable()
  169. {
  170. return false;
  171. }
  172. public function getDebugInfo()
  173. {
  174. return array ( 163 => 58, 159 => 57, 152 => 53, 147 => 51, 141 => 47, 138 => 46, 135 => 45, 131 => 43, 129 => 42, 125 => 40, 122 => 39, 120 => 38, 117 => 37, 114 => 36, 111 => 35, 106 => 32, 100 => 30, 93 => 28, 87 => 26, 79 => 24, 77 => 23, 74 => 22, 71 => 21, 68 => 20, 62 => 18, 57 => 16, 52 => 14, 49 => 13, 46 => 12, 43 => 11, 40 => 10, 36 => 1, 33 => 7, 30 => 5, 28 => 4, 26 => 3, 11 => 1,);
  175. }
  176. /** @deprecated since 1.27 (to be removed in 2.0). Use getSourceContext() instead */
  177. public function getSource()
  178. {
  179. @trigger_error('The '.__METHOD__.' method is deprecated since version 1.27 and will be removed in 2.0. Use getSourceContext() instead.', E_USER_DEPRECATED);
  180. return $this->getSourceContext()->getCode();
  181. }
  182. public function getSourceContext()
  183. {
  184. return new Twig_Source("{% extends 'partials/base.html.twig' %}
  185. {% if admin.route %}
  186. {% set user = admin.data('users/' ~ admin.route) %}
  187. {% set title = \"PLUGIN_ADMIN.USER\"|tu ~ \": \" ~ admin.route|e %}
  188. {% else %}
  189. {% set title = \"PLUGIN_ADMIN_PRO.USERS\"|tu %}
  190. {% endif %}
  191. {% block titlebar %}
  192. {% if not admin.route %}
  193. {% if authorize(['admin.users', 'admin.super']) %}
  194. <div class=\"button-bar\">
  195. <a class=\"button\" href=\"#modal\" data-remodal-target=\"modal\"><i class=\"fa fa-plus\"></i> {{ \"PLUGIN_ADMIN.ADD_ACCOUNT\"|tu }}</a>
  196. </div>
  197. <h1><i class=\"fa fa-fw fa-users\"></i> {{ \"PLUGIN_ADMIN.USERS\"|tu }}</h1>
  198. {% else %}
  199. <h1>{{ \"PLUGIN_ADMIN.ACCESS_DENIED\"|tu }}</h1>
  200. {% endif %}
  201. {% else %}
  202. {% if authorize(['admin.users', 'admin.super']) or grav.user.username == user.username %}
  203. <div class=\"button-bar\">
  204. {% if config.plugins[\"admin-pro\"].enabled %}
  205. <a class=\"button\" href=\"{{ base_url }}/users\"><i class=\"fa fa-reply\"></i> {{ \"PLUGIN_ADMIN.BACK\"|tu }}</a>
  206. {% endif %}
  207. <button class=\"button\" type=\"submit\" name=\"task\" value=\"save\" form=\"blueprints\"><i class=\"fa fa-check\"></i> {{ \"PLUGIN_ADMIN.SAVE\"|tu }}</button>
  208. </div>
  209. <h1><i class=\"fa fa-fw fa-user\"></i> {{ \"PLUGIN_ADMIN.USER\"|tu }}: {{ user.username|e }}</h1>
  210. {% else %}
  211. <h1>{{ \"PLUGIN_ADMIN.ACCESS_DENIED\"|tu }}</h1>
  212. {% endif %}
  213. {% endif %}
  214. {% endblock %}
  215. {% block content %}
  216. {% if authorize(['admin.users', 'admin.super']) or grav.user.username == user.username %}
  217. <div>
  218. {% if not admin.route %}
  219. {% include 'partials/users-list.html.twig' %}
  220. <div class=\"remodal\" data-remodal-id=\"modal\" data-remodal-options=\"hashTracking: false\">
  221. {% include 'partials/blueprints-new.html.twig' with { blueprints: admin.blueprints('user/account_new') } %}
  222. </div>
  223. {% else %}
  224. {% include 'partials/blueprints.html.twig' with { data: user, blueprints: user.blueprints } %}
  225. {% endif %}
  226. </div>
  227. <div class=\"remodal\" data-remodal-id=\"changes\">
  228. <form>
  229. <h1>{{ \"PLUGIN_ADMIN.MODAL_CHANGED_DETECTED_TITLE\"|tu }}</h1>
  230. <p class=\"bigger\">
  231. {{ \"PLUGIN_ADMIN.MODAL_CHANGED_DETECTED_DESC\"|tu }}
  232. </p>
  233. <br>
  234. <div class=\"button-bar\">
  235. <a class=\"button secondary\" data-leave-action=\"cancel\" href=\"#\"><i class=\"fa fa-fw fa-close\"></i> {{ \"PLUGIN_ADMIN.CANCEL\"|tu }}</a>
  236. <a class=\"button\" data-leave-action=\"continue\" href=\"#\"><i class=\"fa fa-fw fa-check\"></i> {{ \"PLUGIN_ADMIN.CONTINUE\"|tu }}</a>
  237. </div>
  238. </form>
  239. </div>
  240. {% endif %}
  241. {% endblock %}
  242. ", "user.html.twig", "/home/kevin/Sites/static-ethica.net/user/plugins/admin/themes/grav/templates/user.html.twig");
  243. }
  244. }