From 0f36d2c16bb13e5697052b0caa6b7fafd2244dce Mon Sep 17 00:00:00 2001 From: Dennis Eichhorn Date: Fri, 9 Jun 2023 17:39:31 +0000 Subject: [PATCH] continue implementation --- .../Backend/Components/Compound/BaseView.php | 82 +++++++++++++++++++ .../Components/Compound/compound.tpl.php | 50 +++++++++++ Theme/Backend/Lang/en.lang.php | 2 + Theme/Backend/editor-create.tpl.php | 20 +++-- Theme/Backend/editor-single.tpl.php | 47 ++++------- 5 files changed, 159 insertions(+), 42 deletions(-) create mode 100644 Theme/Backend/Components/Compound/BaseView.php create mode 100644 Theme/Backend/Components/Compound/compound.tpl.php diff --git a/Theme/Backend/Components/Compound/BaseView.php b/Theme/Backend/Components/Compound/BaseView.php new file mode 100644 index 0000000..ca01c93 --- /dev/null +++ b/Theme/Backend/Components/Compound/BaseView.php @@ -0,0 +1,82 @@ +setTemplate('/Modules/Editor/Theme/Backend/Components/Compound/compound'); + + $this->data['editor'] = new \Modules\Editor\Theme\Backend\Components\Editor\BaseView($l11n, $request, $response); + } + + /** + * {@inheritdoc} + */ + public function render(mixed ...$data) : string + { + /** @var array{0:string, 1?:string, 2?:string} $data */ + $this->form = $data[0]; + $this->virtualPath = $data[1] ?? $this->virtualPath; + $this->files = $data[2] ?? $this->files; + + return parent::render(); + } +} diff --git a/Theme/Backend/Components/Compound/compound.tpl.php b/Theme/Backend/Components/Compound/compound.tpl.php new file mode 100644 index 0000000..36db618 --- /dev/null +++ b/Theme/Backend/Components/Compound/compound.tpl.php @@ -0,0 +1,50 @@ +
+
+
+
getHtml('Editor', 'Editor', 'Backend'); ?>
+
+ +
+ data['editor']->render('note-editor'); ?> +
+ +
+ data['editor']->getData('text')->render('note-editor', 'plain', 'fNote'); ?> +
+
+
+ + + +
+
+
+ +
+
+
getHtml('Notes', 'Editor', 'Backend'); ?>
+
+ + + + + + files as $file) : ?> + + + + +
+ getHtml('ID', '0', '0'); ?> + getHtml('Title', 'Editor', 'Backend'); ?> +
+ printHtml($file->id); ?>printHtml($file->name); ?>
+
+ +
+
\ No newline at end of file diff --git a/Theme/Backend/Lang/en.lang.php b/Theme/Backend/Lang/en.lang.php index 7f9f3da..a3754b7 100755 --- a/Theme/Backend/Lang/en.lang.php +++ b/Theme/Backend/Lang/en.lang.php @@ -18,6 +18,8 @@ return ['Editor' => [ 'Creator' => 'Creator', 'Documents' => 'Documents', 'Editor' => 'Editor', + 'Note' => 'Note', + 'Notes' => 'Notes', 'GroupUser' => 'Group/User', 'Insert' => 'Insert', 'Layout' => 'Layout', diff --git a/Theme/Backend/editor-create.tpl.php b/Theme/Backend/editor-create.tpl.php index b96f7a9..8a7fbec 100755 --- a/Theme/Backend/editor-create.tpl.php +++ b/Theme/Backend/editor-create.tpl.php @@ -41,15 +41,17 @@ echo $this->data['nav']->render(); ?> -
- getData('editor')->getData('text')->render( - 'editor', - 'plain', - 'fEditor', - $doc->plain, - $doc->content - ); ?> -
+
+
+ getData('editor')->getData('text')->render( + 'editor', + 'plain', + 'fEditor', + $doc->plain, + $doc->content + ); ?> +
+
diff --git a/Theme/Backend/editor-single.tpl.php b/Theme/Backend/editor-single.tpl.php index be8a9f1..5a76413 100755 --- a/Theme/Backend/editor-single.tpl.php +++ b/Theme/Backend/editor-single.tpl.php @@ -31,43 +31,24 @@ echo $this->data['nav']->render(); ?>
printHtml($doc->title); ?>
-
-
- content; ?> -
- -
-
-
- - icon) ? '' : ''; ?>printHtml($tag->getL11n()); ?> +
+
content; ?>
+ + + icon) ? '' : ''; ?>printHtml($tag->getL11n()); ?> + + + +
+ + name; ?>
- - - -
+
- - +
-
    - extension === 'collection' - ? UriFactory::build('{/base}/media/list?path=' . \rtrim($file->getVirtualPath(), '/') . '/' . $file->name) - : UriFactory::build('{/base}/media/single?id=' . $file->id - . '&path={?path}' . ( - $file->id === 0 - ? '/' . $file->name - : '' - ) - ); - ?> -
  • printHtml($file->name); ?> - -
+ getHtml('Edit', '0', '0'); ?>