Bugzilla – Attachment 169381 Details for
Bug 26866
Items table on additem should sort by cn_sort
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 26866: Sort items table on additem by cn_cort
Bug-26866-Sort-items-table-on-additem-by-cncort.patch (text/plain), 2.71 KB, created by
Roman Dolny
on 2024-07-22 20:09:50 UTC
(
hide
)
Description:
Bug 26866: Sort items table on additem by cn_cort
Filename:
MIME Type:
Creator:
Roman Dolny
Created:
2024-07-22 20:09:50 UTC
Size:
2.71 KB
patch
obsolete
>From ada39bc27c5ac813aeadc1c2a056fbec85b22789 Mon Sep 17 00:00:00 2001 >From: Brendan Lawlor <blawlor@clamsnet.org> >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 <roman.dolny@jezuici.pl> >--- > .../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' %] > <td class="[% can_mod | html %]" data-order="[% item.$attribute | html %]">[% item.$attribute | $KohaDates with_hours => 1 %]</td> > [% ELSE %] > <td class="[% can_mod | html %]" data-order="[% item.$attribute | html %]">[% item.$attribute | $KohaDates %]</td> > [% END %] > [% ELSIF ( item.$attribute && ( attribute == 'price' || attribute == 'replacementprice' ) ) %] > <td class="[% can_mod | html %]" data-order="[% item.$attribute | html %]">[% item.$attribute | $Price %]</td> >+ [% ELSIF item.$attribute && attribute == 'itemcallnumber' %] >+ <td class="[% can_mod | html %]" data-order="[% item.cn_sort | html %]">[% item.$attribute | html %]</td> > [% ELSE %] > <td class="[% can_mod | html %]">[% item.$attribute | html %]</td> > [% END %] >-- >2.39.2
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Diff
|
Splinter Review
Attachments on
bug 26866
:
169336
|
169381
|
169419