diff --git a/app/views/oer/market/_material_short.php b/app/views/oer/market/_material_short.php index 83d1d13d142cbc2bbf6dbdbe57a345c1a6b8fae2..e8a9f119243cfc4fd56fad825a2314add1342fe5 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 da8b2712a85b1b027fe97575f52fbec5519c3872..e9944f093e7a3e400243b355b5981bcf39b989d9 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 2b16762a03707b1929054346168d4a5c637b92ca..f91ed7d70fcb9f1c93085791074baebb901cb52c 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; } }