{# -*- engine:django -*- #}
{% extends "core/base.html" %}
{% load i18n %}

{% block browser_title %}{% blocktrans %}System status{% endblocktrans %}{% endblock %}

{% block page_title %}{% blocktrans %}System status{% endblocktrans %}{% endblock %}

{% block content %}
  <div class="card">
    <div class="card-content">
      <span class="card-title"> {% blocktrans %}System checks{% endblocktrans %}</span>

      {# Maintenance mode #}
      <div class="row">
        {% if maintenance_mode %}
          <a class="btn-flat btn-flat-medium right waves-effect waves-red no-padding"
             href="{% url 'maintenance_mode_off' %}"><i
                  class="material-icons small red-text center">power_settings_new</i></a>
          <div>
            <p class="flow-text">{% blocktrans %}Maintenance mode enabled{% endblocktrans %}</p>
            <p class="grey-text">
              {% blocktrans %}
                Only admin and visitors from internal IPs can access thesite.
              {% endblocktrans %}
            </p>
          </div>
          <span class="badge badge-danger mdi mdi-power"><a href="{% url 'maintenance_mode_off' %}"></a></span>
        {% else %}
          <a class="btn-flat btn-flat-medium right waves-effect waves-green no-padding"
             href="{% url 'maintenance_mode_on' %}"><i
                  class="material-icons small green-text center">power_settings_new</i></a>
          <div>
            <p class="flow-text">{% blocktrans %}Maintenance mode disabled{% endblocktrans %}</p>
            <p class="grey-text">{% blocktrans %}Everyone can access the site.{% endblocktrans %}</p>
          </div>
        {% endif %}
      </div>

      {# Debug mode #}
      <div class="row">
        {% if DEBUG %}
          <i class="material-icons small red-text right">power_settings_new</i>
          <div>
            <p class="flow-text">{% blocktrans %}Debug mode enabled{% endblocktrans %}</p>
            <p class="grey-text">
              {% blocktrans %}
                The web server throws back debug information on errors. Do not use in production!
              {% endblocktrans %}</p>
          </div>
        {% else %}
          <i class="material-icons small green-text right">power_settings_new</i>
          <div>
            <p class="flow-text">{% blocktrans %}Debug mode disabled{% endblocktrans %}</p>
            <p class="grey-text">
              {% blocktrans %}
                Debug mode is disabled. Default error pages are displayed on errors.
              {% endblocktrans %}
            </p>
          </div>
        {% endif %}
      </div>
    </div>
  </div>
{% endblock %}
