From a6b5d68329409597fb67bc6a7d4bce6c0d31be76 Mon Sep 17 00:00:00 2001 From: Martin Renvoize Date: Fri, 5 May 2023 13:44:31 +0100 Subject: [PATCH] Bug 33544: Replace title details with one column Combine the request title details fields into onea column for display. --- .../prog/en/includes/ill-list-table.inc | 12 +--- .../intranet-tmpl/prog/js/ill-list-table.js | 69 +++++++------------ 2 files changed, 27 insertions(+), 54 deletions(-) diff --git a/koha-tmpl/intranet-tmpl/prog/en/includes/ill-list-table.inc b/koha-tmpl/intranet-tmpl/prog/en/includes/ill-list-table.inc index 0ffe57d4dd6..1c5ec6e8b1d 100644 --- a/koha-tmpl/intranet-tmpl/prog/en/includes/ill-list-table.inc +++ b/koha-tmpl/intranet-tmpl/prog/en/includes/ill-list-table.inc @@ -9,14 +9,8 @@ Request ID Batch - Author - Title - Article title - Issue - Volume - Year - Pages - Request type + Request details + Request type Order ID Patron Bibliographic record ID @@ -38,4 +32,4 @@ - \ No newline at end of file + diff --git a/koha-tmpl/intranet-tmpl/prog/js/ill-list-table.js b/koha-tmpl/intranet-tmpl/prog/js/ill-list-table.js index 0a26a7209d6..89d5b9c72c3 100644 --- a/koha-tmpl/intranet-tmpl/prog/js/ill-list-table.js +++ b/koha-tmpl/intranet-tmpl/prog/js/ill-list-table.js @@ -228,53 +228,32 @@ $(document).ready(function() { : ""; } }, - { - "data": "", // author - "orderable": false, - "render": function(data, type, row, meta) { - return display_extended_attribute(row, 'author'); - } - }, - { - "data": "", // title - "orderable": false, - "render": function(data, type, row, meta) { - return display_extended_attribute(row, 'title'); - } - }, - { - "data": "", // article_title - "orderable": false, - "render": function(data, type, row, meta) { - return display_extended_attribute(row, 'article_title'); - } - }, - { - "data": "", // issue - "orderable": false, - "render": function(data, type, row, meta) { - return display_extended_attribute(row, 'issue'); - } - }, - { - "data": "", // volume - "orderable": false, - "render": function(data, type, row, meta) { - return display_extended_attribute(row, 'volume'); - } - }, - { - "data": "", // year + "data": "", // Request details "orderable": false, "render": function(data, type, row, meta) { - return display_extended_attribute(row, 'year'); - } - }, - { - "data": "", // pages - "orderable": false, - "render": function(data, type, row, meta) { - return display_extended_attribute(row, 'pages'); + let display = ''; + if ( display_extended_attribute(row, 'article_title') !== "" ) { + display += ' Article: ' + display_extended_attribute(row, 'article_title') + ''; + } + if ( display_extended_attribute(row, 'title') !== "" ) { + display += ' Title: ' + display_extended_attribute(row, 'title') + ''; + } + if ( display_extended_attribute(row, 'author') !== "" ) { + display += ' Author: ' + display_extended_attribute(row, 'author') + ''; + } + if ( display_extended_attribute(row, 'issue') !== "" ) { + display += ' Issue: ' + display_extended_attribute(row, 'issue') + ''; + } + if ( display_extended_attribute(row, 'volume') !== "" ) { + display += ' Volume: ' + display_extended_attribute(row, 'volume') + ''; + } + if ( display_extended_attribute(row, 'year') !== "" ) { + display += ' Year: ' + display_extended_attribute(row, 'year') + ''; + } + if ( display_extended_attribute(row, 'pages') !== "" ) { + display += ' Pages: ' + display_extended_attribute(row, 'pages') + ''; + } + return display; } }, { -- 2.44.0