extraded template form to own file and changed translations

This commit is contained in:
Sascha 2024-01-29 19:55:39 +01:00 committed by GitHub
parent 2a849894be
commit 64c783c6f8
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
4 changed files with 21 additions and 38 deletions

View File

@ -39,6 +39,9 @@ return [
'export_pdf' => 'PDF File',
'export_text' => 'Plain Text File',
'export_md' => 'Markdown File',
'default_template' => 'Default Page Template',
'default_template_explain' => 'Assign a page template that will be used as the default content for all new pages in this book/chapter. Keep in mind this will only be used if the page creator has view access to those chosen template page.',
'default_template_select' => 'Select a template page',
// Permissions and restrictions
'permissions' => 'Permissions',
@ -132,9 +135,6 @@ return [
'books_edit_named' => 'Edit Book :bookName',
'books_form_book_name' => 'Book Name',
'books_save' => 'Save Book',
'books_default_template' => 'Default Page Template',
'books_default_template_explain' => 'Assign a page template that will be used as the default content for all new pages in this book. Keep in mind this will only be used if the page creator has view access to those chosen template page.',
'books_default_template_select' => 'Select a template page',
'books_permissions' => 'Book Permissions',
'books_permissions_updated' => 'Book Permissions Updated',
'books_empty_contents' => 'No pages or chapters have been created for this book.',
@ -192,9 +192,6 @@ return [
'chapters_permissions_success' => 'Chapter Permissions Updated',
'chapters_search_this' => 'Search this chapter',
'chapter_sort_book' => 'Sort Book',
'chapter_default_template' => 'Default Page Template',
'chapter_default_template_explain' => 'Assign a page template that will be used as the default content for all new pages in this chapter. Keep in mind this will only be used if the page creator has view access to those chosen template page.',
'chapter_default_template_select' => 'Select a template page',
// Pages
'page' => 'Page',

View File

@ -40,24 +40,10 @@
<div class="form-group collapsible" component="collapsible" id="template-control">
<button refs="collapsible@trigger" type="button" class="collapse-title text-link" aria-expanded="false">
<label for="template-manager">{{ trans('entities.books_default_template') }}</label>
<label for="template-manager">{{ trans('entities.default_template') }}</label>
</button>
<div refs="collapsible@content" class="collapse-content">
<div class="flex-container-row gap-l justify-space-between pb-xs wrap">
<p class="text-muted small my-none min-width-xs flex">
{{ trans('entities.books_default_template_explain') }}
</p>
<div class="min-width-m">
@include('form.page-picker', [
'name' => 'default_template_id',
'placeholder' => trans('entities.books_default_template_select'),
'value' => $book->default_template_id ?? null,
'selectorEndpoint' => '/search/entity-selector-templates',
])
</div>
</div>
@include('entities.template-selector', ['entity' => $book ?? null])
</div>
</div>

View File

@ -24,24 +24,10 @@
<div class="form-group collapsible" component="collapsible" id="template-control">
<button refs="collapsible@trigger" type="button" class="collapse-title text-link" aria-expanded="false">
<label for="template-manager">{{ trans('entities.chapter_default_template') }}</label>
<label for="template-manager">{{ trans('entities.default_template') }}</label>
</button>
<div refs="collapsible@content" class="collapse-content">
<div class="flex-container-row gap-l justify-space-between pb-xs wrap">
<p class="text-muted small my-none min-width-xs flex">
{{ trans('entities.chapter_default_template_explain') }}
</p>
<div class="min-width-m">
@include('form.page-picker', [
'name' => 'default_template_id',
'placeholder' => trans('entities.chapter_default_template_select'),
'value' => $chapter->default_template_id ?? null,
'selectorEndpoint' => '/search/entity-selector-templates',
])
</div>
</div>
@include('entities.template-selector', ['entity' => $chapter ?? null])
</div>
</div>

View File

@ -0,0 +1,14 @@
<div class="flex-container-row gap-l justify-space-between pb-xs wrap">
<p class="text-muted small my-none min-width-xs flex">
{{ trans('entities.default_template_explain') }}
</p>
<div class="min-width-m">
@include('form.page-picker', [
'name' => 'default_template_id',
'placeholder' => trans('entities.default_template_select'),
'value' => $entity->default_template_id ?? null,
'selectorEndpoint' => '/search/entity-selector-templates',
])
</div>
</div>