From 9a3cf445313b7f574aad53ab1de0aa87e835e96b Mon Sep 17 00:00:00 2001 From: Lucas Gass Date: Tue, 22 Mar 2022 20:28:20 +0000 Subject: [PATCH] Bug 30031: (follow-up) account for item-level_itypes MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit To test: To test: 1. Apply patch and restart_all 2. Create a list 3. GO to Administration > Table settings 4. In Table settings look under Catalog for lists. 5. The search results table should be listed, with the ability to hide the author, date_added, or call_number 6. Go to the view of your list ( /cgi-bin/koha/virtualshelves/shelves.pl?op=view&shelfnumber=1 ) 7. Make sure you can hide the columns properly. ( The checkbox and Title columns should not be hidable ) 8. Turn on the item-level_itypes system preferecne which will add the item type column, make sure you can hide it and all other columns correctlly now. Signed-off-by: Séverine Queune --- admin/columns_settings.yml | 2 ++ .../prog/en/modules/virtualshelves/shelves.tt | 35 ++++++++++--------- 2 files changed, 20 insertions(+), 17 deletions(-) diff --git a/admin/columns_settings.yml b/admin/columns_settings.yml index 014d599e97..e7d3f7b1e8 100644 --- a/admin/columns_settings.yml +++ b/admin/columns_settings.yml @@ -306,6 +306,8 @@ modules: columnname: checkbox cannot_be_toggled: 1 cannot_be_modified: 1 + - + columnname: item_type - columnname: title cannot_be_toggled: 1 diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/virtualshelves/shelves.tt b/koha-tmpl/intranet-tmpl/prog/en/modules/virtualshelves/shelves.tt index 6abb67bff9..eec6b063de 100644 --- a/koha-tmpl/intranet-tmpl/prog/en/modules/virtualshelves/shelves.tt +++ b/koha-tmpl/intranet-tmpl/prog/en/modules/virtualshelves/shelves.tt @@ -219,34 +219,34 @@ - [% IF ( itemsloop ) %][% END %] + [% IF ( itemsloop ) %][% END %] - [% UNLESS ( item_level_itypes ) %][% END %] + [% UNLESS ( item_level_itypes ) %][% END %] [% IF sortfield == 'title' %] - [% IF sortfield == 'author' %] - [% IF sortfield == 'dateadded' %] - [% IF sortfield == 'itemcallnumber' %] - @@ -255,14 +255,14 @@ [% FOREACH itemsloo IN itemsloop %] [% IF itemsloop %] - [% END %] - [% UNLESS ( item_level_itypes ) %][% END %] - - - - + +
  Item typeItem type + [% ELSE %] - + [% END %] Title + [% ELSE %] - + [% END %] Author + [% ELSE %] - + [% END %] Date added + [% ELSE %] - + [% END %] Call number
+ + [% UNLESS ( item_level_itypes ) %] [% UNLESS ( noItemTypeImages || !itemsloo.imageurl ) %][% itemsloo.description | html %][% END %][% itemsloo.description | html %] + [% IF ( itemsloo.XSLTBloc ) %] [% itemsloo.XSLTBloc | $raw %] [% ELSE %] @@ -288,9 +288,9 @@ [% END %]

[% itemsloo.author | html %][% itemsloo.dateadded | $KohaDates%] + [% itemsloo.author | html %][% itemsloo.dateadded | $KohaDates%]
    [% FOREACH result IN itemsloo.ITEM_RESULTS %]
  • @@ -613,7 +613,8 @@ "dom": 't', "autoWidth": false, "ordering": false, - "paging": false + "paging": false, + "bKohaColumnsUseNames": true, }, column_settings ); Sticky = $("#searchheader"); -- 2.30.2