p96 follow up

This commit is contained in:
team 1
2026-05-11 15:39:00 +02:00
parent 3e678c659c
commit f098a1a244
25 changed files with 790 additions and 131 deletions

View File

@@ -13,10 +13,12 @@
</div>
<div class="d-flex flex-wrap gap-2">
<a href="{{ path('admin_document_tags_edit', {id: document.id}) }}"
class="btn btn-sm btn-outline-info">
Tags bearbeiten
</a>
{% if is_granted('ROLE_EDITOR') %}
<a href="{{ path('admin_document_tags_edit', {id: document.id}) }}"
class="btn btn-sm btn-outline-info">
Tags bearbeiten
</a>
{% endif %}
<a href="{{ path('admin_documents') }}"
class="btn btn-sm btn-outline-secondary">
@@ -96,26 +98,30 @@
</div>
</div>
{% if is_granted('ROLE_SUPER_ADMIN') %}
{% if is_granted('ROLE_EDITOR') or is_granted('ROLE_SUPER_ADMIN') %}
<hr class="border-secondary">
<div class="d-flex flex-wrap gap-2">
<a href="{{ path('admin_document_version_new', {id: document.id}) }}"
class="btn btn-sm btn-outline-info">
Neue Version
</a>
{% if is_granted('ROLE_EDITOR') %}
<a href="{{ path('admin_document_version_new', {id: document.id}) }}"
class="btn btn-sm btn-outline-info">
Neue Version
</a>
{% endif %}
<form method="post"
action="{{ path('admin_document_delete', {id: document.id}) }}"
class="d-inline"
onsubmit="return confirm('Dokument wirklich löschen? Der Inhalt wird per Delete-Job aus dem Index entfernt.');">
<input type="hidden"
name="_token"
value="{{ csrf_token('delete_document_' ~ document.id) }}">
<button class="btn btn-sm btn-outline-danger">
Dokument löschen
</button>
</form>
{% if is_granted('ROLE_SUPER_ADMIN') %}
<form method="post"
action="{{ path('admin_document_delete', {id: document.id}) }}"
class="d-inline"
onsubmit="return confirm('Dokument wirklich löschen? Der Inhalt wird per Delete-Job aus dem Index entfernt.');">
<input type="hidden"
name="_token"
value="{{ csrf_token('delete_document_' ~ document.id) }}">
<button class="btn btn-sm btn-outline-danger">
Dokument löschen
</button>
</form>
{% endif %}
</div>
{% endif %}
</div>
@@ -128,10 +134,12 @@
<div class="d-flex justify-content-between align-items-center mb-3">
<h5 class="text-info mb-0">Tags</h5>
<a href="{{ path('admin_document_tags_edit', {id: document.id}) }}"
class="btn btn-sm btn-outline-light">
Bearbeiten
</a>
{% if is_granted('ROLE_EDITOR') %}
<a href="{{ path('admin_document_tags_edit', {id: document.id}) }}"
class="btn btn-sm btn-outline-light">
Bearbeiten
</a>
{% endif %}
</div>
{% if document.tags is empty %}
@@ -172,7 +180,7 @@
</div>
</div>
{% if is_granted('ROLE_SUPER_ADMIN') %}
{% if is_granted('ROLE_EDITOR') %}
<a href="{{ path('admin_document_version_new', {id: document.id}) }}"
class="btn btn-sm btn-outline-info">
Neue Version
@@ -258,7 +266,7 @@
<td class="text-end">
<div class="d-flex justify-content-end flex-wrap gap-2">
{% if version.isActive %}
{% if version.ingestStatus in ['PENDING', 'FAILED'] and is_granted('ROLE_SUPER_ADMIN') %}
{% if version.ingestStatus in ['PENDING', 'FAILED'] and is_granted('ROLE_EDITOR') %}
<form method="post"
action="{{ path('admin_document_version_ingest', {versionId: version.id}) }}"
class="d-inline"
@@ -276,7 +284,7 @@
</span>
{% endif %}
{% else %}
{% if is_granted('ROLE_SUPER_ADMIN') %}
{% if is_granted('ROLE_EDITOR') %}
<form method="post"
action="{{ path('admin_document_version_activate', {versionId: version.id}) }}"
class="d-inline"