From 3ae2a0003e337c0d8f45c50a237009af8577a68e Mon Sep 17 00:00:00 2001 From: Brendan Lawlor Date: Mon, 22 Jul 2024 18:11:11 +0000 Subject: [PATCH] Bug 26866: Sort items table on additem by cn_cort This patch changes the data-order attribute for the item callnumber column to use the item's cn_sort instead of the callnumber value. Test plan: 1. Create a bib 2. Add three items with source of classification LLC call numbers: JC43 .G6 1890 JC330 .F74 2000 JC480 .R63 2006 4. On additem.pl sor the items table by 'Full call number' 5. Confirm the items are now ordered correctly by cn_sort 6. Confirm the other columns still sort correctly Signed-off-by: Roman Dolny Signed-off-by: Julian Maurice --- .../intranet-tmpl/prog/en/modules/cataloguing/additem.tt | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/cataloguing/additem.tt b/koha-tmpl/intranet-tmpl/prog/en/modules/cataloguing/additem.tt index c9e5bf1da7..57e8b73173 100644 --- a/koha-tmpl/intranet-tmpl/prog/en/modules/cataloguing/additem.tt +++ b/koha-tmpl/intranet-tmpl/prog/en/modules/cataloguing/additem.tt @@ -161,14 +161,16 @@ [% FOREACH header IN item_header_loop %] [% SET attribute = header.attribute %] [% SET can_mod = item.nomod ? "nomod" : "canmod" %] - [% IF header.attribute AND date_fields.grep('^' _ attribute _ '$').size %] - [% IF header.attribute == 'datelastseen' %] + [% IF attribute AND date_fields.grep('^' _ attribute _ '$').size %] + [% IF attribute == 'datelastseen' %] [% item.$attribute | $KohaDates with_hours => 1 %] [% ELSE %] [% item.$attribute | $KohaDates %] [% END %] [% ELSIF ( item.$attribute && ( attribute == 'price' || attribute == 'replacementprice' ) ) %] [% item.$attribute | $Price %] + [% ELSIF item.$attribute && attribute == 'itemcallnumber' %] + [% item.$attribute | html %] [% ELSE %] [% item.$attribute | html %] [% END %] -- 2.39.2