Added Documentation

This commit is contained in:
Mark Gregory
2026-06-15 07:54:26 +01:00
parent 91b600a4fe
commit 04f8124e65
34 changed files with 2045 additions and 0 deletions
@@ -0,0 +1,18 @@
@extends('documentation::layouts.master')
@section('title', 'Create Category')
@section('content')
@include('documentation::partials.hero', [
'title' => 'Create category',
'subtitle' => 'Add a professional grouping for documents and operational knowledge.',
])
<section class="doc-card">
<div class="doc-card-header"><strong>Category details</strong></div>
<div class="doc-card-body">
<form method="POST" action="{{ route('documentation.categories.store') }}">
@include('documentation::partials.category-form')
</form>
</div>
</section>
@endsection
@@ -0,0 +1,18 @@
@extends('documentation::layouts.master')
@section('title', 'Edit Category')
@section('content')
@include('documentation::partials.hero', [
'title' => 'Edit category',
'subtitle' => 'Update category naming, ordering, visibility, and presentation metadata.',
])
<section class="doc-card">
<div class="doc-card-header"><strong>{{ $category->name }}</strong></div>
<div class="doc-card-body">
<form method="POST" action="{{ route('documentation.categories.update', $category) }}">
@include('documentation::partials.category-form')
</form>
</div>
</section>
@endsection
@@ -0,0 +1,57 @@
@extends('documentation::layouts.master')
@section('title', 'Document Categories')
@section('content')
@include('documentation::partials.hero', [
'title' => 'Document categories',
'subtitle' => 'Organise documents by policy, process, onboarding, operational support, or technical area.',
])
@if(session('status'))
<div class="doc-alert">{{ session('status') }}</div>
@endif
<section class="doc-card">
<div class="doc-card-header">
<strong>Categories</strong>
<a class="doc-button dark" href="{{ route('documentation.categories.create') }}">New category</a>
</div>
<div class="doc-card-body">
<table class="doc-table">
<thead>
<tr>
<th>Name</th>
<th>Description</th>
<th>Documents</th>
<th>Order</th>
<th>Status</th>
<th></th>
</tr>
</thead>
<tbody>
@forelse($categories as $category)
<tr>
<td><strong>{{ $category->name }}</strong><div class="doc-muted">{{ $category->slug }}</div></td>
<td>{{ $category->description ?: 'No description' }}</td>
<td>{{ $category->documents_count }}</td>
<td>{{ $category->sort_order }}</td>
<td><span class="doc-badge {{ $category->is_active ? '' : 'archived' }}">{{ $category->is_active ? 'Active' : 'Inactive' }}</span></td>
<td>
<a class="doc-link" href="{{ route('documentation.categories.edit', $category) }}">Edit</a>
<form method="POST" action="{{ route('documentation.categories.destroy', $category) }}" style="display:inline;" onsubmit="return confirm('Delete this category? Documents will become uncategorised.')">
@csrf
@method('DELETE')
<button type="submit" class="doc-link" style="border:0;background:none;cursor:pointer;padding:0;margin-left:10px;">Delete</button>
</form>
</td>
</tr>
@empty
<tr><td colspan="6" class="doc-muted">No categories found.</td></tr>
@endforelse
</tbody>
</table>
<div style="margin-top:18px;">{{ $categories->links() }}</div>
</div>
</section>
@endsection