Bugzilla – Attachment 95880 Details for
Bug 18355
Add 'permanent location' alongside 'shelving location' when located on cart
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 18355: (QA follow-up) Rearrange comments, improve code
Bug-18355-QA-follow-up-Rearrange-comments-improve-.patch (text/plain), 3.47 KB, created by
Marcel de Rooy
on 2019-11-29 11:18:26 UTC
(
hide
)
Description:
Bug 18355: (QA follow-up) Rearrange comments, improve code
Filename:
MIME Type:
Creator:
Marcel de Rooy
Created:
2019-11-29 11:18:26 UTC
Size:
3.47 KB
patch
obsolete
>From c88b344cac9f8adfaadba56a3f78b43e3feb5b7b Mon Sep 17 00:00:00 2001 >From: Marcel de Rooy <m.de.rooy@rijksmuseum.nl> >Date: Fri, 29 Nov 2019 10:57:18 +0000 >Subject: [PATCH] Bug 18355: (QA follow-up) Rearrange comments, improve code >Content-Type: text/plain; charset=utf-8 > >Comments were hard to read (for me) but tastes differ.. > >Code should reflect that permanent_location is a code and that location >may be already an authval. See detail.pl: >$item->{'location'} = $shelflocations->{$shelfcode} if ( defined( $shelfcode ) && defined($shelflocations) && exists( $shelflocations->{$shelfcode} ) ); > >Obviously, this kind of logic divided over two places should be reduced. > >Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl> >--- > .../prog/en/modules/catalogue/detail.tt | 21 ++++++++++----------- > 1 file changed, 10 insertions(+), 11 deletions(-) > >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 c221982dd9..9a0495b12d 100644 >--- a/koha-tmpl/intranet-tmpl/prog/en/modules/catalogue/detail.tt >+++ b/koha-tmpl/intranet-tmpl/prog/en/modules/catalogue/detail.tt >@@ -267,19 +267,18 @@ > <td class="homebranch"> > [% Branches.GetName(item.homebranch) | html %] > <span class="shelvingloc"> >- [%# 1 - If permanent location is defined %] >- [%# a - display the description if available, display the code if not %] >- [%# b - display the current location in parens %] >- [%# 2 - If permanent location is not defined, but location is defined %] >- [%# a - display the current location description if available, display the code if not %] >- [%# 3 - If neither are defined, show nothing %] >+<!-- >+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 %] >- [% AuthorisedValues.GetDescriptionByKohaField( kohafield => 'items.location', authorised_value => item.permanent_location ) | html %] >- [% IF item.location AND item.location != item.permanent_location %] >- ([% AuthorisedValues.GetDescriptionByKohaField( kohafield => 'items.location', authorised_value => item.location ) | html %]) >+ [% 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 %] >- [% ELSIF item.location %] >- [% AuthorisedValues.GetDescriptionByKohaField( kohafield => 'items.location', authorised_value => item.permanent_location ) | html %] >+ [% ELSE %] >+ [% item.location | html %] > [% END %] > </span> > </td> >-- >2.11.0
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 18355
:
61978
|
61981
|
61984
|
62999
|
66432
|
66514
|
78584
|
78908
|
78913
|
79684
|
79717
|
79786
|
80153
|
83665
|
95775
|
95879
| 95880