stash light
This commit is contained in:
61
templates/admin/document/index.html.twig
Normal file
61
templates/admin/document/index.html.twig
Normal file
@@ -0,0 +1,61 @@
|
||||
{% extends 'admin/base.html.twig' %}
|
||||
|
||||
{% block title %}Dokumente{% endblock %}
|
||||
|
||||
{% block body %}
|
||||
<div class="d-flex justify-content-between align-items-center mb-3">
|
||||
<h1 class="h4 mb-0">Dokumente</h1>
|
||||
<a href="{{ path('admin_document_new') }}" class="btn btn-sm btn-light">
|
||||
+ Neues Dokument
|
||||
</a>
|
||||
</div>
|
||||
|
||||
{% if documents is empty %}
|
||||
<div class="alert alert-secondary">
|
||||
Keine Dokumente vorhanden.
|
||||
</div>
|
||||
{% else %}
|
||||
<div class="card bg-black text-info border-secondary">
|
||||
<div class="card-body p-0">
|
||||
<table class="table table-dark table-hover mb-0">
|
||||
<thead>
|
||||
<tr>
|
||||
<th>Titel</th>
|
||||
<th>Status</th>
|
||||
<th>Versionen</th>
|
||||
<th>Aktive Version</th>
|
||||
<th>Erstellt am</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
{% for document in documents %}
|
||||
<tr>
|
||||
<td>
|
||||
<a href="{{ path('admin_document_show', {id: document.id}) }}" class="text-decoration-none text-light">
|
||||
{{ document.title }}
|
||||
</a>
|
||||
</td>
|
||||
<td>
|
||||
{% if document.status == 'ACTIVE' %}
|
||||
<span class="badge bg-success">Aktiv</span>
|
||||
{% else %}
|
||||
<span class="badge bg-secondary">Archiviert</span>
|
||||
{% endif %}
|
||||
</td>
|
||||
<td>{{ document.versions|length }}</td>
|
||||
<td>
|
||||
{% if document.currentVersion %}
|
||||
v{{ document.currentVersion.versionNumber }}
|
||||
{% else %}
|
||||
-
|
||||
{% endif %}
|
||||
</td>
|
||||
<td>{{ document.createdAt|date('d.m.Y H:i') }}</td>
|
||||
</tr>
|
||||
{% endfor %}
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
</div>
|
||||
{% endif %}
|
||||
{% endblock %}
|
||||
Reference in New Issue
Block a user