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>
Signed-off-by: Julian Maurice <julian.maurice@biblibre.com>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
(cherry picked from commit 033e9abc30)
Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
This commit is contained in:
parent
e4f07f12ea
commit
413e0d5701
|
|
@ -158,14 +158,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 %]
|
||||
|
|
|
|||
Loading…
Reference in New Issue