Bugzilla – Attachment 20217 Details for
Bug 7720
Ambiguity in OPAC Details location.
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 7720 - Ambiguity in OPAC Details location - QA Followup
Bug-7720---Ambiguity-in-OPAC-Details-location---QA.patch (text/plain), 4.12 KB, created by
Kyle M Hall (khall)
on 2013-08-09 12:25:20 UTC
(
hide
)
Description:
Bug 7720 - Ambiguity in OPAC Details location - QA Followup
Filename:
MIME Type:
Creator:
Kyle M Hall (khall)
Created:
2013-08-09 12:25:20 UTC
Size:
4.12 KB
patch
obsolete
>From 5c12b57ca8d6a8d92fe6d6aa97f0d1cdd3f77bdf Mon Sep 17 00:00:00 2001 >From: Kyle M Hall <kyle@bywatersolutions.com> >Date: Fri, 9 Aug 2013 08:25:05 -0400 >Subject: [PATCH] Bug 7720 - Ambiguity in OPAC Details location - QA Followup > >--- > C4/Items.pm | 8 -------- > Koha/Template/Plugin/Branches.pm | 10 ++++++++++ > koha-tmpl/opac-tmpl/prog/en/modules/opac-detail.tt | 11 ++++++----- > 3 files changed, 16 insertions(+), 13 deletions(-) > >diff --git a/C4/Items.pm b/C4/Items.pm >index e6ce0eb..218205e 100644 >--- a/C4/Items.pm >+++ b/C4/Items.pm >@@ -1275,14 +1275,6 @@ sub GetItemsInfo { > if ( my $bdata = $bsth->fetchrow_hashref ) { > $data->{'branchname'} = $bdata->{'branchname'}; > } >- $bsth = $dbh->prepare( >- "SELECT * FROM branches WHERE branchcode = ? >- " >- ); >- $bsth->execute( $data->{'homebranch'} ); >- if ( my $bdata = $bsth->fetchrow_hashref ) { >- $data->{'homebranchname'} = $bdata->{'branchname'}; >- } > $data->{'datedue'} = $datedue; > > # get notforloan complete status if applicable >diff --git a/Koha/Template/Plugin/Branches.pm b/Koha/Template/Plugin/Branches.pm >index e9ff105..248ba95 100644 >--- a/Koha/Template/Plugin/Branches.pm >+++ b/Koha/Template/Plugin/Branches.pm >@@ -35,4 +35,14 @@ sub GetName { > return encode( 'UTF-8', $b->{'branchname'} ); > } > >+sub GetURL { >+ my ( $self, $branchcode ) = @_; >+ >+ my $query = "SELECT branchurl FROM branches WHERE branchcode = ?"; >+ my $sth = C4::Context->dbh->prepare($query); >+ $sth->execute($branchcode); >+ my $b = $sth->fetchrow_hashref(); >+ return encode( 'UTF-8', $b->{'branchurl'} ); >+} >+ > 1; >diff --git a/koha-tmpl/opac-tmpl/prog/en/modules/opac-detail.tt b/koha-tmpl/opac-tmpl/prog/en/modules/opac-detail.tt >index 9465fae..db882e0 100644 >--- a/koha-tmpl/opac-tmpl/prog/en/modules/opac-detail.tt >+++ b/koha-tmpl/opac-tmpl/prog/en/modules/opac-detail.tt >@@ -1,5 +1,6 @@ > [% USE Koha %] > [% USE KohaDates %] >+[% USE Branches %] > [% USE AuthorisedValues %] > [% SET TagsShowEnabled = ( TagsEnabled && TagsShowOnDetail ) %] > [% SET TagsInputEnabled = ( opacuserlogin && TagsEnabled && TagsInputOnDetail ) %] >@@ -1476,11 +1477,11 @@ YAHOO.util.Event.onContentReady("furtherm", function () { > <thead><tr> > [% IF ( item_level_itypes ) %]<th id="item_itemtype" class="itype">Item type</th>[% END %] > [% IF ( OpacLocationBranchToDisplay == 'holding' || OpacLocationBranchToDisplay == 'both' || singleBranchMode ) %] >- <th>Current Location</th> >+ <th>Current location</th> > [% END %] > [% UNLESS ( singleBranchMode ) %] > [% IF ( OpacLocationBranchToDisplay == 'home' || OpacLocationBranchToDisplay == 'both' ) %] >- <th>Home Library</th> >+ <th>Home library</th> > [% END %] > [% END %] > [% IF ( itemdata_ccode ) %]<th id="item_ccode" class="collection">Collection</th>[% END %] >@@ -1524,10 +1525,10 @@ YAHOO.util.Event.onContentReady("furtherm", function () { > [% IF ( OpacLocationBranchToDisplay == 'home' || OpacLocationBranchToDisplay == 'both' ) %] > <td class="location_home"> > <span class="[% ITEM_RESULT.branch_opac_info ? 'branch-info-tooltip-trigger' : '' %]"> >- [% IF ( ITEM_RESULT.homebranchurl ) %] >- <a href="[% ITEM_RESULT.homebranchurl %]">[% ITEM_RESULT.homebranchname %]</a> >+ [% IF ( Branches.GetURL( ITEM_RESULT.homebranch ) ) %] >+ <a href="[% Branches.GetURL( ITEM_RESULT.homebranch ) %]">[% Branches.GetName( ITEM_RESULT.homebranch ) %]</a> > [% ELSE %] >- [% ITEM_RESULT.homebranchname %] >+ [% Branches.GetName( ITEM_RESULT.homebranch ) %] > [% END %] > </span> > >-- >1.7.2.5
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 7720
:
8213
|
8215
|
8216
|
8223
|
8224
|
8226
|
8229
|
8230
|
8237
|
8238
|
8243
|
8245
|
8825
|
8868
|
8878
|
9570
|
9762
|
10149
|
11091
|
11092
|
12389
|
13466
|
15237
|
15238
|
15241
|
15247
|
18622
|
19658
|
20217
|
21374
|
21375
|
22155
|
22156
|
28172
|
28173
|
28175