laterite-admin 0.9.16

Laterite CMF admin surface: the Axum router, session middleware, and login shell
Documentation
{% extends "base.html" %}
{% block title %}{{ shell.t("Plugins") }} - {{ shell.brand }}{% endblock %}
{% block content %}
<div class="lat-toolbar">
  <h1>{{ shell.t("Plugins") }}</h1>
</div>
<p class="lat-help" style="margin:0 0 16px">{{ shell.t("Enabling or disabling a plugin takes effect on the next restart.") }}</p>
<div class="lat-tablewrap">
  <table class="lat-table">
    <thead><tr>
      <th>{{ shell.t("Plugin") }}</th>
      <th>{{ shell.t("Version") }}</th>
      <th>{{ shell.t("Status") }}</th>
      <th></th>
    </tr></thead>
    <tbody>
      {% if plugins.is_empty() %}
      <tr><td class="lat-table__empty" colspan="99">{{ shell.t("No plugins installed.") }}</td></tr>
      {% else %}
      {% for p in plugins %}
      <tr>
        <td>{{ p.id }}</td>
        <td>{{ p.version }}</td>
        <td>
          {% if p.quarantined %}
          <span class="lat-status lat-status--quarantined">{{ shell.t("Quarantined") }}</span>
          <p class="lat-help">{{ p.quarantined_reason }}</p>
          {% else if p.enabled %}
          <span class="lat-status lat-status--on">{{ shell.t("Enabled") }}</span>
          {% else %}
          <span class="lat-status lat-status--off">{{ shell.t("Disabled") }}</span>
          {% endif %}
        </td>
        <td class="lat-table__actions">
          <form method="post" action="{{ toggle_action }}">
            {% include "_csrf.html" %}
            <input type="hidden" name="plugin_id" value="{{ p.id }}">
            <input type="hidden" name="enable" value="{% if p.action_target %}1{% else %}0{% endif %}">
            <button class="lat-btn lat-btn--secondary lat-btn--sm" type="submit">{{ shell.t(p.action_label) }}</button>
          </form>
        </td>
      </tr>
      {% endfor %}
      {% endif %}
    </tbody>
  </table>
</div>
{% endblock %}