tools-scheduler.html.twig 1.3 KB

123456789101112131415161718192021222324252627282930313233
  1. <div class="scheduler-content">
  2. {% set data = admin.data('config/scheduler') %}
  3. {% set cron_status = grav.scheduler.isCrontabSetup()%}
  4. {% if cron_status == 1 %}
  5. <div class="alert notice secondary-accent">
  6. <div id="show-instructions" class="button button-small"><i class="fa fa-clock-o"></i> {{ "PLUGIN_ADMIN.SCHEDULER_INSTALL_INSTRUCTIONS"|tu }}</div>
  7. <i class="fa fa-check"></i> {{ "PLUGIN_ADMIN.SCHEDULER_INSTALLED_READY"|tu }}
  8. </div>
  9. {% elseif cron_status == 2 %}
  10. <div class="alert warning"> {{ "PLUGIN_ADMIN.SCHEDULER_CRON_NA"|tu }}</div>
  11. {% else %}
  12. <div class="alert warning"> {{ "PLUGIN_ADMIN.SCHEDULER_NOT_ENABLED"|tu }}</div>
  13. {% endif %}
  14. <div id="cron-install" class="form-border overlay {{ cron_status == 1 ? 'hide' : ''}}">
  15. <pre><code>{{- grav.scheduler.getCronCommand()|trim -}}</code></pre>
  16. <p>{{ "PLUGIN_ADMIN.SCHEDULER_POST_INSTRUCTIONS"|tu|raw }}</p>
  17. </div>
  18. {% include 'partials/blueprints.html.twig' with { blueprints: data.blueprints, data: data } %}
  19. {% include 'partials/modal-changes-detected.html.twig' %}
  20. <script>
  21. $('#show-instructions').click(function() {
  22. $('#cron-install').toggleClass( "hide" );
  23. });
  24. </script>
  25. </div>