updaetd to roles and permissions

This commit is contained in:
Mark Gregory
2026-08-26 10:38:38 +01:00
parent af6ebe5730
commit 7fcef01be4
10 changed files with 456 additions and 21 deletions
@@ -19,6 +19,7 @@
<article class="doc-card doc-stat"><strong>{{ $stats['published'] }}</strong><span>Published</span></article>
<article class="doc-card doc-stat"><strong>{{ $stats['drafts'] }}</strong><span>Drafts</span></article>
<article class="doc-card doc-stat"><strong>{{ $stats['categories'] }}</strong><span>Categories</span></article>
<article class="doc-card doc-stat"><strong>{{ $stats['archived'] }}</strong><span>Archived</span></article>
</section>
@if ($featuredDocuments->isNotEmpty())
@@ -40,7 +41,12 @@
<section class="doc-card">
<div class="doc-card-header">
<strong>Document register</strong>
<a class="doc-button success" href="{{ route('documentation.documents.create') }}">New document</a>
<div class="doc-actions">
<a class="doc-button secondary" href="{{ route('documentation.documents.archived') }}">
Archived documents ({{ $stats['archived'] }})
</a>
<a class="doc-button success" href="{{ route('documentation.documents.create') }}">New document</a>
</div>
</div>
<div class="doc-card-body">
<form class="doc-filter" method="GET" action="{{ route('documentation.documents.index') }}">
@@ -88,8 +94,19 @@
</td>
<td>{{ $document->version }}</td>
<td>{{ $document->updated_at?->format('d M Y H:i') }}</td>
<td><a class="doc-link"
href="{{ route('documentation.documents.edit', $document) }}">Edit</a></td>
<td>
<div class="doc-actions" style="justify-content:flex-end;">
<a class="doc-button primary"
href="{{ route('documentation.documents.edit', $document) }}">Edit</a>
<form method="POST"
action="{{ route('documentation.documents.destroy', $document) }}"
onsubmit="return confirm('Archive this document? Its files will be retained and it can be restored later.')">
@csrf
@method('DELETE')
<button class="doc-button warning" type="submit">Archive</button>
</form>
</div>
</td>
</tr>
@empty
<tr>