If itemnumber is sent to catalogue/moredetail.pl use it
authorMichael Hafen <mdhafen@tech.washk12.org>
Fri, 29 Aug 2008 19:36:51 +0000 (13:36 -0600)
committerChris Cormack <chris@bigballofwax.co.nz>
Thu, 3 Sep 2009 23:15:26 +0000 (11:15 +1200)
If itemnumber is part of the url for catalogue/moredetail.pl
put it to use.
This happens in members/boraccount.pl if a fine is attached to a
barcode.

This patch makes moredetail.pl show only the item specified by
itemnumber.

Implements some changes to the patch suggested on
patches@koha.org
give visual cue on UI and a link out.
More friendly pruning of the other items.

Thanks to Galen Charlton and Joe Atzberger

Signed-off-by: Galen Charlton <galen.charlton@liblime.com>
Signed-off-by: Chris Cormack <chris@bigballofwax.co.nz>
catalogue/moredetail.pl
koha-tmpl/intranet-tmpl/prog/en/modules/catalogue/moredetail.tmpl

index 6d6e572..6f62661 100755 (executable)
@@ -50,7 +50,8 @@ my ($template, $loggedinuser, $cookie) = get_template_and_user({
 
 my $biblionumber=$query->param('biblionumber');
 my $title=$query->param('title');
-# my $bi=$query->param('bi');
+my $itemnumber=$query->param('itemnumber');
+my $bi=$query->param('bi');
 # $bi = $biblionumber unless $bi;
 my $data=GetBiblioData($biblionumber);
 my $dewey = $data->{'dewey'};
index fd7a162..fca9621 100644 (file)
@@ -37,7 +37,7 @@
     <!-- /TMPL_LOOP -->
     <br clear="all" />
     <!-- TMPL_IF NAME="ONLY_ONE" -->
-        <div class="dialog message">You are only viewing one item.  <a href="/cgi-bin/koha/catalogue/moredetail.pl?biblionumber=<!-- TMPL_VAR NAME="biblionumber" -->&amp;bi=<!-- TMPL_VAR NAME="biblioitemnumber" -->#item<!-- TMPL_VAR NAME="itemnumber">">View All</a></div>
+        <div class="alert">You are only viewing one item.  <a href="/cgi-bin/koha/catalogue/moredetail.pl?biblionumber=<!-- TMPL_VAR NAME="biblionumber" -->&amp;bi=<!-- TMPL_VAR NAME="biblioitemnumber" -->#item<!-- TMPL_VAR NAME="itemnumber">">View All</a></div>
     <!-- /TMPL_IF -->
     <!-- TMPL_LOOP NAME="ITEM_DATA" -->
     <div class="yui-g">