View | Details | Raw Unified | Return to bug 7674
Collapse All | Expand All

(-)a/koha-tmpl/opac-tmpl/prog/en/modules/opac-detail.tt (-9 / +25 lines)
Lines 643-651 YAHOO.util.Event.onContentReady("furtherm", function () { Link Here
643
<div id="bibliodescriptions" class="toptabs">
643
<div id="bibliodescriptions" class="toptabs">
644
644
645
<ul>   
645
<ul>   
646
[% IF ( defaulttab == 'holdings' ) %]<li id="tab_holdings" class="ui-tabs-selected">[% ELSE %]<li id="tab_holdings">[% END %]
646
    [% IF ( defaulttab == 'holdings' ) %]<li id="tab_holdings" class="ui-tabs-selected">[% ELSE %]<li id="tab_holdings">[% END %]
647
    <a href="#holdings">Holdings ( [% count %] )</a>
647
        <a href="#holdings">[% IF SeparateHoldings %]My holdings[% ELSE %]Holdings[% END %] ( [% itemloop.size || 0 %] )</a>
648
</li>
648
    </li>
649
    [% IF (SeparateHoldings) %]
650
        <li><a href="#otherholdings">Other holdings ( [% otheritemloop.size || 0 %] )</a></li>
651
    [% END %]
649
<li id="tab_descriptions"> <a href="#descriptions">Title notes</a></li>
652
<li id="tab_descriptions"> <a href="#descriptions">Title notes</a></li>
650
[% IF ( SYNDETICS_TOC ) %]
653
[% IF ( SYNDETICS_TOC ) %]
651
    <li id="tab_toc"> <a href="#toc">TOC</a></li>
654
    <li id="tab_toc"> <a href="#toc">TOC</a></li>
Lines 733-743 YAHOO.util.Event.onContentReady("furtherm", function () { Link Here
733
</div>
736
</div>
734
[% END %]
737
[% END %]
735
738
736
<div id="holdings">
739
[% BLOCK items_table %]
737
[% IF ( count ) %]
738
    [% IF ( lotsofitems ) %]
739
	<p>This record has many physical items. <a href="/cgi-bin/koha/opac-detail.pl?biblionumber=[% biblionumber %]&amp;viewallitems=1#holdings">Click here to view them all.</a></p>
740
    [% ELSE %]
741
    <table id="holdingst">
740
    <table id="holdingst">
742
        <thead><tr>
741
        <thead><tr>
743
            [% IF ( item_level_itypes ) %]<th id="item_itemtype">Item type</th>[% END %]
742
            [% IF ( item_level_itypes ) %]<th id="item_itemtype">Item type</th>[% END %]
Lines 757-763 YAHOO.util.Event.onContentReady("furtherm", function () { Link Here
757
            <th>Item hold queue priority</th>
756
            <th>Item hold queue priority</th>
758
        [% END %]
757
        [% END %]
759
        </tr></thead>
758
        </tr></thead>
760
	    <tbody>[% FOREACH ITEM_RESULT IN ITEM_RESULTS %]
759
	    <tbody>[% FOREACH ITEM_RESULT IN items %]
761
      <tr>[% IF ( item_level_itypes ) %]<td class="itype">[% 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 %]
760
      <tr>[% IF ( item_level_itypes ) %]<td class="itype">[% 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 %]
762
             <td class="location">
761
             <td class="location">
763
    [% UNLESS ( singleBranchMode ) %]
762
    [% UNLESS ( singleBranchMode ) %]
Lines 796-801 YAHOO.util.Event.onContentReady("furtherm", function () { Link Here
796
	    </tr>
795
	    </tr>
797
	    [% END %]</tbody>
796
	    [% END %]</tbody>
798
	</table>
797
	</table>
798
[% END %][%# end of items_table block %]
799
800
<div id="holdings">
801
[% IF ( itemloop.size ) %]
802
    [% IF ( lotsofitems ) %]
803
	<p>This record has many physical items. <a href="/cgi-bin/koha/opac-detail.pl?biblionumber=[% biblionumber %]&amp;viewallitems=1#holdings">Click here to view them all.</a></p>
804
    [% ELSE %]
805
        [% PROCESS items_table items=itemloop %]
799
    [% END %]
806
    [% END %]
800
    [% IF holds_count.defined || priority %]
807
    [% IF holds_count.defined || priority %]
801
    <div id="bib_holds">
808
    <div id="bib_holds">
Lines 880-885 YAHOO.util.Event.onContentReady("furtherm", function () { Link Here
880
<br clear="all" />
887
<br clear="all" />
881
</div>
888
</div>
882
889
890
[% IF (SeparateHoldings) %]
891
    <div id="otherholdings">
892
        [% IF (otheritemloop.size) %]
893
            [% PROCESS items_table items=otheritemloop %]
894
        [% ELSE %]
895
            No other items.
896
        [% END %]
897
    </div>
898
[% END %]
883
899
884
<div id="descriptions">
900
<div id="descriptions">
885
<div class="content_set">
901
<div class="content_set">
(-)a/opac/opac-detail.pl (-10 / +26 lines)
Lines 481-493 foreach my $subscription (@subscriptions) { Link Here
481
481
482
$dat->{'count'} = scalar(@items);
482
$dat->{'count'} = scalar(@items);
483
483
484
# If there is a lot of items, and the user has not decided
485
# to view them all yet, we first warn him
486
# TODO: The limit of 50 could be a syspref
487
my $viewallitems = $query->param('viewallitems');
488
if ($dat->{'count'} >= 50 && !$viewallitems) {
489
    $template->param('lotsofitems' => 1);
490
}
491
484
492
my $biblio_authorised_value_images = C4::Items::get_authorised_value_images( C4::Biblio::get_biblio_authorised_values( $biblionumber, $record ) );
485
my $biblio_authorised_value_images = C4::Items::get_authorised_value_images( C4::Biblio::get_biblio_authorised_values( $biblionumber, $record ) );
493
486
Lines 516-521 $template->param( show_priority => $has_hold ) ; Link Here
516
my $norequests = 1;
509
my $norequests = 1;
517
my $branches = GetBranches();
510
my $branches = GetBranches();
518
my %itemfields;
511
my %itemfields;
512
my (@itemloop, @otheritemloop);
513
my $currentbranch = C4::Context->userenv ? C4::Context->userenv->{branch} : undef;
514
if ($currentbranch) {
515
    $template->param(SeparateHoldings => 1);
516
}
519
for my $itm (@items) {
517
for my $itm (@items) {
520
    $itm->{holds_count} = $item_reserves{ $itm->{itemnumber} };
518
    $itm->{holds_count} = $item_reserves{ $itm->{itemnumber} };
521
    $itm->{priority} = $priority{ $itm->{itemnumber} };
519
    $itm->{priority} = $priority{ $itm->{itemnumber} };
Lines 566-571 for my $itm (@items) { Link Here
566
        $itm->{transfertfrom} = $branches->{$transfertfrom}{branchname};
564
        $itm->{transfertfrom} = $branches->{$transfertfrom}{branchname};
567
        $itm->{transfertto}   = $branches->{$transfertto}{branchname};
565
        $itm->{transfertto}   = $branches->{$transfertto}{branchname};
568
     }
566
     }
567
    my $homebranch = $itm->{homebranch};
568
    if ($currentbranch) {
569
        if ($homebranch and $homebranch eq $currentbranch) {
570
            push @itemloop, $itm;
571
        } else {
572
            push @otheritemloop, $itm;
573
        }
574
    } else {
575
        push @itemloop, $itm;
576
    }
577
}
578
579
# If there is a lot of items, and the user has not decided
580
# to view them all yet, we first warn him
581
# TODO: The limit of 50 could be a syspref
582
my $viewallitems = $query->param('viewallitems');
583
if (scalar(@itemloop) >= 50 && !$viewallitems) {
584
    $template->param('lotsofitems' => 1);
569
}
585
}
570
586
571
## get notes and subjects from MARC record
587
## get notes and subjects from MARC record
Lines 694-700 if(C4::Context->preference("ISBD")) { Link Here
694
}
710
}
695
711
696
$template->param(
712
$template->param(
697
    ITEM_RESULTS        => \@items,
713
    itemloop            => \@itemloop,
714
    otheritemloop       => \@otheritemloop,
698
    subscriptionsnumber => $subscriptionsnumber,
715
    subscriptionsnumber => $subscriptionsnumber,
699
    biblionumber        => $biblionumber,
716
    biblionumber        => $biblionumber,
700
    subscriptions       => \@subs,
717
    subscriptions       => \@subs,
Lines 957-963 my $defaulttab = Link Here
957
        ? 'subscriptions' :
974
        ? 'subscriptions' :
958
    $opac_serial_default eq 'serialcollection' && @serialcollections > 0
975
    $opac_serial_default eq 'serialcollection' && @serialcollections > 0
959
        ? 'serialcollection' :
976
        ? 'serialcollection' :
960
    $opac_serial_default eq 'holdings' && $dat->{'count'} > 0
977
    $opac_serial_default eq 'holdings' && scalar (@itemloop) > 0
961
        ? 'holdings' :
978
        ? 'holdings' :
962
    $subscriptionsnumber
979
    $subscriptionsnumber
963
        ? 'subscriptions' :
980
        ? 'subscriptions' :
964
- 

Return to bug 7674