Bugzilla – Attachment 162981 Details for
Bug 15461
Add staff equivalent for OpacLocationOnDetail
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 15461: Implement StaffLocationOnDetail
Bug-15461-Implement-StaffLocationOnDetail.patch (text/plain), 8.81 KB, created by
Lucas Gass (lukeg)
on 2024-03-08 21:11:59 UTC
(
hide
)
Description:
Bug 15461: Implement StaffLocationOnDetail
Filename:
MIME Type:
Creator:
Lucas Gass (lukeg)
Created:
2024-03-08 21:11:59 UTC
Size:
8.81 KB
patch
obsolete
>From a96af3f0b9f1cfe2be49c42bf4734da4df644c3e Mon Sep 17 00:00:00 2001 >From: Lucas Gass <lucas@bywatersolutions.com> >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. >--- > 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. <br/> Note: If on a separate column is selected, you still need to enable holdings_shelvinglocation on the <a href="/cgi-bin/koha/admin/columns_settings.pl">Table settings</a> 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 863ae272f2..6fd3ac892b 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 %] >@@ -356,6 +372,9 @@ > [% IF ( item_level_itypes ) %]<th id="[% tab | html %]_itype" data-colname="[% tab | html %]_itype">Item type</th>[% END %] > <th id="[% tab | html %]_holdingbranch" data-colname="[% tab | html %]_holdingbranch">Current library</th> > <th id="[% tab | html %]_homebranch" data-colname="[% tab | html %]_homebranch">Home library</th> >+ [% IF Koha.Preference('StaffLocationOnDetail') == 'column' %] >+ <th id="[% tab | html %]_shelvingloction" data-colname="[% tab | html %]_shelvinglocation">Shelving location</th> >+ [% END %] > [% IF ( itemdata_ccode ) %]<th id="[% tab | html %]_ccode" data-colname="[% tab | html %]_ccode">Collection</th>[% END %] > [% IF Koha.Preference('EnableItemGroups') %] > <th id="[% tab | html %]_item_group" data-colname="[% tab | html %]_item_group">Item group</th> >@@ -420,25 +439,29 @@ > <span class="itypedesc itypetext">[% itemtype.translated_description | html %]</span> > </td> > [% END %] >- <td class="location">[% UNLESS ( singlebranchmode ) %][% Branches.GetName( item.holdingbranch ) | html %] [% END %]</td> >+ <td class="location"> >+ [% UNLESS ( singlebranchmode ) %] >+ [% Branches.GetName( item.holdingbranch ) | html %] >+ [% IF ( Koha.Preference('StaffLocationOnDetail') == 'holding' || Koha.Preference('StaffLocationOnDetail') == 'both' ) %] >+ <span class="shelvingloc"> >+ [% PROCESS shelvinglocation %] >+ </span> >+ [% END %] >+ [% END %] >+ </td> > <td class="homebranch"> > <span class="homebranchdesc">[% Branches.GetName(item.homebranch) | html %]</span> >- <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. %] >- [% 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 %] >- </span> >+ [% IF ( Koha.Preference('StaffLocationOnDetail') == 'home' || Koha.Preference('StaffLocationOnDetail') == 'both' ) %] >+ <span class="shelvingloc"> >+ [% PROCESS shelvinglocation %] >+ </span> >+ [% END %] > </td> >+ [% IF Koha.Preference('StaffLocationOnDetail') == 'column' %] >+ <td class="shelvinglocation"> >+ [% PROCESS shelvinglocation %] >+ </td> >+ [% END %] > [% IF ( itemdata_ccode ) %]<td>[% AuthorisedValues.GetDescriptionByKohaField( kohafield => 'items.ccode', authorised_value => item.ccode ) | html %]</td>[% END %] > [% IF Koha.Preference('EnableItemGroups') %]<td class="item_group">[% item.object.item_group.description | html %]</td>[% END %] > <td class="itemcallnumber">[% IF ( item.itemcallnumber ) %] [% item.itemcallnumber | html %][% END %]</td> >-- >2.30.2
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Diff
|
Splinter Review
Attachments on
bug 15461
:
162980
|
162981
|
162982
|
162987
|
162990
|
162991
|
162992
|
162993
|
165804
|
165805
|
165806
|
170238
|
170268
|
170269
|
170270
|
174011
|
174012
|
174013