b18f57dfabce59fde3f42b1cf1b07212b4f3dda9ac5dd2f02aa9fe3ff5a4a867.php 8.0 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149
  1. <?php
  2. /* partials/dashboard-maintenance.html.twig */
  3. class __TwigTemplate_a470d135d26a04aa2aee9b5aaf13705939e8fa7156c7bfbe73651dd967f21c9b 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. if ($this->env->getExtension('Grav\Common\Twig\TwigExtension')->authorize(array(0 => "admin.maintenance", 1 => "admin.super"))) {
  16. // line 2
  17. echo " ";
  18. $context["backup"] = $this->getAttribute(($context["admin"] ?? null), "lastBackup", array(), "method");
  19. // line 3
  20. echo "
  21. <div id=\"updates\" class=\"dashboard-item dashboard-left\">
  22. <div class=\"secondary-accent default-box-shadow\">
  23. <h1>";
  24. // line 6
  25. echo twig_escape_filter($this->env, $this->env->getExtension('Grav\Plugin\Admin\AdminTwigExtension')->tuFilter("PLUGIN_ADMIN.MAINTENANCE"), "html", null, true);
  26. echo "</h1>
  27. <div class=\"admin-update-charts\">
  28. <div class=\"updates-chart\" data-chart-name=\"updates\" data-chart-type=\"pie\" data-chart-data=\"";
  29. // line 8
  30. echo twig_escape_filter($this->env, twig_jsonencode_filter(array("series" => array(0 => 100, 1 => 0))), "html_attr");
  31. echo "\">
  32. <div class=\"chart-wrapper\">
  33. <div class=\"ct-chart chart-loader\"><i class=\"fa fa-refresh fa-spin\"></i></div>
  34. <span class=\"numeric hidden\"><span>-</span><em>";
  35. // line 11
  36. echo twig_escape_filter($this->env, twig_lower_filter($this->env, $this->env->getExtension('Grav\Plugin\Admin\AdminTwigExtension')->tuFilter("PLUGIN_ADMIN.UPDATED")), "html", null, true);
  37. echo "</em></span>
  38. </div>
  39. <p class=\"js__updates-available-description\">&nbsp;</p>
  40. </div>
  41. <div class=\"backups-chart\" data-chart-name=\"backups\" data-chart-type=\"pie\" data-chart-data=\"";
  42. // line 15
  43. echo twig_escape_filter($this->env, twig_jsonencode_filter(array("series" => array(0 => $this->getAttribute(($context["backup"] ?? null), "chart_fill", array()), 1 => $this->getAttribute(($context["backup"] ?? null), "chart_empty", array())))), "html_attr");
  44. echo "\">
  45. <div class=\"chart-wrapper\">
  46. <div class=\"ct-chart chart-loader\"><i class=\"fa fa-refresh fa-spin\"></i></div>
  47. <span class=\"numeric hidden\">";
  48. // line 18
  49. echo $this->getAttribute(($context["backup"] ?? null), "days", array());
  50. echo "<em>";
  51. echo twig_escape_filter($this->env, twig_lower_filter($this->env, $this->env->getExtension('Grav\Plugin\Admin\AdminTwigExtension')->tuFilter("PLUGIN_ADMIN.DAYS")), "html", null, true);
  52. echo "</em></span>
  53. </div>
  54. <p class=\"hidden\">";
  55. // line 20
  56. echo twig_escape_filter($this->env, $this->env->getExtension('Grav\Plugin\Admin\AdminTwigExtension')->tuFilter("PLUGIN_ADMIN.LAST_BACKUP"), "html", null, true);
  57. echo "</p>
  58. </div>
  59. </div>
  60. <div class=\"flush-bottom button-bar\">
  61. <a class=\"button hidden\" href=\"#\" data-update-packages data-remodal-target=\"update-packages\" data-plugin-action=\"start-packages-update\"><i class=\"fa fa-cloud-download\"></i> ";
  62. // line 25
  63. echo twig_escape_filter($this->env, $this->env->getExtension('Grav\Plugin\Admin\AdminTwigExtension')->tuFilter("PLUGIN_ADMIN.UPDATE"), "html", null, true);
  64. echo "</a>
  65. <button data-ajax=\"";
  66. // line 26
  67. echo twig_escape_filter($this->env, $this->getAttribute(($context["uri"] ?? null), "addNonce", array(0 => (((($context["base_url_relative"] ?? null) . "/backup.json/task") . $this->getAttribute($this->getAttribute(($context["config"] ?? null), "system", array()), "param_sep", array())) . "backup"), 1 => "admin-form", 2 => "admin-nonce"), "method"), "html", null, true);
  68. echo "\" class=\"button\"><i class=\"fa fa-database\"></i> ";
  69. echo twig_escape_filter($this->env, $this->env->getExtension('Grav\Plugin\Admin\AdminTwigExtension')->tuFilter("PLUGIN_ADMIN.BACKUP"), "html", null, true);
  70. echo "</button>
  71. </div>
  72. </div>
  73. </div>
  74. ";
  75. // line 31
  76. $this->loadTemplate("partials/modal-update-packages.html.twig", "partials/dashboard-maintenance.html.twig", 31)->display(array_merge($context, array("type" => "plugin")));
  77. // line 32
  78. echo "
  79. ";
  80. }
  81. }
  82. public function getTemplateName()
  83. {
  84. return "partials/dashboard-maintenance.html.twig";
  85. }
  86. public function isTraitable()
  87. {
  88. return false;
  89. }
  90. public function getDebugInfo()
  91. {
  92. return array ( 84 => 32, 82 => 31, 72 => 26, 68 => 25, 60 => 20, 53 => 18, 47 => 15, 40 => 11, 34 => 8, 29 => 6, 24 => 3, 21 => 2, 19 => 1,);
  93. }
  94. /** @deprecated since 1.27 (to be removed in 2.0). Use getSourceContext() instead */
  95. public function getSource()
  96. {
  97. @trigger_error('The '.__METHOD__.' method is deprecated since version 1.27 and will be removed in 2.0. Use getSourceContext() instead.', E_USER_DEPRECATED);
  98. return $this->getSourceContext()->getCode();
  99. }
  100. public function getSourceContext()
  101. {
  102. return new Twig_Source("{% if authorize(['admin.maintenance', 'admin.super']) %}
  103. {% set backup = admin.lastBackup() %}
  104. <div id=\"updates\" class=\"dashboard-item dashboard-left\">
  105. <div class=\"secondary-accent default-box-shadow\">
  106. <h1>{{ \"PLUGIN_ADMIN.MAINTENANCE\"|tu }}</h1>
  107. <div class=\"admin-update-charts\">
  108. <div class=\"updates-chart\" data-chart-name=\"updates\" data-chart-type=\"pie\" data-chart-data=\"{{ {'series': [100, 0]}|json_encode|e('html_attr') }}\">
  109. <div class=\"chart-wrapper\">
  110. <div class=\"ct-chart chart-loader\"><i class=\"fa fa-refresh fa-spin\"></i></div>
  111. <span class=\"numeric hidden\"><span>-</span><em>{{ \"PLUGIN_ADMIN.UPDATED\"|tu|lower }}</em></span>
  112. </div>
  113. <p class=\"js__updates-available-description\">&nbsp;</p>
  114. </div>
  115. <div class=\"backups-chart\" data-chart-name=\"backups\" data-chart-type=\"pie\" data-chart-data=\"{{ {'series': [backup.chart_fill, backup.chart_empty]}|json_encode|e('html_attr') }}\">
  116. <div class=\"chart-wrapper\">
  117. <div class=\"ct-chart chart-loader\"><i class=\"fa fa-refresh fa-spin\"></i></div>
  118. <span class=\"numeric hidden\">{{ backup.days|raw }}<em>{{ \"PLUGIN_ADMIN.DAYS\"|tu|lower }}</em></span>
  119. </div>
  120. <p class=\"hidden\">{{ \"PLUGIN_ADMIN.LAST_BACKUP\"|tu }}</p>
  121. </div>
  122. </div>
  123. <div class=\"flush-bottom button-bar\">
  124. <a class=\"button hidden\" href=\"#\" data-update-packages data-remodal-target=\"update-packages\" data-plugin-action=\"start-packages-update\"><i class=\"fa fa-cloud-download\"></i> {{ \"PLUGIN_ADMIN.UPDATE\"|tu }}</a>
  125. <button data-ajax=\"{{ uri.addNonce(base_url_relative ~ '/backup.json/task' ~ config.system.param_sep ~ 'backup', 'admin-form', 'admin-nonce') }}\" class=\"button\"><i class=\"fa fa-database\"></i> {{ \"PLUGIN_ADMIN.BACKUP\"|tu }}</button>
  126. </div>
  127. </div>
  128. </div>
  129. {% include 'partials/modal-update-packages.html.twig' with { type: 'plugin' } %}
  130. {% endif %}
  131. ", "partials/dashboard-maintenance.html.twig", "/mnt/data/Sites/static-ethica.net/user/plugins/admin/themes/grav/templates/partials/dashboard-maintenance.html.twig");
  132. }
  133. }