41 lines
1.7 KiB
PHP
Executable File
41 lines
1.7 KiB
PHP
Executable File
@extends('documentation::layouts.master')
|
|
|
|
@section('title', 'Edit Document')
|
|
|
|
@section('content')
|
|
<div class="doc-page">
|
|
@include('documentation::partials.hero', [
|
|
'title' => 'Edit document',
|
|
'subtitle' => 'Maintain document metadata, workflow status, version and attachment details.',
|
|
])
|
|
<section class="doc-card">
|
|
<div class="doc-card-header"><strong>{{ $document->title }}</strong></div>
|
|
<div class="doc-card-body">
|
|
<form method="POST" action="{{ route('documentation.documents.update', $document) }}"
|
|
enctype="multipart/form-data">
|
|
@include('documentation::partials.document-form')
|
|
</form>
|
|
</div>
|
|
</section>
|
|
|
|
<div class="doc-actions" style="margin-top:18px;justify-content:flex-end;">
|
|
<form method="POST"
|
|
action="{{ route('documentation.documents.destroy', $document) }}"
|
|
onsubmit="return confirm('Archive this document? Its files and attachments will be retained.')">
|
|
@csrf
|
|
@method('DELETE')
|
|
<button class="doc-button warning" type="submit">Archive document</button>
|
|
</form>
|
|
</div>
|
|
|
|
@foreach ($document->attachments as $attachment)
|
|
<form id="delete-attachment-{{ $attachment->id }}" method="POST"
|
|
action="{{ route('documentation.documents.attachments.destroy', [$document, $attachment]) }}"
|
|
onsubmit="return confirm('Remove this attachment?')">
|
|
@csrf
|
|
@method('DELETE')
|
|
</form>
|
|
@endforeach
|
|
</div>
|
|
@endsection
|