diff options
| author | Michaela Brückner <brueckner@data-quest.de> | 2022-08-08 15:50:49 +0200 |
|---|---|---|
| committer | Michaela Brückner <brueckner@data-quest.de> | 2022-08-08 15:50:49 +0200 |
| commit | a57b472ff9ad74e5af84280904d1f9059db21e3c (patch) | |
| tree | 345ddec0114065775df7d247844b3d43ef739fb0 /app | |
| parent | 8b4f10fc084dc784716ecf5355e4895d00e4290f (diff) | |
file preview, re #852tic-852
Diffstat (limited to 'app')
| -rw-r--r-- | app/controllers/file.php | 2 | ||||
| -rw-r--r-- | app/views/file/suggest_oer.php | 135 |
2 files changed, 69 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"> <?= CSRFProtection::tokenTag() ?> <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 class="suggestion_text"><?= sprintf(_('Schlagen Sie es zum Teilen im %s vor.'), Config::get()->OER_TITLE) ?></p> <p><?= _('Schreiben Sie der Autorin/dem Autoren:') ?></p> @@ -16,78 +16,77 @@ placeholder = "<?= _("Warum gefällt Ihnen das Material?") ?>" ></textarea> </label> - <span class=""> + <p class=""> <?= _("Eine Nachricht ist freiwillig. Ihr Vorschlag wird anonym versendet.") ?> - </span> - <footer data-dialog-button> - <?= Studip\Button::create(_("Teilen vorschlagen"))?> - </footer> - </form> -</div> + </p> -<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"> + <div id="oer_file_details"> - </studip-icon> - lorem ipsum - </h1> - </header> - <div class="image" - :style="'background-image: url(' + logo_url + ');' + (!customlogo ? ' background-size: 60% auto;': '')"></div> - </article> - </label> + <div id="preview_container" class="oercampus_editmaterial"> + <div class="hgroup"> + <label for="oer_logo_uploader"> + <article class="contentbox" title=""> + <header> + <h1> + <studip-icon shape="<?= $icon_shape ?>" + role="clickable" + size="20" + class="text-bottom"> + </studip-icon> + <?= htmlReady($file->getFilename()) ?> + </h1> + </header> + <div id="oer_preview_image"> + <?= Icon::create($icon_shape, Icon::ROLE_CLICKABLE, ['size' => 160]) ?> + </div> + </article> + </label> - </div> - </div> + </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> + <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> + <footer data-dialog-button> + <?= Studip\Button::create(_("Teilen vorschlagen"))?> + </footer> + </form> </div> - - |
