diff --git a/Theme/Backend/Components/Upload/BaseView.php b/Theme/Backend/Components/Upload/BaseView.php index 82095f8..4f8fa07 100755 --- a/Theme/Backend/Components/Upload/BaseView.php +++ b/Theme/Backend/Components/Upload/BaseView.php @@ -36,7 +36,7 @@ class BaseView extends View * @var string * @since 1.0.0 */ - protected string $form = ''; + public string $form = ''; /** * Virtual path of the media file @@ -44,7 +44,7 @@ class BaseView extends View * @var string * @since 1.0.0 */ - protected string $virtualPath = ''; + public string $virtualPath = ''; /** * Name of the image preview @@ -52,7 +52,9 @@ class BaseView extends View * @var string * @since 1.0.0 */ - protected string $name = ''; + public string $name = ''; + + public array $files = []; /** * {@inheritdoc} @@ -60,7 +62,7 @@ class BaseView extends View public function __construct(L11nManager $l11n = null, RequestAbstract $request, ResponseAbstract $response) { parent::__construct($l11n, $request, $response); - $this->setTemplate('/Modules/Media/Theme/Backend/Components/Upload/upload'); + $this->setTemplate('/Modules/Media/Theme/Backend/Components/Upload/upload-list'); } /** @@ -71,7 +73,8 @@ class BaseView extends View /** @var array{0:string, 1?:string, 2?:string} $data */ $this->form = $data[0]; $this->name = $data[1] ?? 'UNDEFINED'; - $this->virtualPath = $data[2] ?? ''; + $this->virtualPath = $data[2] ?? $this->virtualPath; + $this->files = $data[3] ?? $this->files; return parent::render(); } } diff --git a/Theme/Backend/Components/Upload/upload-list.tpl.php b/Theme/Backend/Components/Upload/upload-list.tpl.php new file mode 100755 index 0000000..bb33e69 --- /dev/null +++ b/Theme/Backend/Components/Upload/upload-list.tpl.php @@ -0,0 +1,111 @@ + +
+
+
+
getHtml('Upload', 'Media', 'Backend'); ?>
+
+
+ + +
+
+
+
+
+ + +
+
+
+
+
+
+ + +
+
+
+
+ +
+
getHtml('Files', 'Media', 'Backend'); ?>
+
+ + + + + + files as $file) : ?> + + + + + files)) : ?> + +
+ getHtml('ID', '0', '0'); ?> + getHtml('Name', 'Media', 'Backend'); ?> +
+ printHtml((string) $file->id); ?>printHtml($file->name); ?>
getHtml('Empty', '0', '0'); ?> + +
+
+
+
+ +
+
+
+ files)) : ?> + + + + +
+
+
+
\ No newline at end of file diff --git a/Theme/Backend/Components/Upload/upload.tpl.php b/Theme/Backend/Components/Upload/upload.tpl.php deleted file mode 100755 index c2928bc..0000000 --- a/Theme/Backend/Components/Upload/upload.tpl.php +++ /dev/null @@ -1,63 +0,0 @@ -
-
getHtml('Media'); ?>
-
-
- - -
-
-
-
-
- - -
-
-
-
-
-
- - -
-
-
-
- -
- - - - - -
ID - Name - Extension -
-
\ No newline at end of file diff --git a/Theme/Backend/media-list.tpl.php b/Theme/Backend/media-list.tpl.php index 73656ec..156880e 100755 --- a/Theme/Backend/media-list.tpl.php +++ b/Theme/Backend/media-list.tpl.php @@ -89,7 +89,7 @@ $next = empty($media) ? '{/base}/media/list' : '{/base}/media/list?{?}&id='
- getHtml('Media'); ?> + getHtml('Media'); ?>
diff --git a/Theme/Backend/media-single.tpl.php b/Theme/Backend/media-single.tpl.php index 3a4e5cd..672aecf 100755 --- a/Theme/Backend/media-single.tpl.php +++ b/Theme/Backend/media-single.tpl.php @@ -40,9 +40,9 @@ echo $this->data['nav']->render();
request->getData('path') !== null) : ?> - getHtml('Back'); ?> + getHtml('Back'); ?> - getHtml('Back'); ?> + getHtml('Back'); ?>
@@ -52,8 +52,8 @@ echo $this->data['nav']->render();
    -
  • -
  • /
  • +
  • +
  • /
  • data['nav']->render(); $subPath .= '/' . $paths[$i]; - $url = UriFactory::build('{/base}/media/list?path=' . $subPath); + $url = UriFactory::build('{/app}/media/list?path=' . $subPath); ?>
  • >printHtml($paths[$i]); ?>
  • @@ -92,7 +92,7 @@ echo $this->data['nav']->render(); $size = FileSizeType::autoFormat($media->size); echo $this->printHtml(\number_format($size[0], 1, '.', ',') . $size[1]); ?>
getHtml('Created'); ?>printHtml($media->createdAt->format('Y-m-d')); ?> -
getHtml('Creator'); ?>printHtml( +
getHtml('Creator'); ?>printHtml( \ltrim($media->createdBy->name2 . ', ' . $media->createdBy->name1, ', ') ); ?>
getHtml('Tags'); ?>