diff --git a/Theme/Backend/Components/InlinePreview/BaseView.php b/Theme/Backend/Components/InlinePreview/BaseView.php index 8a880fc..27751b0 100644 --- a/Theme/Backend/Components/InlinePreview/BaseView.php +++ b/Theme/Backend/Components/InlinePreview/BaseView.php @@ -36,7 +36,7 @@ class BaseView extends View * @var string * @since 1.0.0 */ - protected string $form = ''; + protected string $id = ''; /** * Virtual path of the media file @@ -54,6 +54,14 @@ class BaseView extends View */ protected string $name = ''; + /** + * Is required? + * + * @var bool + * @since 1.0.0 + */ + private bool $isRequired = false; + /** * {@inheritdoc} */ @@ -68,9 +76,46 @@ class BaseView extends View */ public function render(...$data) : string { - $this->form = $data[0]; + $this->id = $data[0]; $this->name = $data[1]; $this->virtualPath = $data[2] ?? '/'; + $this->isRequired = $data[3] ?? false; return parent::render(); } + + /** + * Get selector id + * + * @return string + * + * @since 1.0.0 + */ + public function getId() : string + { + return $this->id; + } + + /** + * Get name + * + * @return string + * + * @since 1.0.0 + */ + public function getName() : string + { + return $this->name; + } + + /** + * Is required? + * + * @return bool + * + * @since 1.0.0 + */ + public function isRequired() : bool + { + return $this->isRequired; + } } diff --git a/Theme/Backend/Components/InlinePreview/inline-preview.tpl.php b/Theme/Backend/Components/InlinePreview/inline-preview.tpl.php index 040c7f6..05f3efe 100644 --- a/Theme/Backend/Components/InlinePreview/inline-preview.tpl.php +++ b/Theme/Backend/Components/InlinePreview/inline-preview.tpl.php @@ -1,29 +1,55 @@
-
- - +
+
+ +
diff --git a/Theme/Backend/media-list.tpl.php b/Theme/Backend/media-list.tpl.php index d900297..e938325 100644 --- a/Theme/Backend/media-list.tpl.php +++ b/Theme/Backend/media-list.tpl.php @@ -88,7 +88,7 @@ $media = $this->getData('media'); $icon = $fileIconFunction(\phpOMS\System\File\FileUtils::getExtensionType($value->getExtension())); ?> - + printHtml( $value->getExtension() !== 'collection' ? $value->getName() . '.' . $value->getExtension() : $value->getName()); ?>