{% extends "base.html" %} {% load static erp_tags %} {% block title %}Document Library{% endblock %} {% block content %}
{% comment %} d-block: Tabler's .card-header is `display:flex; align-items:center`, which lays this header's two stacked .rows (title+toggle, then the filter form) side by side and shrinks them. Soft UI's card-header was block; d-block restores that so the rows stack full-width. {% endcomment %}
Document Library
{# Filters #}
{% if view_mode == "list" %} {# List View #}
{% for doc in object_list %} {% empty %} {% endfor %}
Title Product Type Verified Action
{{ doc.title }} {{ doc.product.title|truncatechars:40 }} {{ doc.get_document_type_display }} {% if doc.is_verified %}{% else %}{% endif %} {% if doc.r2_url %} {% endif %}
No documents found.
{% else %} {# Grid View #}
{% for doc in object_list %}
{% if doc.document_type == "SPEC_SHEET" %} {% elif doc.document_type == "MANUAL" %} {% elif doc.document_type == "COMPLIANCE" %} {% else %} {% endif %}
{{ doc.title|truncatechars:50 }}

{{ doc.product.title|truncatechars:30 }}

{{ doc.get_document_type_display }}
{% if doc.r2_url %} Download {% endif %}
{% empty %}

No documents found.

{% endfor %}
{% endif %}
{# Pagination #} {% if is_paginated %} {% endif %}
{% endblock %}