From d5cd90ba26e2b695a694875daa11cbee50f2a8fc Mon Sep 17 00:00:00 2001 From: Matthias Meusburger Date: Mon, 19 Oct 2009 17:52:51 +0200 Subject: [PATCH] MT 1713 : Do not display the items at first if there are too many of them in opac-detail --- .../prog/en/modules/opac-detail.tmpl | 134 +++++++++--------- opac/opac-detail.pl | 10 +- 2 files changed, 78 insertions(+), 66 deletions(-) diff --git a/koha-tmpl/opac-tmpl/prog/en/modules/opac-detail.tmpl b/koha-tmpl/opac-tmpl/prog/en/modules/opac-detail.tmpl index 1156a8d309..6795b17c4c 100644 --- a/koha-tmpl/opac-tmpl/prog/en/modules/opac-detail.tmpl +++ b/koha-tmpl/opac-tmpl/prog/en/modules/opac-detail.tmpl @@ -350,72 +350,76 @@ YAHOO.util.Event.onContentReady("furtherm", function () {
- - - - - - - - - - - - - - - - - - - - - - - - - - - + + + + + + + +
Item typeLocationCollectionCall NumberVol InfoURLCopySerial DataPublishedStatusNotesDate Due
" title="" alt="" /> (&shelfbrowse_itemnumber=#shelfbrowser">Browse Shelf)"> - Not for loan () - - Not for loan () - - - - Checked out to - - Checked out + +

This record has many physical items. &viewallitems=1">Click here to view them all.

+ + + + + + + + + + + + + + + + + + + + + + + + + + + + - - - - - - - -
Item typeLocationCollectionCall NumberVol InfoURLCopySerial DataPublishedStatusNotesDate Due
" title="" alt="" /> (&shelfbrowse_itemnumber=#shelfbrowser">Browse Shelf)"> + Not for loan () + + Not for loan () + + + + Checked out to + + Checked out + + + + + + + " alt="" title="">Item lost + + + Item withdrawn + + Item damaged + + In transit from + to since + + On holdOn holdAvailable + + + - - - - - - " alt="" title="">Item lost - - - Item withdrawn - - Item damaged - - In transit from - to since - - On holdOn holdAvailable - - - - - &item=">Fix Itemtype
+
&item=">Fix Itemtype
+

No physical items for this record

diff --git a/opac/opac-detail.pl b/opac/opac-detail.pl index 2eb819b949..0dfe23c363 100755 --- a/opac/opac-detail.pl +++ b/opac/opac-detail.pl @@ -126,6 +126,14 @@ foreach my $subscription (@subscriptions) { $dat->{'count'} = scalar(@items); +# If there is a lot of items, and the user has not decided +# to view them all yet, we first warn him +# TODO: The limit of 50 could be a syspref +my $viewallitems = $query->param('viewallitems'); +if ($dat->{'count'} >= 50 && !$viewallitems) { + $template->param('lotsofitems' => 1); +} + my $biblio_authorised_value_images = C4::Items::get_authorised_value_images( C4::Biblio::get_biblio_authorised_values( $biblionumber, $record ) ); my $norequests = 1; @@ -607,7 +615,7 @@ switch (C4::Context->preference('opacSerialDefaultTab')) { case "holdings" { if ($dat->{'count'} > 0) { - $dat->{'defaultholdings'} = 1; + $defaulttab = 'holdings'; } else { # As this is the last option, we try other options if there are no items if ($subscriptionsnumber) { -- 2.39.2