From b41b859bb4f77291b960067803273f641fdd5d03 Mon Sep 17 00:00:00 2001 From: Lucas Gass Date: Fri, 8 Mar 2024 21:05:50 +0000 Subject: [PATCH] Bug 15461: Implement StaffLocationOnDetail To test; 1. APPLY patch, updatedatabase, restart services 2. Search for the new system preference 'StaffLocationOnDetail' 3. Read the description and make sure it makes sense. Check that the 'Table settings' link works. 4. By default it should be set to 'below the home library'. 5. Check to make sure that is where it displays. 6. Try 'below the holding library' and 'below both home and holding libraries', making sure each works properly. 7. Try 'on a sperate column', in which case you need to make sure that 'holdings_shelvinglocation' is properly checked under Administration > Table settings 8. Play with other Table settings to make sure they all work as they should. Signed-off-by: Andrew Fuerste-Henry --- admin/columns_settings.yml | 4 ++ .../admin/preferences/staff_interface.pref | 9 +++ .../prog/en/modules/catalogue/detail.tt | 55 +++++++++++++------ 3 files changed, 52 insertions(+), 16 deletions(-) diff --git a/admin/columns_settings.yml b/admin/columns_settings.yml index dd6396671f..352207dee1 100644 --- a/admin/columns_settings.yml +++ b/admin/columns_settings.yml @@ -382,6 +382,8 @@ modules: columnname: holdings_holdingbranch - columnname: holdings_homebranch + - + columnname: holdings_shelvinglocation - columnname: holdings_ccode - @@ -445,6 +447,8 @@ modules: columnname: otherholdings_holdingbranch - columnname: otherholdings_homebranch + - + columnname: otherholdings_shelvinglocation - columnname: otherholdings_ccode - diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/admin/preferences/staff_interface.pref b/koha-tmpl/intranet-tmpl/prog/en/modules/admin/preferences/staff_interface.pref index 62dca5a673..0e3b226cc0 100644 --- a/koha-tmpl/intranet-tmpl/prog/en/modules/admin/preferences/staff_interface.pref +++ b/koha-tmpl/intranet-tmpl/prog/en/modules/admin/preferences/staff_interface.pref @@ -119,6 +119,15 @@ Staff interface: type: textarea syntax: text/html class: code + - + - 'Display the shelving location ' + - pref: StaffLocationOnDetail + choices: + home: "below the home library" + holding: "below the holding library" + both: "below both home and holding libraries" + column: "on a separate column" + - 'for items on the staff interface record details page.
Note: If on a separate column is selected, you still need to enable holdings_shelvinglocation on the Table settings adminstration page.' - - "Show the following HTML on the staff interface login page" - pref: StaffLoginInstructions diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/catalogue/detail.tt b/koha-tmpl/intranet-tmpl/prog/en/modules/catalogue/detail.tt index 8f1f9c2d74..fc6f2134f0 100644 --- a/koha-tmpl/intranet-tmpl/prog/en/modules/catalogue/detail.tt +++ b/koha-tmpl/intranet-tmpl/prog/en/modules/catalogue/detail.tt @@ -31,6 +31,22 @@ [% END %] [% END %] +[% BLOCK shelvinglocation %] + [%# 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. %] + [% SET item_location = AuthorisedValues.GetDescriptionByKohaField( kohafield => 'items.location', authorised_value => item.location ) %] + [% IF item.permanent_location %] + [% SET permloc_authval = AuthorisedValues.GetDescriptionByKohaField( kohafield => 'items.location', authorised_value => item.permanent_location ) %] + [% permloc_authval | html %] + [% IF item_location AND item_location != permloc_authval AND item.location != item.permanent_location %] + ([% item_location | html %]) + [% END %] + [% ELSE %] + [% item_location | html %] + [% END %] +[% END %] + [% SET plugins_intranet_catalog_biblio_tabs = KohaPlugins.get_plugins_intranet_catalog_biblio_tab({ biblio => biblio, biblio_id => biblionumber }) %] [% SET footerjs = 1 %] @@ -355,6 +371,9 @@ [% IF ( item_level_itypes ) %]Item type[% END %] Current library Home library + [% IF Koha.Preference('StaffLocationOnDetail') == 'column' %] + Shelving location + [% END %] [% IF ( itemdata_ccode ) %]Collection[% END %] [% IF Koha.Preference('EnableItemGroups') %] Item group @@ -419,25 +438,29 @@ [% itemtype.translated_description | html %] [% END %] - [% UNLESS ( singlebranchmode ) %][% Branches.GetName( item.holdingbranch ) | html %] [% END %] + + [% UNLESS ( singlebranchmode ) %] + [% Branches.GetName( item.holdingbranch ) | html %] + [% IF ( Koha.Preference('StaffLocationOnDetail') == 'holding' || Koha.Preference('StaffLocationOnDetail') == 'both' ) %] + + [% PROCESS shelvinglocation %] + + [% END %] + [% END %] + [% Branches.GetName(item.homebranch) | html %] - - [%# 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. %] - [% SET item_location = AuthorisedValues.GetDescriptionByKohaField( kohafield => 'items.location', authorised_value => item.location ) %] - [% IF item.permanent_location %] - [% SET permloc_authval = AuthorisedValues.GetDescriptionByKohaField( kohafield => 'items.location', authorised_value => item.permanent_location ) %] - [% permloc_authval | html %] - [% IF item_location AND item_location != permloc_authval AND item.location != item.permanent_location %] - ([% item_location | html %]) - [% END %] - [% ELSE %] - [% item_location | html %] - [% END %] - + [% IF ( Koha.Preference('StaffLocationOnDetail') == 'home' || Koha.Preference('StaffLocationOnDetail') == 'both' ) %] + + [% PROCESS shelvinglocation %] + + [% END %] + [% IF Koha.Preference('StaffLocationOnDetail') == 'column' %] + + [% PROCESS shelvinglocation %] + + [% END %] [% IF ( itemdata_ccode ) %][% AuthorisedValues.GetDescriptionByKohaField( kohafield => 'items.ccode', authorised_value => item.ccode ) | html %][% END %] [% IF Koha.Preference('EnableItemGroups') %][% item.object.item_group.description | html %][% END %] [% IF ( item.itemcallnumber ) %] [% item.itemcallnumber | html %][% END %] -- 2.30.2