Bugzilla – Attachment 28173 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 2014-05-12 10:59:33 UTC
(
hide
)
Description:
Bug 7720 - Ambiguity in OPAC Details location - QA Followup
Filename:
MIME Type:
Creator:
Kyle M Hall (khall)
Created:
2014-05-12 10:59:33 UTC
Size:
4.12 KB
patch
obsolete
>From 7567acab22f6bfede6690fc04a2010866fe89fe5 Mon Sep 17 00:00:00 2001 >From: Kyle M Hall <kyle@bywatersolutions.com> >Date: Mon, 12 May 2014 06:58:34 -0400 >Subject: [PATCH] Bug 7720 - Ambiguity in OPAC Details location - QA Followup > >Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl> >--- > 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 a252ba1..8573a51 100644 >--- a/C4/Items.pm >+++ b/C4/Items.pm >@@ -1323,14 +1323,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 ddf5f2f..ff43a38 100644 >--- a/Koha/Template/Plugin/Branches.pm >+++ b/Koha/Template/Plugin/Branches.pm >@@ -44,4 +44,14 @@ sub GetLoggedInBranchcode { > ''; > } > >+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 2e3f1ad..baaec0b 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 ) %] >@@ -1505,11 +1506,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 %] >@@ -1562,10 +1563,10 @@ YAHOO.util.Event.onContentReady("furtherm", function () { > <link property="businessFunction" href="http://purl.org/goodrelations/v1#LeaseOut"> > > <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