feat: treat all uploads of type 'document' as global

This commit is contained in:
Björn Fromme
2024-01-31 18:05:56 +01:00
parent 5ad7bfe769
commit 4be039e482
12 changed files with 15 additions and 130 deletions
@@ -25,10 +25,6 @@
{{ form_widget(form.showAvailableDispositions) }}
</div>
</div>
{# <div class="grid lg:grid-cols-2 gap-x-8 gap-y-4">#}
{# {{ form_row(form.dateFrom) }}#}
{# {{ form_row(form.dateTo) }}#}
{# </div>#}
<div class="grid lg:grid-cols-2 gap-x-8 gap-y-4">
{{ form_row(form.jobProfile) }}
{{ form_row(form.contact) }}
@@ -44,25 +40,7 @@
<div class="grid lg:grid-cols-2 gap-x-8 gap-y-4">
{{ form_row(form.benefits) }}
{{ form_row(form.fees) }}
</div>
<div class="grid lg:grid-cols-2 gap-x-8 gap-y-4">
{{ form_row(form.remarks) }}
<div {{ stimulus_controller('form-collection', { 'prototype': _self.collectionRow(form.documents.vars.prototype)|json_encode }) }}>
<h4 class="font-bold pb-2">
Dokumente
</h4>
<div {{ stimulus_target('form-collection', 'fields')}} class="flex flex-col space-y-4 mb-4">
{% do form.documents.setRendered %}
{%- for document in form.documents -%}{{- _self.collectionRow(document) -}}{%- endfor -%}
</div>
<div class="flex justify-end">
<button type="button"
{{ stimulus_action('form-collection', 'addItem') }}
title="Dokument hinzufügen">
{{ icon('plus', 'w-4 h-4 pointer-events-none') }}
</button>
</div>
</div>
</div>
</div>
<div class="flex items-center space-x-2">
@@ -2,9 +2,6 @@
<div class="pb-4">
{{ form_row(form.displayName) }}
</div>
<div class="pb-4">
{{ form_row(form.global) }}
</div>
<button type="submit" class="btn">
aktualisieren
</button>
@@ -17,9 +17,6 @@
<th>
Dateigröße
</th>
<th>
global
</th>
<th>
Upload am
</th>
@@ -38,10 +35,6 @@
<td>
{{ document.size|file_size }}
</td>
<td>
{% set icon = document.global ? 'check' : 'minus' %}
{{ icon(icon, 'w-4 h-4') }}
</td>
<td>
{{ document.createdAt|date('d.m.Y') }}
</td>
@@ -85,7 +78,7 @@
</tr>
{% else %}
<tr>
<td colspan="7">
<td colspan="5">
Keine Daten...
</td>
</tr>
@@ -6,9 +6,6 @@
'accepted_files': 'application/pdf',
} %}
</div>
<div class="pb-4">
{{ form_row(form.global) }}
</div>
<button type="submit" class="btn">
Uploads speichern
</button>