@@ -, +, @@ --- catalogue/moredetail.pl | 30 +++++++++++------- .../prog/en/modules/catalogue/moredetail.tt | 33 ++++++++++--------- 2 files changed, 35 insertions(+), 28 deletions(-) --- a/catalogue/moredetail.pl +++ a/catalogue/moredetail.pl @@ -68,7 +68,7 @@ my $title=$query->param('title'); my $bi=$query->param('bi'); $bi = $biblionumber unless $bi; my $itemnumber = $query->param('itemnumber'); -my $data=GetBiblioData($biblionumber); +my $data = &GetBiblioData($biblionumber); my $dewey = $data->{'dewey'}; my $showallitems = $query->param('showallitems'); @@ -86,7 +86,6 @@ my $subscriptionsnumber = CountSubscriptionFromBiblionumber($biblionumber); # $dewey=~ s/\.$//; # $data->{'dewey'}=$dewey; -my @results; my $fw = GetFrameworkCode($biblionumber); my @all_items= GetItemsInfo($biblionumber); my @items; @@ -107,7 +106,7 @@ if (@hostitems){ push (@items,@hostitems); } - +my $subtitle = GetRecordValue('subtitle', $record, $fw); my $totalcount=@all_items; my $showncount=@items; @@ -120,7 +119,11 @@ my $ccodes= GetKohaAuthorisedValues('items.ccode',$fw); my $itemtypes = GetItemTypes; $data->{'itemtypename'} = $itemtypes->{$data->{'itemtype'}}->{'description'}; -$results[0]=$data; + +foreach ( keys %{$data} ) { + $template->param( "$_" => defined $data->{$_} ? $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); @@ -169,15 +172,18 @@ $template->param(count => $data->{'count'}, subscriptiontitle => $data->{title}, C4::Search::enabled_staff_search_views, ); -$template->param(BIBITEM_DATA => \@results); -$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( + ITEM_DATA => \@items, + moredetailview => 1, + loggedinuser => $loggedinuser, + biblionumber => $biblionumber, + biblioitemnumber => $bi, + itemnumber => $itemnumber, + z3950_search_params => C4::Search::z3950_search_args(GetBiblioData($biblionumber)), + subtitle => $subtitle, +); $template->param(ONLY_ONE => 1) if ( $itemnumber && $showncount != @items ); -$template->param(z3950_search_params => C4::Search::z3950_search_args(GetBiblioData($biblionumber))); output_html_with_http_headers $query, $cookie, $template->output; --- a/koha-tmpl/intranet-tmpl/prog/en/modules/catalogue/moredetail.tt +++ a/koha-tmpl/intranet-tmpl/prog/en/modules/catalogue/moredetail.tt @@ -1,5 +1,5 @@ [% INCLUDE 'doc-head-open.inc' %] -Koha › Catalog › Item details for [% FOREACH BIBITEM_DAT IN BIBITEM_DATA %][% BIBITEM_DAT.title %][% END %] +Koha › Catalog › Item details for [% title %] [% FOREACH subtitl IN subtitle %] [% subtitl.subfield %][% END %] [% INCLUDE 'doc-head-close.inc' %] @@ -8,7 +8,7 @@ [% INCLUDE 'header.inc' %] [% INCLUDE 'cat-search.inc' %] - +
@@ -18,24 +18,25 @@ [% INCLUDE 'cat-toolbar.inc' %]
- [% FOREACH BIBITEM_DAT IN BIBITEM_DATA %] -

[% BIBITEM_DAT.title |html %] [% IF ( BIBITEM_DAT.author ) %], by [% BIBITEM_DAT.author %][% END %]

+ +

[% title |html %]

+ [% IF ( subtitle ) %]

[% FOREACH subtitl IN subtitle %] [% subtitl.subfield|html %][% END %]

[% END %] + [% IF ( author ) %]

by [% author %]

[% END %]
    -
  1. Biblionumber: [% BIBITEM_DAT.biblionumber %] 
  2. +
  3. Biblionumber: [% biblionumber %] 
  4. [% UNLESS ( item_level_itypes ) %] -
  5. Item type: [% BIBITEM_DAT.itemtypename %] 
  6. +
  7. Item type: [% itemtypename %] 
  8. [% END %] - -
  9. Rental charge:[% BIBITEM_DAT.rentalcharge %] 
  10. -
  11. ISBN: [% BIBITEM_DAT.isbn %] 
  12. -
  13. Publisher:[% BIBITEM_DAT.place %] [% BIBITEM_DAT.publishercode |html %] [% BIBITEM_DAT.publicationyear %] 
  14. - [% IF ( BIBITEM_DAT.volumeddesc ) %]
  15. Volume: [% BIBITEM_DAT.volumeddesc %]
  16. [% END %] -
  17. Physical Details: [% BIBITEM_DAT.pages %] [% BIBITEM_DAT.illus %] [% BIBITEM_DAT.size %] 
  18. - [% IF ( BIBITEM_DAT.bnotes ) %]
  19. Notes: [% BIBITEM_DAT.bnotes %]
  20. [% END %] -
  21. No. of Items: [% BIBITEM_DAT.count %] [% IF ( BIBITEM_DAT.hiddencount ) %]total ([% BIBITEM_DAT.showncount %] shown / [% BIBITEM_DAT.hiddencount %] hidden) -Show all items[% END %]
  22. + [% IF ( rentalcharge ) %]
  23. Rental charge:[% rentalcharge %] 
  24. [% END %] +
  25. ISBN: [% isbn %] 
  26. +
  27. Publisher:[% place %] [% publishercode |html %] [% publicationyear %] 
  28. + [% IF ( volumeddesc ) %]
  29. Volume: [% volumeddesc %]
  30. [% END %] +
  31. Physical Details: [% pages %] [% illus %] [% size %] 
  32. + [% IF ( bnotes ) %]
  33. Notes: [% bnotes %]
  34. [% END %] +
  35. No. of Items: [% count %] [% IF ( hiddencount ) %]total ([% showncount %] shown / [% hiddencount %] hidden) +Show all items[% END %]
- [% END %] +
[% IF ( ONLY_ONE ) %]
You are only viewing one item. View All
--