Phase 3: Django-natives DMS – Paperless-NGX durch DokumentDatei ersetzt
- 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>
This commit is contained in:
39
app/templates/stiftung/dms/partials/search_results.html
Normal file
39
app/templates/stiftung/dms/partials/search_results.html
Normal file
@@ -0,0 +1,39 @@
|
||||
{% 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 %}
|
||||
10
app/templates/stiftung/dms/partials/upload_success.html
Normal file
10
app/templates/stiftung/dms/partials/upload_success.html
Normal file
@@ -0,0 +1,10 @@
|
||||
<div class="alert alert-success d-flex align-items-center gap-3 mt-3">
|
||||
<i class="fas fa-check-circle fa-2x"></i>
|
||||
<div>
|
||||
<strong>Erfolgreich hochgeladen!</strong>
|
||||
<div class="small">
|
||||
„{{ dok.titel }}" — {{ dok.get_human_size }}
|
||||
<a href="{% url 'stiftung:dms_detail' pk=dok.pk %}" class="ms-2">Details ansehen</a>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
Reference in New Issue
Block a user