From c55d9cbcb0f675b75c8d78e14f7c2881c2f36b75 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Michaela=20Br=C3=BCckner?= <brueckner@data-quest.de> Date: Mon, 8 Aug 2022 13:31:20 +0200 Subject: [PATCH] revised dialog, re #852 --- app/views/file/suggest_oer.php | 89 ++++++++++++++++++-- lib/filesystem/StandardFile.php | 6 +- resources/assets/stylesheets/less/files.less | 35 +++++++- 3 files changed, 115 insertions(+), 15 deletions(-) diff --git a/app/views/file/suggest_oer.php b/app/views/file/suggest_oer.php index 5fb3470dab3..85bbf11b804 100644 --- a/app/views/file/suggest_oer.php +++ b/app/views/file/suggest_oer.php @@ -2,21 +2,92 @@ <form action='<?= $controller->url_for('file/suggest_oer/' . $file_ref_id)?>' class='default' method='POST' data-dialog="reload-on-close"> <?= CSRFProtection::tokenTag() ?> - <p><?= sprintf(_('Das Material gefällt Ihnen? – Schlagen Sie es zur Veröffentlichung im OER-Campus vor. - Schreiben Sie dem/der Autor*in %s, warum er/sie das Material veröffentlichen sollte.'), $author_fullname)?></p> + <p class="suggestion_text"><?= _('Das Material gefällt Ihnen?') ?></p> + <p class="suggestion_text"><?= sprintf(_('Das Material gefällt Ihnen? Schlagen Sie es zum Teilen im %s vor.'), Config::get()->OER_TITLE) ?></p> + + <p><?= _('Schreiben Sie der Autorin/dem Autoren:') ?></p> + <label for="additional_text"> - <span class=""> - <?= _("Ihr Vorschlag wird anonym versendet.") ?> - </span> - <textarea name = "additional_text" + + <textarea class = "add_toolbar wysiwyg" + name = "additional_text" id = "additional_text" rows = "3" + placeholder = "<?= _("Warum gefällt Ihnen das Material?") ?>" ></textarea> </label> - + <span class=""> + <?= _("Eine Nachricht ist freiwillig. Ihr Vorschlag wird anonym versendet.") ?> + </span> <footer data-dialog-button> - <?= Studip\Button::create(_("Material vorschlagen"))?> + <?= Studip\Button::create(_("Teilen vorschlagen"))?> </footer> </form> </div> -<?= $this->render_partial('file/file_details.php') ?> + +<div id="oer_file_details"> + + <div id="preview_container" class="oercampus_editmaterial"> + <div class="hgroup"> + <label for="oer_logo_uploader"> + <article class="contentbox" title=""> + <header> + <h1> + <studip-icon shape="file" + role="clickable" + size="20" + class="text-bottom"> + + </studip-icon> + lorem ipsum + </h1> + </header> + <div class="image" + :style="'background-image: url(' + logo_url + ');' + (!customlogo ? ' background-size: 60% auto;': '')"></div> + </article> + </label> + + </div> + </div> + + <aside id="oer_aside"> + <table class="default nohover"> + <caption><?= htmlReady($file->getFilename()) ?></caption> + <tbody> + <tr> + <td><?= _('Größe') ?></td> + <? $size = $file->getSize() ?> + <td><?= $size !== null ? relSize($file->getSize(), false) : "-" ?></td> + </tr> + <tr> + <td><?= _('Downloads') ?></td> + <td><?= htmlReady($file->getDownloads()) ?></td> + </tr> + <tr> + <td><?= _('Erstellt') ?></td> + <td><?= date('d.m.Y H:i', $file->getMakeDate()) ?></td> + </tr> + <tr> + <td><?= _('Geändert') ?></td> + <td><?= date('d.m.Y H:i', $file->getLastChangeDate()) ?></td> + </tr> + <tr> + <td><?= _('Besitzer/-in') ?></td> + <td> + <? $user_id = $file->getUserId() ?> + <? if ($user_id) : ?> + <a href="<?= URLHelper::getLink('dispatch.php/profile', ['username' => get_username($user_id)]) ?>"> + <?= htmlReady($file->getUserName()) ?> + </a> + <? else : ?> + <?= htmlReady($file->getUserName()) ?> + <? endif ?> + </td> + </tr> + </tbody> + </table> + </aside> + +</div> + + diff --git a/lib/filesystem/StandardFile.php b/lib/filesystem/StandardFile.php index 19f80e462f3..af8d275d3a1 100644 --- a/lib/filesystem/StandardFile.php +++ b/lib/filesystem/StandardFile.php @@ -281,7 +281,7 @@ class StandardFile implements FileType, ArrayAccess, StandardFileInterface if ($this->isEditable($GLOBALS['user']->id) && Config::get()->OERCAMPUS_ENABLED) { $actionMenu->addLink( URLHelper::getURL('dispatch.php/file/share_oer/' . $this->fileref->id), - _('Im OER Campus veröffentlichen'), + sprintf(_('Im %s veröffentlichen'), Config::get()->OER_TITLE), Icon::create('oer-campus'), ['data-dialog' => '1'] ); @@ -293,9 +293,9 @@ class StandardFile implements FileType, ArrayAccess, StandardFileInterface ) { $actionMenu->addLink( URLHelper::getURL('dispatch.php/file/suggest_oer/' . $this->fileref->id), - _('Material für OER Campus vorschlagen'), + sprintf(_('Material für %s vorschlagen'), Config::get()->OER_TITLE), Icon::create('oer-campus'), - ['data-dialog' => 'reload-on-close;size=auto'] + ['data-dialog' => 'reload-on-close;size=850x850'] ); } diff --git a/resources/assets/stylesheets/less/files.less b/resources/assets/stylesheets/less/files.less index ffa72e4524d..83aca5c1426 100644 --- a/resources/assets/stylesheets/less/files.less +++ b/resources/assets/stylesheets/less/files.less @@ -229,7 +229,9 @@ 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; @@ -237,9 +239,15 @@ div.file_select_possibilities.content_terms_of_use_icons { } #file_suggest_oer { - display: flex; margin-bottom: 3%; margin-top: 2%; + +} + +.suggestion_text { + font-size: 2em; + font-weight: 700; + margin-bottom: 0px; } table.documents tfoot td.sticky { @@ -292,7 +300,9 @@ table.documents { max-width: 100%; } - #file_edit_window, #file_details_window { + #file_edit_window, + #file_details_window, + #oer_file_details { flex-direction: column; } @@ -340,6 +350,25 @@ table.documents { } } + #oer_aside { + width: calc(50% - 10px); + max-width: calc(50% - 10px); + /* overflow: hidden; */ + + div.file-icon, div.folder-icon { + img { + margin-left: 20%; + width: 60%; + max-height: 16em; + height: 100%; + } + } + + h3 { + font-size: 1.1em; + } + } + #file_management_forms, div#preview_container { width: calc(70% - 10px); max-width: calc(70% - 10px); -- GitLab