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

(-)a/installer/data/mysql/sysprefs.sql (-1 / +2 lines)
Lines 347-350 INSERT INTO systempreferences (variable,value,explanation,options,type) VALUES(' Link Here
347
INSERT INTO systempreferences (variable,value,explanation,options,type) VALUES('LinkerKeepStale',0,'If ON the authority linker will keep existing authority links for headings where it is unable to find a match.',NULL,'YesNo');
347
INSERT INTO systempreferences (variable,value,explanation,options,type) VALUES('LinkerKeepStale',0,'If ON the authority linker will keep existing authority links for headings where it is unable to find a match.',NULL,'YesNo');
348
INSERT INTO systempreferences (variable,value,explanation,options,type) VALUES('CatalogModuleRelink',0,'If OFF the linker will never replace the authids that are set in the cataloging module.',NULL,'YesNo');
348
INSERT INTO systempreferences (variable,value,explanation,options,type) VALUES('CatalogModuleRelink',0,'If OFF the linker will never replace the authids that are set in the cataloging module.',NULL,'YesNo');
349
INSERT INTO systempreferences (variable,value,options,explanation,type) VALUES ('ExpireReservesMaxPickUpDelay',  '0',  '',  'Enabling this allows holds to expire automatically if they have not been picked by within the time period specified in ReservesMaxPickUpDelay',  'YesNo');
349
INSERT INTO systempreferences (variable,value,options,explanation,type) VALUES ('ExpireReservesMaxPickUpDelay',  '0',  '',  'Enabling this allows holds to expire automatically if they have not been picked by within the time period specified in ReservesMaxPickUpDelay',  'YesNo');
350
INSERT INTO systempreferences` (variable,value,options,explanation,type) VALUES ('ExpireReservesMaxPickUpDelayCharge', '0', NULL , 'If ExpireReservesMaxPickUpDelay is enabled, and this field has a non-zero value, than a borrower whose waiting hold has expired will be charged this amount.',  'free')
350
INSERT INTO systempreferences (variable,value,options,explanation,type) VALUES ('ExpireReservesMaxPickUpDelayCharge', '0', NULL , 'If ExpireReservesMaxPickUpDelay is enabled, and this field has a non-zero value, than a borrower whose waiting hold has expired will be charged this amount.',  'free');
351
INSERT INTO systempreferences (variable,value,explanation,options,type) VALUES('OPACShowHoldsCount',0,'Show the total number of holds in the OPAC details',NULL,'YesNo');
(-)a/installer/data/mysql/updatedatabase.pl (+7 lines)
Lines 4892-4897 if ( C4::Context->preference("Version") < TransformToNum($DBversion) ) { Link Here
4892
    SetVersion($DBversion);
4892
    SetVersion($DBversion);
4893
}
4893
}
4894
4894
4895
$DBversion = "3.07.00.XXX";
4896
if ( C4::Context->preference("Version") < TransformToNum($DBversion) ) {
4897
    $dbh->do("INSERT INTO systempreferences (variable,value,explanation,options,type) VALUES('OPACShowHoldsCount',0,'Show the total number of holds in the OPAC details',NULL,'YesNo')");
4898
    print "Upgrade to $DBversion done (Added system preference OPACShowHoldsCount)\n";
4899
    SetVersion($DBversion);
4900
}
4901
4895
=head1 FUNCTIONS
4902
=head1 FUNCTIONS
4896
4903
4897
=head2 DropAllForeignKeys($table)
4904
=head2 DropAllForeignKeys($table)
(-)a/koha-tmpl/intranet-tmpl/prog/en/modules/admin/preferences/opac.pref (+6 lines)
Lines 343-348 OPAC: Link Here
343
                  no: "Don't allow"
343
                  no: "Don't allow"
344
            - patrons to place holds on specific items in the OPAC. If this is disabled, users can only put a hold on the next available item.
344
            - patrons to place holds on specific items in the OPAC. If this is disabled, users can only put a hold on the next available item.
345
        -
345
        -
346
            - pref: OPACShowHoldsCount
347
              choices:
348
                  yes: Show
349
                  no: "Don't show"
350
            - the total number of holds on the details page
351
        -
346
            - pref: OpacRenewalAllowed
352
            - pref: OpacRenewalAllowed
347
              choices:
353
              choices:
348
                  yes: Allow
354
                  yes: Allow
(-)a/koha-tmpl/opac-tmpl/prog/en/modules/opac-detail.tt (+9 lines)
Lines 589-594 YAHOO.util.Event.onContentReady("furtherm", function () { Link Here
589
		<th>Status</th>
589
		<th>Status</th>
590
		[% IF ( itemdata_itemnotes ) %]<th>Notes</th>[% END %]
590
		[% IF ( itemdata_itemnotes ) %]<th>Notes</th>[% END %]
591
		<th>Date Due</th>
591
		<th>Date Due</th>
592
        [% IF holds_count.defined %]
593
		<th>Holds</th>
594
        [% END %]
592
	    </tr></thead>
595
	    </tr></thead>
593
	    <tbody>[% FOREACH ITEM_RESULT IN ITEM_RESULTS %]
596
	    <tbody>[% FOREACH ITEM_RESULT IN ITEM_RESULTS %]
594
	    <tr>[% IF ( item_level_itypes ) %]<td>[% 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 %]
597
	    <tr>[% IF ( item_level_itypes ) %]<td>[% 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 %]
Lines 601-610 YAHOO.util.Event.onContentReady("furtherm", function () { Link Here
601
		<td>[% INCLUDE 'item-status.inc' item = ITEM_RESULT %]</td>
604
		<td>[% INCLUDE 'item-status.inc' item = ITEM_RESULT %]</td>
602
		[% IF ( itemdata_itemnotes ) %]<td>[% ITEM_RESULT.itemnotes %]</td>[% END %]
605
		[% IF ( itemdata_itemnotes ) %]<td>[% ITEM_RESULT.itemnotes %]</td>[% END %]
603
		<td>[% ITEM_RESULT.datedue %]</td>
606
		<td>[% ITEM_RESULT.datedue %]</td>
607
        [% IF holds_count.defined %]
608
		<td>[% ITEM_RESULT.holds_count %]</td>
609
        [% END %]
604
	    </tr>
610
	    </tr>
605
	    [% END %]</tbody>
611
	    [% END %]</tbody>
606
	</table>
612
	</table>
607
    [% END %]
613
    [% END %]
614
    [% IF holds_count.defined %]
615
	<div id="bib_holds">Holds: [% holds_count %]</div>
616
    [% END %]
608
[% ELSE %]
617
[% ELSE %]
609
    [% IF ( ALTERNATEHOLDINGS ) %]
618
    [% IF ( ALTERNATEHOLDINGS ) %]
610
    [% FOREACH ALTERNATEHOLDING IN ALTERNATEHOLDINGS %]
619
    [% FOREACH ALTERNATEHOLDING IN ALTERNATEHOLDINGS %]
(-)a/opac/opac-detail.pl (-1 / +10 lines)
Lines 479-488 if ($dat->{'count'} >= 50 && !$viewallitems) { Link Here
479
479
480
my $biblio_authorised_value_images = C4::Items::get_authorised_value_images( C4::Biblio::get_biblio_authorised_values( $biblionumber, $record ) );
480
my $biblio_authorised_value_images = C4::Items::get_authorised_value_images( C4::Biblio::get_biblio_authorised_values( $biblionumber, $record ) );
481
481
482
my %item_reserves;
483
if ( C4::Context->preference("OPACShowHoldsCount") ) {
484
    my ($reserve_count,$reserves) = GetReservesFromBiblionumber($biblionumber);
485
    $template->param( holds_count  => $reserve_count );
486
    foreach (@$reserves) {
487
        $item_reserves{ $_->{itemnumber} }++ if $_->{itemnumber};
488
    }
489
}
490
482
my $norequests = 1;
491
my $norequests = 1;
483
my $branches = GetBranches();
492
my $branches = GetBranches();
484
my %itemfields;
493
my %itemfields;
485
for my $itm (@items) {
494
for my $itm (@items) {
495
    $itm->{holds_count} = $item_reserves{ $itm->{itemnumber} };
486
    $norequests = 0
496
    $norequests = 0
487
       if ( (not $itm->{'wthdrawn'} )
497
       if ( (not $itm->{'wthdrawn'} )
488
         && (not $itm->{'itemlost'} )
498
         && (not $itm->{'itemlost'} )
489
- 

Return to bug 7398