- Neues Modell DokumentDatei mit PostgreSQL FTS (SearchVectorField, GinIndex) - Upload-Pfad: dokumente/YYYY/MM/<uuid>/dateiname - 7 DMS-Views: list, detail, download, upload (HTMX Drag&Drop), delete, edit, search_api - Templates: list, detail, edit, upload mit Drag&Drop-Zone, Partials - URLs: /dms/ komplett verdrahtet - Sidebar: DMS als Primäreintrag, Paperless als Legacy - Migrationsskript: manage.py migrate_paperless_dokumente (DokumentLink → DokumentDatei) - compose.yml: paperless-Dienst deaktiviert (Legacy-Kommentarblock) - Migration 0048 angewendet Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
40 lines
1.9 KiB
HTML
40 lines
1.9 KiB
HTML
{% if results %}
|
||
<div class="card shadow mb-4 border-primary">
|
||
<div class="card-header bg-primary text-white py-2">
|
||
<span class="small fw-bold">
|
||
<i class="fas fa-search me-2"></i>Live-Suche: „{{ q }}" – {{ results|length }} Treffer
|
||
</span>
|
||
</div>
|
||
<div class="card-body p-0">
|
||
<div class="table-responsive">
|
||
<table class="table table-sm table-hover mb-0">
|
||
<tbody>
|
||
{% for dok in results %}
|
||
<tr>
|
||
<td class="align-middle">
|
||
<a href="{% url 'stiftung:dms_detail' pk=dok.pk %}" class="text-decoration-none fw-semibold">
|
||
{% if dok.is_pdf %}<i class="fas fa-file-pdf text-danger me-1"></i>{% else %}<i class="fas fa-file text-muted me-1"></i>{% endif %}
|
||
{{ dok.titel|truncatechars:60 }}
|
||
</a>
|
||
{% if dok.beschreibung %}
|
||
<div class="small text-muted">{{ dok.beschreibung|truncatechars:80 }}</div>
|
||
{% endif %}
|
||
</td>
|
||
<td class="align-middle">
|
||
<span class="badge bg-secondary small">{{ dok.get_kontext_display }}</span>
|
||
</td>
|
||
<td class="align-middle small text-muted text-nowrap">{{ dok.erstellt_am|date:"d.m.Y" }}</td>
|
||
<td class="align-middle text-end">
|
||
<a href="{% url 'stiftung:dms_download' pk=dok.pk %}" class="btn btn-xs btn-outline-success" style="font-size:0.7rem;padding:2px 6px;">
|
||
<i class="fas fa-download"></i>
|
||
</a>
|
||
</td>
|
||
</tr>
|
||
{% endfor %}
|
||
</tbody>
|
||
</table>
|
||
</div>
|
||
</div>
|
||
</div>
|
||
{% endif %}
|