Koha/koha-tmpl/intranet-tmpl/prog/en/modules/cataloguing
Jonathan Druart 30c7dd1866 Bug 29962: (bug 27526 follow-up): Fix columns button on item list
The "Columns" button on the item list view has been broken (hidden) by
bug 27526.
"column_name" was removed from the item_header_loop:
-    if ( $kohafield && $kohafield =~ /items.(.+)/ ) {
-        $header_value{column_name} = $1;
-    }

We can still access the attribute name using 'attribute' however.
The difference is that non-mapped subfield will have an "attribute", but
there is a net to prevent a crash in columns_settings.inc:
 12         var named_id = $( 'thead th[data-colname="' + this.columnname + '"]', selector ).index( selector + ' th' );
 13         var used_id = dt_parameters.bKohaColumnsUseNames ? named_id : counter;
 14         if ( used_id == -1 ) return;

We should simply pass attribute.

Test plan:
Create a non-mapped subfield (952$k)
Edit an item, add a value for k
On the item table at the top of the edit form notice that the "Columns"
button is back and that it's working correctly.
Note that 'k' cannot be hidden (may be considered as a bug, but it's not
a regression).

Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>

Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
2022-02-21 15:15:47 -10:00
..
value_builder Bug 26102: Prevent XSS when To.json is used: unimarc_field_4XX.tt 2022-02-02 21:05:29 -10:00
addbiblio.tt Bug 29585: Fix unstranslatable strings in addbiblio.tt 2022-01-17 14:55:55 -10:00
addbooks.tt
additem.tt Bug 29962: (bug 27526 follow-up): Fix columns button on item list 2022-02-21 15:15:47 -10:00
editor.tt
linkitem.tt
merge.tt
moveitem.tt
z3950_auth_search.tt
z3950_search.tt Bug 19865: Add back horizontal scroll bar 2022-01-31 21:55:40 -10:00