„Dokumente“ heißt jetzt „Downloads“
All checks were successful
CI / PHP 8.3 / mariadb:10.6 (pull_request) Successful in 2m38s
CI / PHP 8.4 / mariadb:10.6 (pull_request) Successful in 2m31s
CI / PHP 8.4 / mariadb:11.4 (pull_request) Successful in 2m39s
CI / PHP 8.3 / mariadb:11.4 (pull_request) Successful in 3m54s
CI / PHP 8.3 / mysql:8.0 (pull_request) Successful in 3m50s
CI / PHP 8.4 / mysql:8.0 (pull_request) Successful in 3m55s
CI / PHP 8.3 / mysql:8.4 (pull_request) Successful in 3m18s
CI / PHP 8.4 / mysql:8.4 (pull_request) Successful in 3m19s
CI / Build-Artefakte aktuell (pull_request) Successful in 55s

Der Name „Dokumente“ bleibt dem kommenden QM-Modul (QM-Dokumente und
-Formulare) vorbehalten.

- Plugin plugins-core/downloads (Inhaus\Plugins\Downloads), Adresse
  /downloads, Rechte downloads.*, Objekttyp download_folder,
  Block downloads.folder, Kachel downloads.favorites
- Migration für bestehende Installationen: Tabellen und Spalten,
  Rechte, Sichtbarkeiten, Menü, Startseiten-Anordnung, Blöcke in
  Seiten und Fassungen, Plugin-Zustand; mit Test
- Alte Links unter /dokumente leiten dauerhaft weiter

Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
This commit is contained in:
Friederich Loheide 2026-09-26 15:03:32 +00:00
parent c71131d054
commit f78cc96be7
120 changed files with 1091 additions and 866 deletions

View file

@ -0,0 +1,32 @@
<script setup>
import { Link } from '@inertiajs/vue3';
import { ChevronRight, Download } from '@lucide/vue';
import FileIcon from '../components/FileIcon.vue';
defineProps({ block: { type: Object, required: true } });
const formatSize = (bytes) => (bytes >= 1024 * 1024 ? `${(bytes / 1024 / 1024).toFixed(1).replace('.', ',')} MB` : `${Math.max(1, Math.round(bytes / 1024))} KB`);
</script>
<template>
<section v-if="block.props">
<div v-if="block.data.title" class="mb-3 flex items-center justify-between gap-4">
<h3 class="text-lg font-semibold">{{ block.data.title }}</h3>
<Link :href="block.props.folder_url" class="inline-flex items-center gap-0.5 text-[13px] font-medium text-brand-text hover:underline">Zum Ordner <ChevronRight class="size-3.5" /></Link>
</div>
<ul class="divide-y rounded-lg border bg-card">
<li v-for="doc in block.props.downloads" :key="doc.id">
<a :href="doc.download_url" class="group flex items-center gap-3 px-4 py-3 hover:bg-accent/50">
<FileIcon :extension="doc.extension" />
<span class="min-w-0 flex-1">
<span class="block truncate text-sm font-medium group-hover:underline">{{ doc.title }}</span>
<span v-if="block.data.show_description && doc.description" class="block truncate text-[13px] text-muted-foreground">{{ doc.description }}</span>
<span class="block text-xs text-muted-foreground">{{ doc.extension }} · {{ formatSize(doc.size) }}</span>
</span>
<Download class="size-4 shrink-0 text-muted-foreground" />
</a>
</li>
<li v-if="!block.props.downloads.length" class="px-4 py-3 text-sm text-muted-foreground">Keine Dateien in diesem Ordner.</li>
</ul>
</section>
</template>