From b87b44da138accfc209b2eb41de973cd8f064026 Mon Sep 17 00:00:00 2001 From: Martin Renvoize Date: Fri, 5 May 2023 13:44:31 +0100 Subject: [PATCH] Bug 33544: WIP Replace title details with one column Work in progress to combine the request title details fields into one column for display. table_settings needs to be changed to account for the new and missing fields. --- .../prog/en/includes/ill-list-table.inc | 12 +--- .../intranet-tmpl/prog/js/ill-list-table.js | 68 +++++++------------ 2 files changed, 27 insertions(+), 53 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 910f3a4f2a..49d41d0805 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 @@ -6,14 +6,8 @@ Request ID - Author - Title - Article title - Issue - Volume - Year - Pages - Request type + Request details + Request type Order ID Patron Bibliographic record ID @@ -35,4 +29,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 61ed8aaa45..ba0b383455 100644 --- a/koha-tmpl/intranet-tmpl/prog/js/ill-list-table.js +++ b/koha-tmpl/intranet-tmpl/prog/js/ill-list-table.js @@ -206,52 +206,32 @@ $(document).ready(function() { } }, { - "data": "", // author + "data": "", // Request details "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 - "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.41.0