From c7f864df9915c57d3efad67524cddf8ac10c3ae6 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Michaela=20Br=C3=BCckner?= <brueckner@data-quest.de> Date: Fri, 12 Aug 2022 14:42:22 +0200 Subject: [PATCH] fix for #1385 --- app/views/oer/market/_material_short.php | 8 +++++++- app/views/oer/mymaterial/edit.php | 2 +- resources/assets/stylesheets/scss/oer.scss | 4 ++++ 3 files changed, 12 insertions(+), 2 deletions(-) diff --git a/app/views/oer/market/_material_short.php b/app/views/oer/market/_material_short.php index 83d1d13d142..e8a9f119243 100644 --- a/app/views/oer/market/_material_short.php +++ b/app/views/oer/market/_material_short.php @@ -23,7 +23,13 @@ } ?> <?= Icon::create($icon, Icon::ROLE_CLICKABLE)->asImg(20, ['class' => "text-bottom"]) ?> - <div class="title"><?= htmlReady($material['name']) ?></div> + <div class="title"> + <? if (strlen($material['name']) > 50) : ?> + <?= htmlReady(substr($material['name'], 0, 50)) . ' ...' ?> + <? else : ?> + <?= htmlReady($material['name']) ?> + <? endif ?> + </div> </h1> </header> <div class="image" style="background-image: url(<?= $material->getLogoURL() ?>);<?= (!$material['front_image_content_type']) ? " background-size: 60% auto;" : "" ?>"></div> diff --git a/app/views/oer/mymaterial/edit.php b/app/views/oer/mymaterial/edit.php index da8b2712a85..e9944f093e7 100644 --- a/app/views/oer/mymaterial/edit.php +++ b/app/views/oer/mymaterial/edit.php @@ -34,7 +34,7 @@ role="clickable" size="20" class="text-bottom"></studip-icon> - {{ name }} + <div class="title">{{ name }}</div> </h1> </header> <div class="image" diff --git a/resources/assets/stylesheets/scss/oer.scss b/resources/assets/stylesheets/scss/oer.scss index 2b16762a037..f91ed7d70fc 100644 --- a/resources/assets/stylesheets/scss/oer.scss +++ b/resources/assets/stylesheets/scss/oer.scss @@ -219,6 +219,10 @@ ul.reviews, ol.reviews { } .title { max-height: 34px; + max-width: 85%; + overflow: hidden; + text-overflow: ellipsis; + hyphens: auto; } } -- GitLab