From 0543a9633cdd056b8be921e5afe4395d84fc1285 Mon Sep 17 00:00:00 2001 From: Michael Hafen Date: Fri, 29 Aug 2008 13:36:51 -0600 Subject: [PATCH] If itemnumber is sent to catalogue/moredetail.pl use it 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 --- catalogue/moredetail.pl | 7 ++++++- .../prog/en/modules/catalogue/moredetail.tmpl | 3 +++ 2 files changed, 9 insertions(+), 1 deletion(-) diff --git a/catalogue/moredetail.pl b/catalogue/moredetail.pl index 5d0908775f..6176815995 100755 --- a/catalogue/moredetail.pl +++ b/catalogue/moredetail.pl @@ -51,7 +51,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'}; @@ -83,6 +84,7 @@ my $itemtypes = GetItemTypes; $data->{'itemtypename'} = $itemtypes->{$data->{'itemtype'}}->{'description'}; $results[0]=$data; +($itemnumber) and @items = (grep {$_->{'itemnumber'} == $itemnumber} @items); foreach my $item (@items){ $item->{itemlostloop}= GetAuthorisedValues(GetAuthValCode('items.itemlost',$fw),$item->{itemlost}) if GetAuthValCode('items.itemlost',$fw); $item->{itemdamagedloop}= GetAuthorisedValues(GetAuthValCode('items.damaged',$fw),$item->{damaged}) if GetAuthValCode('items.damaged',$fw); @@ -124,6 +126,9 @@ $template->param(ITEM_DATA => \@items); $template->param(moredetailview => 1); $template->param(loggedinuser => $loggedinuser); $template->param(biblionumber => $biblionumber); +$template->param(biblioitemnumber => $bi); +$template->param(itemnumber => $itemnumber); +$template->param(ONLY_ONE => 1) if ( $itemnumber && $count != @items ); output_html_with_http_headers $query, $cookie, $template->output; diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/catalogue/moredetail.tmpl b/koha-tmpl/intranet-tmpl/prog/en/modules/catalogue/moredetail.tmpl index 97fec1f70a..4935bd28da 100644 --- a/koha-tmpl/intranet-tmpl/prog/en/modules/catalogue/moredetail.tmpl +++ b/koha-tmpl/intranet-tmpl/prog/en/modules/catalogue/moredetail.tmpl @@ -36,6 +36,9 @@
+ +
You are only viewing one item. &bi=#item

">Barcode

-- 2.39.5