dashboard-maintenance.html.twig 2.1 KB

123456789101112131415161718192021222324252627282930313233
  1. {% if authorize(['admin.maintenance', 'admin.super']) %}
  2. {% set backup = admin.lastBackup() %}
  3. <div id="updates" class="dashboard-item dashboard-left">
  4. <div class="secondary-accent default-box-shadow">
  5. <h1>{{ "PLUGIN_ADMIN.MAINTENANCE"|tu }}</h1>
  6. <div class="admin-update-charts">
  7. <div class="updates-chart" data-chart-name="updates" data-chart-type="pie" data-chart-data="{{ {'series': [100, 0]}|json_encode|e('html_attr') }}">
  8. <div class="chart-wrapper">
  9. <div class="ct-chart chart-loader"><i class="fa fa-refresh fa-spin"></i></div>
  10. <span class="numeric hidden"><span>-</span><em>{{ "PLUGIN_ADMIN.UPDATED"|tu|lower }}</em></span>
  11. </div>
  12. <p class="js__updates-available-description">&nbsp;</p>
  13. </div>
  14. <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') }}">
  15. <div class="chart-wrapper">
  16. <div class="ct-chart chart-loader"><i class="fa fa-refresh fa-spin"></i></div>
  17. <span class="numeric hidden">{{ backup.days|raw }}<em>{{ "PLUGIN_ADMIN.DAYS"|tu|lower }}</em></span>
  18. </div>
  19. <p class="hidden">{{ "PLUGIN_ADMIN.LAST_BACKUP"|tu }}</p>
  20. </div>
  21. </div>
  22. <div class="flush-bottom button-bar">
  23. <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>
  24. <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>
  25. </div>
  26. </div>
  27. </div>
  28. {% include 'partials/modal-update-packages.html.twig' with { type: 'plugin' } %}
  29. {% endif %}