Bugzilla – Attachment 80153 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: Update opac-detail.pl/tt to show both
Bug-18355-Update-opac-detailpltt-to-show-both.patch (text/plain), 4.41 KB, created by
Christopher Brannon
on 2018-10-05 23:12:53 UTC
(
hide
)
Description:
Bug 18355: Update opac-detail.pl/tt to show both
Filename:
MIME Type:
Creator:
Christopher Brannon
Created:
2018-10-05 23:12:53 UTC
Size:
4.41 KB
patch
obsolete
>From 3d85461127f8176ea816355b55a8c2bf6210f01d Mon Sep 17 00:00:00 2001 >From: Christopher Brannon <cbrannon@cdalibrary.org> >Date: Fri, 5 Oct 2018 22:45:45 +0000 >Subject: [PATCH] Bug 18355: Update opac-detail.pl/tt to show both > >Adding dependancy of bug 21503 for templates to fully fail correctly. > >To Test this patch: > >1) Apply patch / restart_all >2) Check out an item. >3) Check item in with ReturnToShelvingCart set to Move. >4) View the item in opac-detail.pl and see the permanent location, and >the cart location in parentesis. >5) Try removing opac description from the cart and item sleving >location. Refresh opac-detail.pl. Should default to regular >description. (If not, may need patch 21503 to test.) >6) To test for code replacement if regular and opac description are >missing, you WILL need patch 21503. >--- > koha-tmpl/opac-tmpl/bootstrap/en/modules/opac-detail.tt | 14 ++++++++++++-- > opac/opac-detail.pl | 3 --- > 2 files changed, 12 insertions(+), 5 deletions(-) > >diff --git a/koha-tmpl/opac-tmpl/bootstrap/en/modules/opac-detail.tt b/koha-tmpl/opac-tmpl/bootstrap/en/modules/opac-detail.tt >index c451d8d..a0a8731 100644 >--- a/koha-tmpl/opac-tmpl/bootstrap/en/modules/opac-detail.tt >+++ b/koha-tmpl/opac-tmpl/bootstrap/en/modules/opac-detail.tt >@@ -1240,7 +1240,12 @@ > <div class="branch-info-tooltip">[% ITEM_RESULT.holding_branch_opac_info | $raw %]</div> > > [% IF ( Koha.Preference('OpacLocationOnDetail') == 'holding' || Koha.Preference('OpacLocationOnDetail') == 'both' ) %] >- <span class="shelvingloc">[% ITEM_RESULT.location_description | html %]</span> >+ <span class="shelvingloc"> >+ [% AuthorisedValues.GetDescriptionByKohaField( kohafield => 'items.location', authorised_value => ITEM_RESULT.permanent_location, opac => '1' ) | html %] >+ [% IF ITEM_RESULT.location AND ITEM_RESULT.location != ITEM_RESULT.permanent_location %] >+ ([% AuthorisedValues.GetDescriptionByKohaField( kohafield => 'items.location', authorised_value => ITEM_RESULT.location, opac => '1' ) | html %]) >+ [% END %] >+ </span> > [% END %] > > </td> >@@ -1265,7 +1270,12 @@ > <div class="branch-info-tooltip">[% ITEM_RESULT.home_branch_opac_info | $raw %]</div> > > [% IF ( Koha.Preference('OpacLocationOnDetail') == 'home' || Koha.Preference('OpacLocationOnDetail') == 'both' ) %] >- <span class="shelvingloc">[% ITEM_RESULT.location_description | html %]</span> >+ <span class="shelvingloc"> >+ [% AuthorisedValues.GetDescriptionByKohaField( kohafield => 'items.location', authorised_value => ITEM_RESULT.permanent_location, opac => '1' ) | html %] >+ [% IF ITEM_RESULT.location AND ITEM_RESULT.location != ITEM_RESULT.permanent_location %] >+ ([% AuthorisedValues.GetDescriptionByKohaField( kohafield => 'items.location', authorised_value => ITEM_RESULT.location, opac => '1' ) | html %]) >+ [% END %] >+ </span> > [% END %] > > </td> >diff --git a/opac/opac-detail.pl b/opac/opac-detail.pl >index 6f10c6b..8afce61 100755 >--- a/opac/opac-detail.pl >+++ b/opac/opac-detail.pl >@@ -682,9 +682,6 @@ if ( not $viewallitems and @items > $max_items_to_display ) { > $itm->{'ccode'} = $collections->{$ccode} if defined($ccode) && $collections && exists( $collections->{$ccode} ); > my $copynumber = $itm->{'copynumber'}; > $itm->{'copynumber'} = $copynumbers->{$copynumber} if ( defined($copynumbers) && defined($copynumber) && exists( $copynumbers->{$copynumber} ) ); >- if ( defined $itm->{'location'} ) { >- $itm->{'location_description'} = $shelflocations->{ $itm->{'location'} }; >- } > if (exists $itm->{itype} && defined($itm->{itype}) && exists $itemtypes->{ $itm->{itype} }) { > $itm->{'imageurl'} = getitemtypeimagelocation( 'opac', $itemtypes->{ $itm->{itype} }->{'imageurl'} ); > $itm->{'description'} = $itemtypes->{ $itm->{itype} }->{translated_description}; >-- >2.1.4
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