From a57b472ff9ad74e5af84280904d1f9059db21e3c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Michaela=20Br=C3=BCckner?= Date: Mon, 8 Aug 2022 15:50:49 +0200 Subject: file preview, re #852 --- app/controllers/file.php | 2 + app/views/file/suggest_oer.php | 135 +++++++++++++-------------- resources/assets/stylesheets/less/files.less | 6 ++ 3 files changed, 75 insertions(+), 68 deletions(-) diff --git a/app/controllers/file.php b/app/controllers/file.php index 26bf47a..1141f00 100644 --- a/app/controllers/file.php +++ b/app/controllers/file.php @@ -499,6 +499,8 @@ class FileController extends AuthenticatedController $filetype = $file_ref->getFileType(); $this->file = $filetype->convertToStandardFile(); + $this->icon_shape = $this->file->getIcon(Icon::ROLE_INFO)->getShape(); + $this->author = $file_ref->owner->username; $this->author_fullname = $file_ref->owner->getFullName('no_title'); $this->link_to_share = URLHelper::getURL("dispatch.php/file/share_oer/" . $file_ref_id); diff --git a/app/views/file/suggest_oer.php b/app/views/file/suggest_oer.php index 85bbf11..d5732a6 100644 --- a/app/views/file/suggest_oer.php +++ b/app/views/file/suggest_oer.php @@ -3,7 +3,7 @@ class='default' method='POST' data-dialog="reload-on-close">

-

OER_TITLE) ?>

+

OER_TITLE) ?>

@@ -16,78 +16,77 @@ placeholder = "" > - +

- -

- -
- - +

-
-
-
- +
+
+ -
-
+
+
- + +
+ + - - diff --git a/resources/assets/stylesheets/less/files.less b/resources/assets/stylesheets/less/files.less index 83aca5c..7e61e74 100644 --- a/resources/assets/stylesheets/less/files.less +++ b/resources/assets/stylesheets/less/files.less @@ -350,6 +350,12 @@ table.documents { } } + #oer_preview_image { + display: flex; + align-items: center; + justify-content: center; + } + #oer_aside { width: calc(50% - 10px); max-width: calc(50% - 10px); -- cgit v1.0