{% extends "base.html" %} {% from "macros.html" import icon, btn, badge %} {% block title %}{{ model_label }}{% endblock %} {% block content %}
{% if total == 0 %}{{ t('No records') }} {% elif total == 1 %}1 {{ t('record') }} {% else %}{{ total }} {{ t('records') }}{% endif %}
| {% set has_actions = can_edit or can_delete %} {% for s in sort_links %} | {{ s.col }}{% if s.arrow %} {{ s.arrow }}{% endif %} | {% endfor %} {% if has_actions %}{{ t('ACTIONS') }} | {% endif %}
|---|---|---|
| {% for col in columns %} | {% if loop.first %} {{ row[col] | date }} {% else %} {{ row[col] | date }} {% endif %} | {% endfor %} {% if has_actions %}
{% if is_auth_model and row.id != request.user.id and not trash %}
{% endif %}
{# View button - always show if user has view permission #}
{% if user_can_view and not trash %}
{{ icon('search', 16) }}
{% endif %}
{# Edit button - only show if user has edit permission #}
{% if user_can_edit and not trash %}
{{ icon('edit', 16) }}
{% endif %}
{% if trash %}
{# Delete button - only show if user has delete permission #}
{% elif user_can_delete %}
{% endif %}
|
{% endif %}
{{ t('No records found') }}
{% if q %}{{ t('Try a different search term or filter.') }} {% else %}{{ t('Get started by adding your first record.') }}{% endif %}
{% if can_add and not trash %} {{ icon('plus', 16) }} {{ t('Add first record') }} {% endif %}