Bug 15461: Add stand alone shelving location column to holdings table

To test:
1. APPLY patch and restart_all
2. Go the detail page for some records and see the shelving location column.
3. Make sure the data looks correct
4. Try Table settings to make sure the column can be properly hidden

NOTE: You cannot currently search the holdings table for AV descriptions, only the code.
Signed-off-by: David Nind <david@davidnind.com>

Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
This commit is contained in:
Lucas Gass 2024-12-20 21:31:54 +00:00 committed by Katrin Fischer
parent 914022d30d
commit 8d6842930b
Signed by: kfischer
GPG key ID: 0EF6E2C03357A834
2 changed files with 15 additions and 3 deletions

View file

@ -436,6 +436,8 @@ modules:
columnname: holdingbranch
-
columnname: homebranch
-
columnname: location
-
columnname: ccode
-
@ -507,6 +509,8 @@ modules:
columnname: holdingbranch
-
columnname: homebranch
-
columnname: location
-
columnname: ccode
-
@ -2550,4 +2554,4 @@ modules:
-
columnname: actions
cannot_be_toggled: 1
cannot_be_modified: 1
cannot_be_modified: 1

View file

@ -17,6 +17,7 @@
[% IF ( item_level_itypes ) %]<th id="[% tab | html %]_itype" data-colname="itype">Item type</th>[% END %]
<th id="[% tab | html %]_holdingbranch" data-colname="holdingbranch">Current library</th>
<th id="[% tab | html %]_homebranch" data-colname="homebranch">Home library</th>
<th id="[% tab | html %]_loction" data-colname="location">Shelving location</th>
<th id="[% tab | html %]_ccode" data-colname="ccode">Collection</th>
[% IF Koha.Preference('EnableItemGroups') %]
<th id="[% tab | html %]_item_group" data-colname="item_group">Item group</th>
@ -401,8 +402,15 @@
searchable: true,
orderable: true,
render: function (data, type, row, meta) {
let nodes = '<span class="homebranchdesc">%s</span>'.format(escape_str(row._strings.home_library_id ? row._strings.home_library_id.str : row.home_library_id));
nodes += '<span class="shelvingloc">'
return escape_str(row._strings.home_library_id ? row._strings.home_library_id.str : row.home_library_id);
}
},
{
data: "me.location",
searchable: true,
orderable: true,
render: function (data, type, row, meta) {
let nodes = '<span class="shelvingloc">';
[%# If permanent location is defined, show description or code and %]
[%# display current location in parentheses. If not, display current location. %]
[%# Note that permanent location is a code, and location may be an authval. %]