From 3c6c63a5cbd95c93ebb4e27c8e855d8c0e753230 Mon Sep 17 00:00:00 2001 From: Martin Renvoize Date: Thu, 28 Dec 2023 12:47:40 +0000 Subject: [PATCH] Bug 34324: Add preview to catalog concerns summary table This patch adds the first 80 characters of the body of the message as a preview in the details field of the summary page of catalog concerns. This is to bring us more in line with what OPAC Problem reports currently displays in it's table. --- .../prog/en/modules/cataloguing/concerns.tt | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-) diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/cataloguing/concerns.tt b/koha-tmpl/intranet-tmpl/prog/en/modules/cataloguing/concerns.tt index ab01dab6e5e..e1db6d574fb 100644 --- a/koha-tmpl/intranet-tmpl/prog/en/modules/cataloguing/concerns.tt +++ b/koha-tmpl/intranet-tmpl/prog/en/modules/cataloguing/concerns.tt @@ -152,10 +152,17 @@ result += ' ' + row.updates_count + ''; } - // Hidden detail content result += ''; + + // Short summary + let summary = row.body; + if ( summary.length > 80 ) { + summary = summary.substring(0, 80) + "..."; + } + result += '
' + summary + '
'; + + // Hidden detail content result += ''; - return result; }, "searchable": true, -- 2.47.0