| 
									
										
										
										
											2023-10-14 23:33:48 +08:00
										 |  |  | <div component="page-editor" class="page-editor page-editor-{{ $editor }} flex-fill flex" | 
					
						
							| 
									
										
										
										
											2020-07-06 04:18:17 +08:00
										 |  |  |      option:page-editor:drafts-enabled="{{ $draftsEnabled ? 'true' : 'false' }}" | 
					
						
							| 
									
										
										
										
											2020-04-06 00:27:16 +08:00
										 |  |  |      @if(config('services.drawio')) | 
					
						
							| 
									
										
										
										
											2022-04-21 06:32:02 +08: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-06 00:27:16 +08:00
										 |  |  |      @endif | 
					
						
							| 
									
										
										
										
											2020-07-06 04:18:17 +08:00
										 |  |  |      @if($model->name === trans('entities.pages_initial_name')) | 
					
						
							|  |  |  |         option:page-editor:has-default-title="true" | 
					
						
							|  |  |  |      @endif | 
					
						
							| 
									
										
										
										
											2022-04-19 00:39:28 +08:00
										 |  |  |      option:page-editor:editor-type="{{ $editor }}" | 
					
						
							| 
									
										
										
										
											2020-07-06 04:18:17 +08:00
										 |  |  |      option:page-editor:page-id="{{ $model->id ?? '0' }}" | 
					
						
							| 
									
										
										
										
											2022-04-18 06:01:14 +08: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-06 04:18:17 +08: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') }}" | 
					
						
							| 
									
										
										
										
											2023-06-13 22:13:07 +08:00
										 |  |  |      option:page-editor:draft-delete-text="{{ trans('entities.pages_draft_deleted') }}" | 
					
						
							|  |  |  |      option:page-editor:draft-delete-fail-text="{{ trans('errors.page_draft_delete_fail') }}" | 
					
						
							| 
									
										
										
										
											2020-07-06 04:18:17 +08:00
										 |  |  |      option:page-editor:set-changelog-text="{{ trans('entities.pages_edit_set_changelog') }}"> | 
					
						
							| 
									
										
										
										
											2016-09-29 22:56:57 +08:00
										 |  |  | 
 | 
					
						
							| 
									
										
										
										
											2022-04-20 21:03:47 +08:00
										 |  |  |     {{--Header Toolbar--}} | 
					
						
							|  |  |  |     @include('pages.parts.editor-toolbar', ['model' => $model, 'editor' => $editor, 'isDraft' => $isDraft, 'draftsEnabled' => $draftsEnabled]) | 
					
						
							| 
									
										
										
										
											2015-08-31 18:43:28 +08:00
										 |  |  | 
 | 
					
						
							| 
									
										
										
										
											2023-10-15 00:10:07 +08:00
										 |  |  |     <div class="flex flex-fill mx-s mb-s justify-center page-editor-page-area-wrap"> | 
					
						
							| 
									
										
										
										
											2023-10-14 00:33:11 +08:00
										 |  |  |         <div class="page-editor-page-area flex-container-column flex flex-fill"> | 
					
						
							|  |  |  |             {{--Title input--}} | 
					
						
							|  |  |  |             <div class="title-input page-title clearfix"> | 
					
						
							|  |  |  |                 <div refs="page-editor@titleContainer" class="input"> | 
					
						
							|  |  |  |                     @include('form.text', ['name' => 'name', 'model' => $model, 'placeholder' => trans('entities.pages_title')]) | 
					
						
							|  |  |  |                 </div> | 
					
						
							|  |  |  |             </div> | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  |             <div class="flex-fill flex"> | 
					
						
							|  |  |  |                 {{--Editors--}} | 
					
						
							|  |  |  |                 <div class="edit-area flex-fill flex"> | 
					
						
							| 
									
										
										
										
											2016-05-13 06:12:05 +08:00
										 |  |  | 
 | 
					
						
							| 
									
										
										
										
											2023-10-14 00:33:11 +08:00
										 |  |  |                     {{--WYSIWYG Editor--}} | 
					
						
							|  |  |  |                     @if($editor === 'wysiwyg') | 
					
						
							|  |  |  |                         @include('pages.parts.wysiwyg-editor', ['model' => $model]) | 
					
						
							|  |  |  |                     @endif | 
					
						
							| 
									
										
										
										
											2016-09-29 22:56:57 +08:00
										 |  |  | 
 | 
					
						
							| 
									
										
										
										
											2023-10-14 00:33:11 +08:00
										 |  |  |                     {{--Markdown Editor--}} | 
					
						
							|  |  |  |                     @if($editor === 'markdown') | 
					
						
							|  |  |  |                         @include('pages.parts.markdown-editor', ['model' => $model]) | 
					
						
							|  |  |  |                     @endif | 
					
						
							| 
									
										
										
										
											2016-03-25 22:41:15 +08:00
										 |  |  | 
 | 
					
						
							| 
									
										
										
										
											2023-10-14 00:33:11 +08:00
										 |  |  |                 </div> | 
					
						
							| 
									
										
										
										
											2016-09-29 22:56:57 +08:00
										 |  |  | 
 | 
					
						
							| 
									
										
										
										
											2023-10-14 00:33:11 +08:00
										 |  |  |             </div> | 
					
						
							| 
									
										
										
										
											2023-10-08 22:04:07 +08:00
										 |  |  |         </div> | 
					
						
							|  |  |  | 
 | 
					
						
							| 
									
										
										
										
											2023-10-14 23:33:48 +08:00
										 |  |  |         <div class="relative flex-fill"> | 
					
						
							|  |  |  |             @include('pages.parts.editor-toolbox') | 
					
						
							|  |  |  |         </div> | 
					
						
							| 
									
										
										
										
											2015-07-13 04:31:15 +08:00
										 |  |  |     </div> | 
					
						
							| 
									
										
										
										
											2019-05-19 22:30:58 +08:00
										 |  |  | 
 | 
					
						
							| 
									
										
										
										
											2022-04-21 01:21:21 +08:00
										 |  |  |     {{--Mobile Save Button--}} | 
					
						
							| 
									
										
										
										
											2020-07-06 04:18:17 +08:00
										 |  |  |     <button type="submit" | 
					
						
							|  |  |  |             id="save-button-mobile" | 
					
						
							|  |  |  |             title="{{ trans('entities.pages_save') }}" | 
					
						
							| 
									
										
										
										
											2023-01-29 00:06:11 +08:00
										 |  |  |             class="text-link text-button hide-over-m page-save-mobile-button">@icon('save')</button> | 
					
						
							| 
									
										
										
										
											2022-04-21 01:21:21 +08:00
										 |  |  | 
 | 
					
						
							|  |  |  |     {{--Editor Change Dialog--}} | 
					
						
							| 
									
										
										
										
											2023-06-13 22:13:07 +08:00
										 |  |  |     @component('common.confirm-dialog', ['title' => trans('entities.pages_editor_switch_title'), 'ref' => 'page-editor@switch-dialog']) | 
					
						
							| 
									
										
										
										
											2022-04-21 01:21:21 +08:00
										 |  |  |         <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 | 
					
						
							| 
									
										
										
										
											2023-06-13 22:13:07 +08:00
										 |  |  | 
 | 
					
						
							|  |  |  |     {{--Delete Draft Dialog--}} | 
					
						
							|  |  |  |     @component('common.confirm-dialog', ['title' => trans('entities.pages_edit_delete_draft'), 'ref' => 'page-editor@delete-draft-dialog']) | 
					
						
							|  |  |  |         <p> | 
					
						
							|  |  |  |             {{ trans('entities.pages_edit_delete_draft_confirm') }} | 
					
						
							|  |  |  |         </p> | 
					
						
							|  |  |  |     @endcomponent | 
					
						
							| 
									
										
										
										
											2023-08-23 21:16:20 +08:00
										 |  |  | 
 | 
					
						
							|  |  |  |     {{--Saved Drawing--}} | 
					
						
							|  |  |  |     @component('common.confirm-dialog', ['title' => trans('entities.pages_drawing_unsaved'), 'id' => 'unsaved-drawing-dialog']) | 
					
						
							|  |  |  |         <p> | 
					
						
							|  |  |  |             {{ trans('entities.pages_drawing_unsaved_confirm') }} | 
					
						
							|  |  |  |         </p> | 
					
						
							|  |  |  |     @endcomponent | 
					
						
							| 
									
										
										
										
											2015-10-23 02:06:50 +08:00
										 |  |  | </div> |