diff options
author | Bharat Mediratta <bharat@menalto.com> | 2009-11-21 10:58:26 -0800 |
---|---|---|
committer | Bharat Mediratta <bharat@menalto.com> | 2009-11-21 10:58:26 -0800 |
commit | 17d89a9df15720ad235835dd04f26cca4bcbfce8 (patch) | |
tree | e56c9a3ea113158b242b916706c8ec4a4ee38e94 /modules | |
parent | 4c5e2000f606d696a056fcfed231df5be8a42ada (diff) |
Truncate the text of the title/description for results on the search page. Partial fix for ticket #580.
Diffstat (limited to 'modules')
-rw-r--r-- | modules/search/views/search.html.php | 15 |
1 files changed, 6 insertions, 9 deletions
diff --git a/modules/search/views/search.html.php b/modules/search/views/search.html.php index fdf22a9e..2e139ecf 100644 --- a/modules/search/views/search.html.php +++ b/modules/search/views/search.html.php @@ -23,18 +23,15 @@ <? if (count($items)): ?> <ul id="g-album-grid" class="ui-helper-clearfix"> <? foreach ($items as $item): ?> - <? $item_class = "g-photo"; ?> - <? if ($item->is_album()): ?> - <? $item_class = "g-album"; ?> - <? endif ?> - <li class="g-item <?= $item_class ?>"> + <? $item_class = $item->is_album() ? "g-album" : "g-photo" ?> + <li class="g-item <?= $item_class ?>"> <a href="<?= $item->url() ?>"> <?= $item->thumb_img() ?> <p> - <?= html::purify($item->title) ?> - </p> - <div> - <?= nl2br(html::purify($item->description)) ?> + <?= html::purify(text::limit_chars($item->title, 32, "…")) ?> + </p> + <div> + <?= nl2br(html::purify(text::limit_chars($item->description, 64, "…"))) ?> </div> </a> </li> |