laterite-admin 0.6.2

Laterite CMF admin surface: the Axum router, session middleware, and login shell
Documentation
<div id="lat-list" data-filtered="{{ filtered }}">
  <div class="lat-tablewrap">
    <table class="lat-table">
      <thead><tr>
        {% if deletable %}<th class="lat-table__pick"><input type="checkbox" data-lat-widget="pick-all" aria-label='{{ shell.t("Select all") }}'></th>{% endif %}
        {% for c in columns %}
        <th{% if c.active == "asc" %} aria-sort="ascending"{% else if c.active == "desc" %} aria-sort="descending"{% endif %}>
          <a class="lat-sort{% if !c.active.is_empty() %} is-active{% endif %}"
             href="?sort={{ c.field }}&amp;dir={{ c.next_dir }}{{ carry }}"
             hx-get="?sort={{ c.field }}&amp;dir={{ c.next_dir }}{{ carry }}"
             hx-target="#lat-list" hx-swap="outerHTML" hx-push-url="true">
            <span>{{ c.label }}</span>
            <span class="lat-sort__arrow" aria-hidden="true">{% if c.active == "asc" %}&#9650;{% else if c.active == "desc" %}&#9660;{% endif %}</span>
          </a>
        </th>
        {% endfor %}
        {% if edit_base.is_some() %}<th></th>{% endif %}
      </tr></thead>
      <tbody>
        {% if rows.is_empty() %}
        <tr><td class="lat-table__empty" colspan="99">
          {% if filtered %}
          {{ shell.t("No records match.") }}
          {% else %}
          {{ shell.t("No records yet.") }}
          {% if creatable %}{% if let Some(base) = edit_base %}
          <a class="lat-btn lat-btn--primary lat-btn--sm lat-table__emptyaction" href="{{ base }}/new">+ {{ shell.t("New") }}</a>
          {% endif %}{% endif %}
          {% endif %}
        </td></tr>
        {% else %}
        {% for row in rows %}
        <tr>
          {% if deletable %}<td class="lat-table__pick"><input type="checkbox" name="id" value="{{ row.id }}" form="lat-list-actions" aria-label='{{ shell.t("Select record") }}'></td>{% endif %}
          {% for cell in row.cells %}<td>{{ cell|safe }}</td>{% endfor %}
          {% if let Some(base) = edit_base %}<td class="lat-table__actions"><a href="{{ base }}/{{ row.id }}/edit">{{ shell.t("Edit") }}</a></td>{% endif %}
        </tr>
        {% endfor %}
        {% endif %}
      </tbody>
    </table>
  </div>
  <div class="lat-listfoot">
    <span>{{ shell.tf("Displayed records: {shown} of {total}", [("shown", shown), ("total", total)]) }}</span>
    <span class="lat-pager">
      {% if page > 1 %}<a class="lat-btn lat-btn--secondary lat-btn--sm" href="?page={{ page - 1 }}&amp;sort={{ sort }}&amp;dir={{ dir }}{{ carry }}" hx-get="?page={{ page - 1 }}&amp;sort={{ sort }}&amp;dir={{ dir }}{{ carry }}" hx-target="#lat-list" hx-swap="outerHTML" hx-push-url="true">&larr; {{ shell.t("Prev") }}</a>{% endif %}
      <span style="align-self:center">{{ shell.tf("Page {page} of {pages}", [("page", page), ("pages", total_pages)]) }}</span>
      {% if page < total_pages %}<a class="lat-btn lat-btn--secondary lat-btn--sm" href="?page={{ page + 1 }}&amp;sort={{ sort }}&amp;dir={{ dir }}{{ carry }}" hx-get="?page={{ page + 1 }}&amp;sort={{ sort }}&amp;dir={{ dir }}{{ carry }}" hx-target="#lat-list" hx-swap="outerHTML" hx-push-url="true">{{ shell.t("Next") }} &rarr;</a>{% endif %}
    </span>
  </div>
</div>