Menü-Editor, farbige Initialen, Seitenköpfe, Favoriten, Vorschaubilder
All checks were successful
CI / PHP 8.3 / mariadb:10.6 (pull_request) Successful in 2m55s
CI / PHP 8.4 / mariadb:10.6 (pull_request) Successful in 2m44s
CI / PHP 8.4 / mariadb:11.4 (pull_request) Successful in 3m25s
CI / PHP 8.3 / mariadb:11.4 (pull_request) Successful in 3m39s
CI / PHP 8.4 / mysql:8.0 (pull_request) Successful in 3m47s
CI / PHP 8.3 / mysql:8.0 (pull_request) Successful in 3m51s
CI / PHP 8.4 / mysql:8.4 (pull_request) Successful in 3m16s
CI / PHP 8.3 / mysql:8.4 (pull_request) Successful in 3m25s
CI / Build-Artefakte aktuell (pull_request) Successful in 1m10s
All checks were successful
CI / PHP 8.3 / mariadb:10.6 (pull_request) Successful in 2m55s
CI / PHP 8.4 / mariadb:10.6 (pull_request) Successful in 2m44s
CI / PHP 8.4 / mariadb:11.4 (pull_request) Successful in 3m25s
CI / PHP 8.3 / mariadb:11.4 (pull_request) Successful in 3m39s
CI / PHP 8.4 / mysql:8.0 (pull_request) Successful in 3m47s
CI / PHP 8.3 / mysql:8.0 (pull_request) Successful in 3m51s
CI / PHP 8.4 / mysql:8.4 (pull_request) Successful in 3m16s
CI / PHP 8.3 / mysql:8.4 (pull_request) Successful in 3m25s
CI / Build-Artefakte aktuell (pull_request) Successful in 1m10s
- Admin → Portal → Menü: Bereiche, Seiten (mit Unterseiten), Links und Gruppen mit Unterpunkten, sortierbar, je Rolle einschränkbar; Kopfzeile misst den Platz und legt Überzähliges unter „Mehr“ - Initialen in fester Farbe je Person, Abteilungsfarben im Organigramm - PageHeader für alle Übersichtsseiten - Dokumente: Favoriten (auch als Startseiten-Kachel), „Häufig genutzt“, Vorschaubilder (Bilder, erste PDF-Seite per pdf.js im Browser) - Platzhalter beim Nachladen Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
This commit is contained in:
parent
114811e6c5
commit
dda250aaad
140 changed files with 1993 additions and 427 deletions
|
|
@ -4,6 +4,7 @@ import { Link } from '@inertiajs/vue3';
|
|||
import { ChevronRight, FileText, FolderOpen, Plus } from '@lucide/vue';
|
||||
import { Button } from '@/components/ui/button';
|
||||
import EmptyState from '@/components/EmptyState.vue';
|
||||
import PageHeader from '@/components/PageHeader.vue';
|
||||
import AppLayout from '@/layouts/AppLayout.vue';
|
||||
import NewPageDialog from '../components/NewPageDialog.vue';
|
||||
|
||||
|
|
@ -17,13 +18,11 @@ const creating = ref(false);
|
|||
|
||||
<template>
|
||||
<AppLayout title="Seiten">
|
||||
<div class="mb-6 flex flex-wrap items-end justify-between gap-4">
|
||||
<div>
|
||||
<h1 class="text-2xl font-semibold tracking-tight">Seiten</h1>
|
||||
<p class="mt-1 text-sm text-muted-foreground">Informationen der Bereiche, Abteilungen und Gremien.</p>
|
||||
</div>
|
||||
<Button v-if="canCreate" @click="creating = true"><Plus /> Neue Seite</Button>
|
||||
</div>
|
||||
<PageHeader title="Seiten" description="Informationen der Bereiche, Abteilungen und Gremien.">
|
||||
<template v-if="canCreate" #actions>
|
||||
<Button @click="creating = true"><Plus /> Neue Seite</Button>
|
||||
</template>
|
||||
</PageHeader>
|
||||
|
||||
<div v-if="tree.length" class="grid gap-5 md:grid-cols-2 xl:grid-cols-3">
|
||||
<section v-for="section in tree" :key="section.id" class="rounded-lg border bg-card">
|
||||
|
|
|
|||
|
|
@ -49,6 +49,32 @@ class PagesPlugin extends Plugin
|
|||
], $this->app->make(PageTree::class)->navigation($user));
|
||||
});
|
||||
|
||||
// Menü-Editor: „Seite“ als Menüpunkt, auf Wunsch mit ihren Unterseiten als Untermenü.
|
||||
$this->app->make(Navigation::class)->source('page', 'Seite', fn () => $this->app->make(PageTree::class)->options(), function (string $id, array $item, Request $request, ?User $user) {
|
||||
$tree = $this->app->make(PageTree::class);
|
||||
$page = $tree->get((int) $id);
|
||||
|
||||
if (! $page || ! $tree->isVisible($page['id'], $user)) {
|
||||
return null;
|
||||
}
|
||||
|
||||
$current = trim((string) $request->route('path'), '/');
|
||||
$isActive = fn (string $path) => $request->routeIs('pages.show') && ($current === $path || str_starts_with($current, $path.'/'));
|
||||
$children = [];
|
||||
|
||||
if (! empty($item['subpages'])) {
|
||||
foreach ($tree->childIds($page['id']) as $childId) {
|
||||
$child = $tree->get($childId);
|
||||
|
||||
if ($child && $tree->isVisible($childId, $user)) {
|
||||
$children[] = ['label' => $child['title'], 'href' => '/seiten/'.$child['path'], 'active' => $isActive($child['path'])];
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
return ['label' => $page['title'], 'href' => '/seiten/'.$page['path'], 'active' => $isActive($page['path']), 'children' => $children];
|
||||
});
|
||||
|
||||
$this->app->make(Editorial::class)->add(
|
||||
'pages',
|
||||
'Seiten',
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue