2020-07-05 22:18:17 +02:00
|
|
|
<div component="page-editor" class="page-editor flex-fill flex"
|
|
|
|
option:page-editor:drafts-enabled="{{ $draftsEnabled ? 'true' : 'false' }}"
|
2020-04-05 18:27:16 +02:00
|
|
|
@if(config('services.drawio'))
|
2022-04-21 00:32:02 +02:00
|
|
|
drawio-url="{{ is_string(config('services.drawio')) ? config('services.drawio') : 'https://embed.diagrams.net/?embed=1&proto=json&spin=1&configure=1' }}"
|
2020-04-05 18:27:16 +02:00
|
|
|
@endif
|
2020-07-05 22:18:17 +02:00
|
|
|
@if($model->name === trans('entities.pages_initial_name'))
|
|
|
|
option:page-editor:has-default-title="true"
|
|
|
|
@endif
|
2022-04-18 18:39:28 +02:00
|
|
|
option:page-editor:editor-type="{{ $editor }}"
|
2020-07-05 22:18:17 +02:00
|
|
|
option:page-editor:page-id="{{ $model->id ?? '0' }}"
|
2022-04-18 00:01:14 +02:00
|
|
|
option:page-editor:page-new-draft="{{ $isDraft ? 'true' : 'false' }}"
|
|
|
|
option:page-editor:draft-text="{{ ($isDraft || $isDraftRevision) ? trans('entities.pages_editing_draft') : trans('entities.pages_editing_page') }}"
|
2020-07-05 22:18:17 +02:00
|
|
|
option:page-editor:autosave-fail-text="{{ trans('errors.page_draft_autosave_fail') }}"
|
|
|
|
option:page-editor:editing-page-text="{{ trans('entities.pages_editing_page') }}"
|
|
|
|
option:page-editor:draft-discarded-text="{{ trans('entities.pages_draft_discarded') }}"
|
|
|
|
option:page-editor:set-changelog-text="{{ trans('entities.pages_edit_set_changelog') }}">
|
2016-09-29 16:56:57 +02:00
|
|
|
|
2022-04-20 15:03:47 +02:00
|
|
|
{{--Header Toolbar--}}
|
|
|
|
@include('pages.parts.editor-toolbar', ['model' => $model, 'editor' => $editor, 'isDraft' => $isDraft, 'draftsEnabled' => $draftsEnabled])
|
2015-08-31 12:43:28 +02:00
|
|
|
|
2016-09-29 16:56:57 +02:00
|
|
|
{{--Title input--}}
|
2020-07-05 22:18:17 +02:00
|
|
|
<div class="title-input page-title clearfix">
|
|
|
|
<div refs="page-editor@titleContainer" class="input">
|
2020-04-27 16:54:39 +02:00
|
|
|
@include('form.text', ['name' => 'name', 'model' => $model, 'placeholder' => trans('entities.pages_title')])
|
2015-07-21 23:11:30 +02:00
|
|
|
</div>
|
2015-07-12 22:31:15 +02:00
|
|
|
</div>
|
2016-05-13 00:12:05 +02:00
|
|
|
|
2016-09-29 16:56:57 +02:00
|
|
|
{{--Editors--}}
|
2015-08-31 12:43:28 +02:00
|
|
|
<div class="edit-area flex-fill flex">
|
2016-09-29 16:56:57 +02:00
|
|
|
|
|
|
|
{{--WYSIWYG Editor--}}
|
2022-04-17 16:01:29 +02:00
|
|
|
@if($editor === 'wysiwyg')
|
2021-08-22 14:15:58 +02:00
|
|
|
@include('pages.parts.wysiwyg-editor', ['model' => $model])
|
2016-03-25 15:41:15 +01:00
|
|
|
@endif
|
|
|
|
|
2016-09-29 16:56:57 +02:00
|
|
|
{{--Markdown Editor--}}
|
2022-04-17 16:01:29 +02:00
|
|
|
@if($editor === 'markdown')
|
2021-08-22 14:15:58 +02:00
|
|
|
@include('pages.parts.markdown-editor', ['model' => $model])
|
2015-08-22 16:06:03 +02:00
|
|
|
@endif
|
2016-09-29 16:56:57 +02:00
|
|
|
|
2015-07-12 22:31:15 +02:00
|
|
|
</div>
|
2019-05-19 16:30:58 +02:00
|
|
|
|
2022-04-20 19:21:21 +02:00
|
|
|
{{--Mobile Save Button--}}
|
2020-07-05 22:18:17 +02:00
|
|
|
<button type="submit"
|
|
|
|
id="save-button-mobile"
|
|
|
|
title="{{ trans('entities.pages_save') }}"
|
|
|
|
class="text-primary text-button hide-over-m page-save-mobile-button">@icon('save')</button>
|
2022-04-20 19:21:21 +02:00
|
|
|
|
|
|
|
{{--Editor Change Dialog--}}
|
|
|
|
@component('common.confirm-dialog', ['title' => trans('entities.pages_editor_switch_title'), 'ref' => 'page-editor@switchDialog'])
|
|
|
|
<p>
|
|
|
|
{{ trans('entities.pages_editor_switch_are_you_sure') }}
|
|
|
|
<br>
|
|
|
|
{{ trans('entities.pages_editor_switch_consider_following') }}
|
|
|
|
</p>
|
|
|
|
|
|
|
|
<ul>
|
|
|
|
<li>{{ trans('entities.pages_editor_switch_consideration_a') }}</li>
|
|
|
|
<li>{{ trans('entities.pages_editor_switch_consideration_b') }}</li>
|
|
|
|
<li>{{ trans('entities.pages_editor_switch_consideration_c') }}</li>
|
|
|
|
</ul>
|
|
|
|
@endcomponent
|
2015-10-22 20:06:50 +02:00
|
|
|
</div>
|