diff --git a/Theme/Backend/media-create.tpl.php b/Theme/Backend/media-create.tpl.php index 8dd0cee..1608b77 100644 --- a/Theme/Backend/media-create.tpl.php +++ b/Theme/Backend/media-create.tpl.php @@ -21,7 +21,7 @@ echo $this->getData('nav')->render(); ?>

l11n->lang['Media']['Upload']; ?>

-
+
diff --git a/Theme/Backend/media-list.tpl.php b/Theme/Backend/media-list.tpl.php index c0f3430..14e6c93 100644 --- a/Theme/Backend/media-list.tpl.php +++ b/Theme/Backend/media-list.tpl.php @@ -17,9 +17,7 @@ * @var \phpOMS\Views\View $this */ -$mediaMapper = new \Modules\Media\Models\MediaMapper($this->app->dbPool->get()); -$media = $mediaMapper->getNewest(25); - +$media = \Modules\Media\Models\MediaMapper::getNewest(25); $footerView = new \Web\Views\Lists\PaginationView($this->app, $this->request, $this->response); $footerView->setTemplate('/Web/Templates/Lists/Footer/PaginationBig'); $footerView->setPages(count($media) / 25); diff --git a/Theme/Backend/media-single.tpl.php b/Theme/Backend/media-single.tpl.php index 81c7275..f03ce73 100644 --- a/Theme/Backend/media-single.tpl.php +++ b/Theme/Backend/media-single.tpl.php @@ -16,6 +16,9 @@ /** * @var \phpOMS\Views\View $this */ +/** + * @var $media \Modules\Media\Models\Media + */ $media = $this->getData('media'); echo $this->getData('nav')->render(); ?> @@ -23,10 +26,24 @@ echo $this->getData('nav')->render();

getName() ?>

+ + +
SizegetSize(); ?> +
Created atgetCreatedAt()->format('Y-m-d'); ?> +
Created bygetCreatedBy(); ?> +
DescriptiongetDescription(); ?> +
Content +
getExtension(), ['gif', 'bmp', 'jpg', 'jpeg', 'png'])) : ?> - + -
getPath())); ?>
+
+            getPath()));
+            $output = str_replace(["\r\n", "\r"], "\n", $output);
+            $output = explode("\n", $output);
+            foreach($output as $line) : ?>
+