2 <div class="page-editor flex-fill flex" id="page-editor"
3 drafts-enabled="{{ $draftsEnabled ? 'true' : 'false' }}"
4 drawio-enabled="{{ config('services.drawio') ? 'true' : 'false' }}"
5 editor-type="{{ setting('app-editor') }}"
6 page-id="{{ $model->id ?? 0 }}"
7 text-direction="{{ config('app.rtl') ? 'rtl' : 'ltr' }}"
8 page-new-draft="{{ $model->draft ?? 0 }}"
9 page-update-draft="{{ $model->isDraft ?? 0 }}">
14 <div class="primary-background-light toolbar page-edit-toolbar">
15 <div class="grid third v-center">
17 <div class="action-buttons text-left px-m py-xs">
18 <a href="{{ back()->getTargetUrl() }}" class="text-button text-primary">@icon('back')<span class="hide-under-l">{{ trans('common.back') }}</span></a>
19 <a onclick="$('body>header').slideToggle();" class="text-button text-primary">@icon('swap-vertical')<span class="hide-under-l">{{ trans('entities.pages_edit_toggle_header') }}</span></a>
22 <div class="text-center px-m py-xs">
23 <div v-show="draftsEnabled" dropdown class="dropdown-container draft-display text">
24 <a dropdown-toggle class="text-primary text-button"><span class="faded-text" v-text="draftText"></span> @icon('more')</a>
25 @icon('check-circle', ['class' => 'text-pos draft-notification svg-icon', ':class' => '{visible: draftUpdated}'])
28 <a @click="saveDraft()" class="text-pos">@icon('save'){{ trans('entities.pages_edit_save_draft') }}</a>
30 <li v-if="isNewDraft">
31 <a href="{{ $model->getUrl('/delete') }}" class="text-neg">@icon('delete'){{ trans('entities.pages_edit_delete_draft') }}</a>
33 <li v-if="isUpdateDraft">
34 <a type="button" @click="discardDraft" class="text-neg">@icon('cancel'){{ trans('entities.pages_edit_discard_draft') }}</a>
40 <div class="action-buttons px-m py-xs" v-cloak>
41 <div dropdown class="dropdown-container">
42 <a dropdown-toggle class="text-primary text-button">@icon('edit') <span v-text="changeSummaryShort"></span></a>
44 <li class="px-l py-m">
45 <p class="text-muted pb-s">{{ trans('entities.pages_edit_enter_changelog_desc') }}</p>
46 <input name="summary" id="summary-input" type="text" placeholder="{{ trans('entities.pages_edit_enter_changelog') }}" v-model="changeSummary" />
51 <button type="submit" id="save-button" class="float-left text-primary text-button text-pos-hover">@icon('save')<span>{{ trans('entities.pages_save') }}</span></button>
57 <div class="title-input page-title clearfix" v-pre>
59 @include('form.text', ['name' => 'name', 'placeholder' => trans('entities.pages_title')])
64 <div class="edit-area flex-fill flex">
66 {{--WYSIWYG Editor--}}
67 @if(setting('app-editor') === 'wysiwyg')
68 <div wysiwyg-editor class="flex-fill flex">
69 <textarea id="html-editor" name="html" rows="5" v-pre
70 @if($errors->has('html')) class="text-neg" @endif>@if(isset($model) || old('html')){{htmlspecialchars( old('html') ? old('html') : $model->html)}}@endif</textarea>
73 @if($errors->has('html'))
74 <div class="text-neg text-small">{{ $errors->first('html') }}</div>
78 {{--Markdown Editor--}}
79 @if(setting('app-editor') === 'markdown')
80 <div v-pre id="markdown-editor" markdown-editor class="flex-fill flex code-fill">
82 <div class="markdown-editor-wrap active">
83 <div class="editor-toolbar">
84 <span class="float left editor-toolbar-label">{{ trans('entities.pages_md_editor') }}</span>
85 <div class="float right buttons">
86 @if(config('services.drawio'))
87 <button class="text-button" type="button" data-action="insertDrawing">@icon('drawing'){{ trans('entities.pages_md_insert_drawing') }}</button>
90 <button class="text-button" type="button" data-action="insertImage">@icon('image'){{ trans('entities.pages_md_insert_image') }}</button>
92 <button class="text-button" type="button" data-action="insertLink">@icon('link'){{ trans('entities.pages_md_insert_link') }}</button>
96 <div markdown-input class="flex flex-fill">
97 <textarea id="markdown-editor-input" name="markdown" rows="5"
98 @if($errors->has('markdown')) class="text-neg" @endif>@if(isset($model) || old('markdown')){{htmlspecialchars( old('markdown') ? old('markdown') : ($model->markdown === '' ? $model->html : $model->markdown))}}@endif</textarea>
103 <div class="markdown-editor-wrap">
104 <div class="editor-toolbar">
105 <div class="editor-toolbar-label">{{ trans('entities.pages_md_preview') }}</div>
107 <div class="markdown-display page-content">
110 <input type="hidden" name="html"/>
116 @if($errors->has('markdown'))
117 <div class="text-neg text-small">{{ $errors->first('markdown') }}</div>