Bugzilla – Attachment 8230 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]
[SIGNED-OFF] Bug 7720 - Ambiguity in OPAC Details location.
SIGNED-OFF-Bug-7720---Ambiguity-in-OPAC-Details-lo.patch (text/plain), 5.55 KB, created by
Nicole C. Engard
on 2012-03-16 14:31:31 UTC
(
hide
)
Description:
[SIGNED-OFF] Bug 7720 - Ambiguity in OPAC Details location.
Filename:
MIME Type:
Creator:
Nicole C. Engard
Created:
2012-03-16 14:31:31 UTC
Size:
5.55 KB
patch
obsolete
>From 0a1302871afccd5ad250bc5d5157003550349fbf Mon Sep 17 00:00:00 2001 >From: Kyle M Hall <kyle@bywatersolutions.com> >Date: Thu, 15 Mar 2012 10:27:12 -0400 >Subject: [PATCH] [SIGNED-OFF] Bug 7720 - Ambiguity in OPAC Details location. > >Currently, in opac-detail.pl, there exists a column named 'Location'. >This column lists the name of the holding branch, and the item's >location description. This can cause confusion to borrowers, as >they may assume that the holding branch is the *owning* branch >(homebranch) of an item. > >This could cause a situation where a borrower waits for an >item to be returned to his or her library, only to find that >the library never owned that item, and it was transferred back >to it's homebranch. It could also lead a borrower to falsely >assume that his or her home library does not own a copy of a >particular item because the borrower does not see an his or her >home library listed for any of the items on the record. > >In addition, even when the holding branch is different >than the home branch, the item's shelving location is displayed, >even though that branch may not use that location. > >This commit makes the item details table equivilent to the intranet >details page by adding a "Home Library" column, which displays the >item's home library, as well as the shelving location. > >If singleBranchMode is enabled, this column disappears and the >"Location" column displays the shelving location only. > >Signed-off-by: Nicole C. Engard <nengard@bywatersolutions.com> > >Searched in the OPAC and checked the details page for several titles. >All tests passed. >--- > C4/Items.pm | 11 ++++++- > koha-tmpl/opac-tmpl/prog/en/modules/opac-detail.tt | 31 ++++++++++++++++++- > 2 files changed, 39 insertions(+), 3 deletions(-) > >diff --git a/C4/Items.pm b/C4/Items.pm >index 676c91b..bd0e8c6 100644 >--- a/C4/Items.pm >+++ b/C4/Items.pm >@@ -1185,7 +1185,8 @@ sub GetItemsInfo { > items.notforloan as itemnotforloan, > itemtypes.description, > itemtypes.notforloan as notforloan_per_itemtype, >- holding.branchurl >+ holding.branchurl, >+ home.branchurl AS homebranchurl > FROM items > LEFT JOIN branches AS holding ON items.holdingbranch = holding.branchcode > LEFT JOIN branches AS home ON items.homebranch=home.branchcode >@@ -1237,6 +1238,14 @@ 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-tmpl/opac-tmpl/prog/en/modules/opac-detail.tt b/koha-tmpl/opac-tmpl/prog/en/modules/opac-detail.tt >index 7af60a0..44bdff5 100644 >--- a/koha-tmpl/opac-tmpl/prog/en/modules/opac-detail.tt >+++ b/koha-tmpl/opac-tmpl/prog/en/modules/opac-detail.tt >@@ -580,7 +580,8 @@ YAHOO.util.Event.onContentReady("furtherm", function () { > <table id="holdingst"> > <thead><tr> > [% IF ( item_level_itypes ) %]<th>Item type</th>[% END %] >- <th>Location</th> >+ <th>Current Location</th> >+ [% UNLESS ( singleBranchMode ) %]<th>Home Library</th>[% END %] > [% IF ( itemdata_ccode ) %]<th>Collection</th>[% END %] > <th>Call Number</th> > [% IF ( itemdata_enumchron ) %]<th>Vol Info</th>[% END %] >@@ -592,7 +593,33 @@ YAHOO.util.Event.onContentReady("furtherm", function () { > </tr></thead> > <tbody>[% FOREACH ITEM_RESULT IN ITEM_RESULTS %] > <tr>[% IF ( item_level_itypes ) %]<td>[% UNLESS ( noItemTypeImages ) %][% IF ( ITEM_RESULT.imageurl ) %]<img src="[% ITEM_RESULT.imageurl %]" title="[% ITEM_RESULT.description %]" alt="[% ITEM_RESULT.description %]" />[% END %][% END %] [% ITEM_RESULT.description %]</td>[% END %] >- <td>[% UNLESS ( singleBranchMode ) %][% IF ( ITEM_RESULT.branchurl ) %]<a href="[% ITEM_RESULT.branchurl %]">[% ITEM_RESULT.branchname %]</a>[% ELSE %][% ITEM_RESULT.branchname %][% END %][% END %] <span class="shelvingloc">[% ITEM_RESULT.location_description %]</span> </td> >+ <td> >+ [% UNLESS ( singleBranchMode ) %] >+ [% IF ( ITEM_RESULT.branchurl ) %] >+ <a href="[% ITEM_RESULT.branchurl %]">[% ITEM_RESULT.branchname %]</a> >+ [% ELSE %] >+ [% ITEM_RESULT.branchname %] >+ [% END %] >+ >+ [% END %] >+ >+ [% IF ( singleBranchMode ) %] >+ <span class="shelvingloc">[% ITEM_RESULT.location_description %]</span> >+ [% END %] >+ </td> >+ >+ [% UNLESS ( singleBranchMode ) %] >+ <td> >+ [% IF ( ITEM_RESULT.homebranchurl ) %] >+ <a href="[% ITEM_RESULT.homebranchurl %]">[% ITEM_RESULT.homebranchname %]</a> >+ [% ELSE %] >+ [% ITEM_RESULT.homebranchname %] >+ [% END %] >+ >+ <span class="shelvingloc">[% ITEM_RESULT.location_description %]</span> >+ </td> >+ [% END %] >+ > [% IF ( itemdata_ccode ) %]<td>[% ITEM_RESULT.ccode %]</td>[% END %] > <td>[% IF ( ITEM_RESULT.itemcallnumber ) %] [% ITEM_RESULT.itemcallnumber %][% IF ( OPACShelfBrowser ) %] (<a href="/cgi-bin/koha/opac-detail.pl?biblionumber=[% ITEM_RESULT.biblionumber %]&shelfbrowse_itemnumber=[% ITEM_RESULT.itemnumber %]#shelfbrowser">Browse Shelf</a>)[% END %][% END %]</td> > [% IF ( itemdata_enumchron ) %]<td>[% ITEM_RESULT.enumchron %]</td>[% END %] >-- >1.7.2.3
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