From 93da552b4682bb0ab77d0867b21dd0bdf742f963 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Michaela=20Br=C3=BCckner?= Date: Thu, 24 Nov 2022 09:43:38 +0000 Subject: closes #1674 Closes #1674 Merge request studip/studip!1166 --- app/controllers/file.php | 1 + app/views/file/suggest_oer.php | 108 ++++++++++++++++++++++----- lib/filesystem/StandardFile.php | 2 +- resources/assets/stylesheets/less/files.less | 55 +++++++++++++- 4 files changed, 143 insertions(+), 23 deletions(-) diff --git a/app/controllers/file.php b/app/controllers/file.php index e4c09d3..f418109 100644 --- a/app/controllers/file.php +++ b/app/controllers/file.php @@ -493,6 +493,7 @@ class FileController extends AuthenticatedController $file_ref = FileRef::find($file_ref_id); $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'); diff --git a/app/views/file/suggest_oer.php b/app/views/file/suggest_oer.php index 058c967..84e3cb2 100644 --- a/app/views/file/suggest_oer.php +++ b/app/views/file/suggest_oer.php @@ -1,21 +1,91 @@ -
' - class='default' method='POST' data-dialog="reload-on-close"> - +
+ + +

+

-

-

getFilename())?>

- +

-
- -
- + +

+ +

+ +
+ +
+
+ + +
+
+ + + +
+ + +
diff --git a/lib/filesystem/StandardFile.php b/lib/filesystem/StandardFile.php index 412600f..5a4271a 100644 --- a/lib/filesystem/StandardFile.php +++ b/lib/filesystem/StandardFile.php @@ -296,7 +296,7 @@ class StandardFile implements FileType, ArrayAccess, StandardFileInterface URLHelper::getURL('dispatch.php/file/suggest_oer/' . $this->fileref->id), _('Material für OER Campus vorschlagen'), Icon::create('oer-campus'), - ['data-dialog' => 'reload-on-close;size=auto'] + ['data-dialog' => 'reload-on-close;size=750x750'] ); } diff --git a/resources/assets/stylesheets/less/files.less b/resources/assets/stylesheets/less/files.less index 48161df..9f9ae16 100644 --- a/resources/assets/stylesheets/less/files.less +++ b/resources/assets/stylesheets/less/files.less @@ -229,13 +229,61 @@ div.file_select_possibilities.content_terms_of_use_icons { } -#file_edit_window, #file_details_window { +#file_edit_window, +#file_details_window, +#oer_file_details { display: flex; justify-content: space-between; align-items: flex-start; align-content: flex-start; } +#oer_file_details { + max-width: 555px; + flex-wrap: wrap; +} + +#preview_container, +#oer_aside { + width: 270px; +} + +#oer_title { + max-height: 34px; + max-width: 225px; + overflow: hidden; + text-overflow: ellipsis; + hyphens: auto; + word-break: break-all; + text-indent: initial; +} + +#oer_preview_image { + width: 100%; + display: flex; + height: 170px; + align-items: center; + + img { + width: 100%; + } +} + +#file_suggest_oer { + margin-top: 2%; + + .suggestion_text { + font-size: 2em; + font-weight: 700; + margin-bottom: 0px; + } + + #note { + margin: 0 0 30px; + } +} + + table.documents tfoot td.sticky { position: sticky; @@ -319,7 +367,7 @@ table.documents { #file_aside, #folder_aside { width: calc(30% - 10px); max-width: calc(30% - 10px); -/* overflow: hidden; */ + /* overflow: hidden; */ div.file-icon, div.folder-icon { img { @@ -335,7 +383,8 @@ table.documents { } } - #file_management_forms, div#preview_container { + + #file_management_forms, div#preview_container:not(.oercampus_editmaterial) { width: calc(70% - 10px); max-width: calc(70% - 10px); -- cgit v1.0