Bug 34086: Show location on detail page when there is no permenant location

To test:
1. Have some items without a permanent location.
2. Go to the staff detail page.
3. In the 'Home library' column notice the span .shelvingloc is empty.
4. Add a permanent location, now the shelvingloc is populated
5. Apply patch
6. The location should now show even when there is no permenant location.

Signed-off-by: Sam Lau <samalau@gmail.com>
Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
This commit is contained in:
Lucas Gass 2023-06-21 19:21:05 +00:00 committed by Tomas Cohen Arazi
parent 927c5a8913
commit b5c6435fe8
No known key found for this signature in database
GPG Key ID: 0A272EA1B2F3C15F
1 changed files with 2 additions and 2 deletions

View File

@ -421,10 +421,10 @@
[%# 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. %]
[% IF item.permanent_location %]
[% 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 %]
[% SET item_location = AuthorisedValues.GetDescriptionByKohaField( kohafield => 'items.location', authorised_value => item.location ) %]
[% IF item_location AND item_location != permloc_authval AND item.location != item.permanent_location %]
([% item_location | html %])
[% END %]