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

(-)a/C4/Circulation.pm (-1 / +2 lines)
Lines 2167-2173 sub CanBookBeRenewed { Link Here
2167
                   LEFT JOIN biblioitems USING (biblioitemnumber)
2167
                   LEFT JOIN biblioitems USING (biblioitemnumber)
2168
                   
2168
                   
2169
                   WHERE
2169
                   WHERE
2170
                    (issuingrules.categorycode = borrowers.categorycode OR issuingrules.categorycode = '*')
2170
                    (issuingrules.categorycode = borrowers.categorycode 
2171
			OR issuingrules.categorycode = '*')
2171
                   AND
2172
                   AND
2172
                    (issuingrules.itemtype = $itype OR issuingrules.itemtype = '*')
2173
                    (issuingrules.itemtype = $itype OR issuingrules.itemtype = '*')
2173
                   AND
2174
                   AND
(-)a/C4/Items.pm (+2 lines)
Lines 156-161 sub GetItem { Link Here
156
        ($data->{'serialseq'} , $data->{'publisheddate'}) = $ssth->fetchrow_array();
156
        ($data->{'serialseq'} , $data->{'publisheddate'}) = $ssth->fetchrow_array();
157
    }
157
    }
158
	#if we don't have an items.itype, use biblioitems.itemtype.
158
	#if we don't have an items.itype, use biblioitems.itemtype.
159
    # FIXME this should respect the itypes systempreference
160
    # if (C4::Context->preference('item-level_itypes')) {
159
	if( ! $data->{'itype'} ) {
161
	if( ! $data->{'itype'} ) {
160
		my $sth = $dbh->prepare("SELECT itemtype FROM biblioitems  WHERE biblionumber = ?");
162
		my $sth = $dbh->prepare("SELECT itemtype FROM biblioitems  WHERE biblionumber = ?");
161
		$sth->execute($data->{'biblionumber'});
163
		$sth->execute($data->{'biblionumber'});
(-)a/C4/Reserves.pm (-12 / +61 lines)
Lines 3-8 package C4::Reserves; Link Here
3
# Copyright 2000-2002 Katipo Communications
3
# Copyright 2000-2002 Katipo Communications
4
#           2006 SAN Ouest Provence
4
#           2006 SAN Ouest Provence
5
#           2007-2010 BibLibre Paul POULAIN
5
#           2007-2010 BibLibre Paul POULAIN
6
#           2011 Catalyst IT
6
#
7
#
7
# This file is part of Koha.
8
# This file is part of Koha.
8
#
9
#
Lines 471-477 sub CanItemBeReserved{ Link Here
471
    if(my $rowcount = $sthcount->fetchrow_hashref()){
472
    if(my $rowcount = $sthcount->fetchrow_hashref()){
472
        $reservecount = $rowcount->{count};
473
        $reservecount = $rowcount->{count};
473
    }
474
    }
474
    
475
    # we check if it's ok or not
475
    # we check if it's ok or not
476
    if( $reservecount < $allowedreserves ){
476
    if( $reservecount < $allowedreserves ){
477
        return 1;
477
        return 1;
Lines 1299-1305 sub GetReserveInfo { Link Here
1299
1299
1300
=head2 IsAvailableForItemLevelRequest
1300
=head2 IsAvailableForItemLevelRequest
1301
1301
1302
  my $is_available = IsAvailableForItemLevelRequest($itemnumber);
1302
  my $is_available = IsAvailableForItemLevelRequest($itemnumber,$borrowernumber,$branchcode);
1303
1303
1304
Checks whether a given item record is available for an
1304
Checks whether a given item record is available for an
1305
item-level hold request.  An item is available if
1305
item-level hold request.  An item is available if
Lines 1309-1320 item-level hold request. An item is available if Link Here
1309
* it is not withdrawn AND 
1309
* it is not withdrawn AND 
1310
* does not have a not for loan value > 0
1310
* does not have a not for loan value > 0
1311
1311
1312
Whether or not the item is currently on loan is 
1312
Need to check the issuingrules onshelfholds column, 
1313
also checked - if the AllowOnShelfHolds system preference
1313
if this is set items on the shelf can be placed on hold
1314
is ON, an item can be requested even if it is currently
1315
on loan to somebody else.  If the system preference
1316
is OFF, an item that is currently checked out cannot
1317
be the target of an item-level hold request.
1318
1314
1319
Note that IsAvailableForItemLevelRequest() does not
1315
Note that IsAvailableForItemLevelRequest() does not
1320
check if the staff operator is authorized to place
1316
check if the staff operator is authorized to place
Lines 1326-1334 and canreservefromotherbranches. Link Here
1326
1322
1327
sub IsAvailableForItemLevelRequest {
1323
sub IsAvailableForItemLevelRequest {
1328
    my $itemnumber = shift;
1324
    my $itemnumber = shift;
1329
   
1325
    my $borrowernumber = shift;
1326
    my $branchcode = shift;
1330
    my $item = GetItem($itemnumber);
1327
    my $item = GetItem($itemnumber);
1331
1332
    # must check the notforloan setting of the itemtype
1328
    # must check the notforloan setting of the itemtype
1333
    # FIXME - a lot of places in the code do this
1329
    # FIXME - a lot of places in the code do this
1334
    #         or something similar - need to be
1330
    #         or something similar - need to be
Lines 1361-1374 sub IsAvailableForItemLevelRequest { Link Here
1361
                               $item->{wthdrawn} or
1357
                               $item->{wthdrawn} or
1362
                               $notforloan_per_itemtype;
1358
                               $notforloan_per_itemtype;
1363
1359
1364
1360
    # check issuingrules
1365
    if (C4::Context->preference('AllowOnShelfHolds')) {
1361
    
1362
    if (OnShelfHoldsAllowed($itemnumber,$borrowernumber,$branchcode)) {
1366
        return $available_per_item;
1363
        return $available_per_item;
1367
    } else {
1364
    } else {
1368
        return ($available_per_item and ($item->{onloan} or GetReserveStatus($itemnumber) eq "W")); 
1365
        return ($available_per_item and ($item->{onloan} or GetReserveStatus($itemnumber) eq "W")); 
1369
    }
1366
    }
1370
}
1367
}
1371
1368
1369
=head2 OnShelfHoldsAllowed
1370
1371
  OnShelfHoldsAllowed($itemnumber,$borrowernumber,$branchcode);
1372
1373
Checks issuingrules, using the borrowers categorycode, the itemtype, and branchcode to see if onshelf
1374
holds are allowed, returns true if so. 
1375
1376
=cut
1377
1378
sub OnShelfHoldsAllowed {
1379
    my ($itemnumber,$borrowernumber,$branchcode) = @_;
1380
    my $item = GetItem($itemnumber);
1381
    my $borrower = C4::Members::GetMember(borrowernumber => $borrowernumber);
1382
    my $itype;
1383
    my $dbh = C4::Context->dbh;
1384
    if (C4::Context->preference('item-level_itypes')) {
1385
	# We cant trust GetItem to honour the syspref, so safest to do it ourselves
1386
	# When GetItem is fixed, we can remove this
1387
	$itype = $item->{itype};
1388
    } 
1389
    else {
1390
	my $query = "SELECT itemtype FROM biblioitems WHERE biblioitemnumber = ? ";
1391
	my $sth = $dbh->prepare($query);	
1392
	$sth->execute($item->{biblioitemnumber});
1393
	if (my $data = $sth->fetchrow_hashref()){
1394
	    $itype = $data->{itemtype};
1395
	}
1396
    }
1397
1398
    my $query = "SELECT onshelfholds,categorycode,itemtype,branchcode FROM issuingrules WHERE
1399
          (issuingrules.categorycode = ? OR issuingrules.categorycode = '*')
1400
        AND
1401
          (issuingrules.itemtype = ? OR issuingrules.itemtype = '*')
1402
        AND
1403
          (issuingrules.branchcode = ? OR issuingrules.branchcode = '*')
1404
        ORDER BY
1405
          issuingrules.categorycode desc,
1406
          issuingrules.itemtype desc,
1407
          issuingrules.branchcode desc
1408
       LIMIT 1";
1409
    my $dbh = C4::Context->dbh;
1410
    my $sth = $dbh->prepare($query);
1411
    $sth->execute($borrower->{categorycode},$itype,$branchcode);
1412
    my $data = $sth->fetchrow_hashref;
1413
    if ($data->{onshelfholds}){
1414
	return 1;
1415
    }
1416
    else {
1417
	return 0;
1418
    }
1419
}
1420
1372
=head2 AlterPriority
1421
=head2 AlterPriority
1373
1422
1374
  AlterPriority( $where, $borrowernumber, $biblionumber, $reservedate );
1423
  AlterPriority( $where, $borrowernumber, $biblionumber, $reservedate );
(-)a/C4/VirtualShelves/Page.pm (-1 lines)
Lines 183-189 sub shelfpage ($$$$$) { Link Here
183
            # explicitly fetch this shelf
183
            # explicitly fetch this shelf
184
            my ($shelfnumber2,$shelfname,$owner,$category,$sorton) = GetShelf($shelfnumber);
184
            my ($shelfnumber2,$shelfname,$owner,$category,$sorton) = GetShelf($shelfnumber);
185
185
186
            $template->param( 'AllowOnShelfHolds' => C4::Context->preference('AllowOnShelfHolds') );
187
            if (C4::Context->preference('TagsEnabled')) {
186
            if (C4::Context->preference('TagsEnabled')) {
188
                $template->param(TagsEnabled => 1);
187
                $template->param(TagsEnabled => 1);
189
                    foreach (qw(TagsShowOnList TagsInputOnList)) {
188
                    foreach (qw(TagsShowOnList TagsInputOnList)) {
(-)a/admin/smart-rules.pl (-4 / +5 lines)
Lines 101-108 elsif ($op eq 'delete-branch-item') { Link Here
101
# save the values entered
101
# save the values entered
102
elsif ($op eq 'add') {
102
elsif ($op eq 'add') {
103
    my $sth_search = $dbh->prepare("SELECT COUNT(*) AS total FROM issuingrules WHERE branchcode=? AND categorycode=? AND itemtype=?");
103
    my $sth_search = $dbh->prepare("SELECT COUNT(*) AS total FROM issuingrules WHERE branchcode=? AND categorycode=? AND itemtype=?");
104
    my $sth_insert = $dbh->prepare("INSERT INTO issuingrules (branchcode, categorycode, itemtype, maxissueqty, renewalsallowed, reservesallowed, issuelength, hardduedate, hardduedatecompare, fine, finedays, firstremind, chargeperiod,rentaldiscount) VALUES(?,?,?,?,?,?,?,?,?,?,?,?,?,?)");
104
    my $sth_insert = $dbh->prepare("INSERT INTO issuingrules (branchcode, categorycode, itemtype, maxissueqty, renewalsallowed, reservesallowed, issuelength, hardduedate, hardduedatecompare, fine, finedays, firstremind, chargeperiod, rentaldiscount, onshelfholds) VALUES(?,?,?,?,?,?,?,?,?,?,?,?,?,?,?)");
105
    my $sth_update=$dbh->prepare("UPDATE issuingrules SET fine=?, finedays=?, firstremind=?, chargeperiod=?, maxissueqty=?, renewalsallowed=?, reservesallowed=?, issuelength=?, hardduedate=?, hardduedatecompare=?, rentaldiscount=?  WHERE branchcode=? AND categorycode=? AND itemtype=?");
105
    my $sth_update=$dbh->prepare("UPDATE issuingrules SET fine=?, finedays=?, firstremind=?, chargeperiod=?, maxissueqty=?, renewalsallowed=?, reservesallowed=?, issuelength=?, hardduedate=?, hardduedatecompare=?, rentaldiscount=?, onshelfholds=? WHERE branchcode=? AND categorycode=? AND itemtype=?");
106
    
106
    
107
    my $br = $branch; # branch
107
    my $br = $branch; # branch
108
    my $bor  = $input->param('categorycode'); # borrower category
108
    my $bor  = $input->param('categorycode'); # borrower category
Lines 114-119 elsif ($op eq 'add') { Link Here
114
    my $maxissueqty  = $input->param('maxissueqty');
114
    my $maxissueqty  = $input->param('maxissueqty');
115
    my $renewalsallowed  = $input->param('renewalsallowed');
115
    my $renewalsallowed  = $input->param('renewalsallowed');
116
    my $reservesallowed  = $input->param('reservesallowed');
116
    my $reservesallowed  = $input->param('reservesallowed');
117
    my $onshelfholds     = $input->param('onshelfholds');
117
    $maxissueqty =~ s/\s//g;
118
    $maxissueqty =~ s/\s//g;
118
    $maxissueqty = undef if $maxissueqty !~ /^\d+/;
119
    $maxissueqty = undef if $maxissueqty !~ /^\d+/;
119
    my $issuelength  = $input->param('issuelength');
120
    my $issuelength  = $input->param('issuelength');
Lines 126-134 elsif ($op eq 'add') { Link Here
126
    $sth_search->execute($br,$bor,$cat);
127
    $sth_search->execute($br,$bor,$cat);
127
    my $res = $sth_search->fetchrow_hashref();
128
    my $res = $sth_search->fetchrow_hashref();
128
    if ($res->{total}) {
129
    if ($res->{total}) {
129
        $sth_update->execute($fine, $finedays,$firstremind, $chargeperiod, $maxissueqty, $renewalsallowed,$reservesallowed, $issuelength,$hardduedate,$hardduedatecompare,$rentaldiscount, $br,$bor,$cat);
130
        $sth_update->execute($fine, $finedays,$firstremind, $chargeperiod, $maxissueqty, $renewalsallowed,$reservesallowed, $issuelength,$hardduedate,$hardduedatecompare,$rentaldiscount, $onshelfholds, $br,$bor,$cat);
130
    } else {
131
    } else {
131
        $sth_insert->execute($br,$bor,$cat,$maxissueqty,$renewalsallowed,$reservesallowed,$issuelength,$hardduedate,$hardduedatecompare,$fine,$finedays,$firstremind,$chargeperiod,$rentaldiscount);
132
        $sth_insert->execute($br,$bor,$cat,$maxissueqty,$renewalsallowed,$reservesallowed,$issuelength,$hardduedate,$hardduedatecompare,$fine,$finedays,$firstremind,$chargeperiod,$rentaldiscount,$onshelfholds);
132
    }
133
    }
133
} 
134
} 
134
elsif ($op eq "set-branch-defaults") {
135
elsif ($op eq "set-branch-defaults") {
(-)a/admin/systempreferences.pl (-1 lines)
Lines 185-191 $tabsysprefs{HomeOrHoldingBranch} = "Circulation"; Link Here
185
$tabsysprefs{HomeOrHoldingBranchReturn}      = "Circulation";
185
$tabsysprefs{HomeOrHoldingBranchReturn}      = "Circulation";
186
$tabsysprefs{RandomizeHoldsQueueWeight}      = "Circulation";
186
$tabsysprefs{RandomizeHoldsQueueWeight}      = "Circulation";
187
$tabsysprefs{StaticHoldsQueueWeight}         = "Circulation";
187
$tabsysprefs{StaticHoldsQueueWeight}         = "Circulation";
188
$tabsysprefs{AllowOnShelfHolds}              = "Circulation";
189
$tabsysprefs{AllowHoldsOnDamagedItems}       = "Circulation";
188
$tabsysprefs{AllowHoldsOnDamagedItems}       = "Circulation";
190
$tabsysprefs{UseBranchTransferLimits}        = "Circulation";
189
$tabsysprefs{UseBranchTransferLimits}        = "Circulation";
191
$tabsysprefs{AllowHoldPolicyOverride}        = "Circulation";
190
$tabsysprefs{AllowHoldPolicyOverride}        = "Circulation";
(-)a/installer/data/mysql/de-DE/mandatory/sysprefs.sql (-1 lines)
Lines 217-223 INSERT INTO `systempreferences` (variable,value,options,explanation,type) VALUES Link Here
217
('XSLTDetailsDisplay','0','','Enable XSL stylesheet control over details page display on intranet','YesNo'),
217
('XSLTDetailsDisplay','0','','Enable XSL stylesheet control over details page display on intranet','YesNo'),
218
('XSLTResultsDisplay','0','','Enable XSL stylesheet control over results page display on intranet','YesNo');
218
('XSLTResultsDisplay','0','','Enable XSL stylesheet control over results page display on intranet','YesNo');
219
INSERT INTO `systempreferences` (variable,value,options,explanation,type) VALUES('AdvancedSearchTypes','itemtypes','itemtypes|ccode','Select which set of fields comprise the Type limit in the advanced search','Choice');
219
INSERT INTO `systempreferences` (variable,value,options,explanation,type) VALUES('AdvancedSearchTypes','itemtypes','itemtypes|ccode','Select which set of fields comprise the Type limit in the advanced search','Choice');
220
INSERT INTO `systempreferences` (variable,value,options,explanation,type) VALUES('AllowOnShelfHolds', '0', '', 'Allow hold requests to be placed on items that are not on loan', 'YesNo');
221
INSERT INTO `systempreferences` (variable,value,options,explanation,type) VALUES('AllowHoldsOnDamagedItems', '1', '', 'Allow hold requests to be placed on damaged items', 'YesNo');
220
INSERT INTO `systempreferences` (variable,value,options,explanation,type) VALUES('AllowHoldsOnDamagedItems', '1', '', 'Allow hold requests to be placed on damaged items', 'YesNo');
222
INSERT INTO `systempreferences` (variable,value,options,explanation,type) VALUES('OpacSuppression', '0', '', 'Turn ON the OPAC Suppression feature, requires further setup, ask your system administrator for details', 'YesNo');
221
INSERT INTO `systempreferences` (variable,value,options,explanation,type) VALUES('OpacSuppression', '0', '', 'Turn ON the OPAC Suppression feature, requires further setup, ask your system administrator for details', 'YesNo');
223
-- FIXME: add FrameworksLoaded, noOPACUserLogin?
222
-- FIXME: add FrameworksLoaded, noOPACUserLogin?
(-)a/installer/data/mysql/en/mandatory/sysprefs.sql (-1 lines)
Lines 219-225 INSERT INTO `systempreferences` (variable,value,options,explanation,type) VALUES Link Here
219
('XSLTDetailsDisplay','0','','Enable XSL stylesheet control over details page display on intranet','YesNo'),
219
('XSLTDetailsDisplay','0','','Enable XSL stylesheet control over details page display on intranet','YesNo'),
220
('XSLTResultsDisplay','0','','Enable XSL stylesheet control over results page display on intranet','YesNo');
220
('XSLTResultsDisplay','0','','Enable XSL stylesheet control over results page display on intranet','YesNo');
221
INSERT INTO `systempreferences` (variable,value,options,explanation,type) VALUES('AdvancedSearchTypes','itemtypes','itemtypes|ccode','Select which set of fields comprise the Type limit in the advanced search','Choice');
221
INSERT INTO `systempreferences` (variable,value,options,explanation,type) VALUES('AdvancedSearchTypes','itemtypes','itemtypes|ccode','Select which set of fields comprise the Type limit in the advanced search','Choice');
222
INSERT INTO `systempreferences` (variable,value,options,explanation,type) VALUES('AllowOnShelfHolds', '0', '', 'Allow hold requests to be placed on items that are not on loan', 'YesNo');
223
INSERT INTO `systempreferences` (variable,value,options,explanation,type) VALUES('AllowHoldsOnDamagedItems', '1', '', 'Allow hold requests to be placed on damaged items', 'YesNo');
222
INSERT INTO `systempreferences` (variable,value,options,explanation,type) VALUES('AllowHoldsOnDamagedItems', '1', '', 'Allow hold requests to be placed on damaged items', 'YesNo');
224
INSERT INTO `systempreferences` (variable,value,options,explanation,type) VALUES('OpacSuppression', '0', '', 'Turn ON the OPAC Suppression feature, requires further setup, ask your system administrator for details', 'YesNo');
223
INSERT INTO `systempreferences` (variable,value,options,explanation,type) VALUES('OpacSuppression', '0', '', 'Turn ON the OPAC Suppression feature, requires further setup, ask your system administrator for details', 'YesNo');
225
-- FIXME: add FrameworksLoaded, noOPACUserLogin?
224
-- FIXME: add FrameworksLoaded, noOPACUserLogin?
(-)a/installer/data/mysql/fr-FR/1-Obligatoire/unimarc_standard_systemprefs.sql (-1 lines)
Lines 214-220 INSERT INTO `systempreferences` (variable,value,options,explanation,type) VALUES Link Here
214
INSERT INTO `systempreferences` (variable,value,options,explanation,type) VALUES('XSLTDetailsDisplay','0','','Activer la feuille XSL pour l''affichage des notices détaillées dans la partie pro','YesNo');
214
INSERT INTO `systempreferences` (variable,value,options,explanation,type) VALUES('XSLTDetailsDisplay','0','','Activer la feuille XSL pour l''affichage des notices détaillées dans la partie pro','YesNo');
215
INSERT INTO `systempreferences` (variable,value,options,explanation,type) VALUES('XSLTResultsDisplay','0','','Activer la feuille XSL pour l''affichage des listes de résultat dans la partie pro','YesNo');
215
INSERT INTO `systempreferences` (variable,value,options,explanation,type) VALUES('XSLTResultsDisplay','0','','Activer la feuille XSL pour l''affichage des listes de résultat dans la partie pro','YesNo');
216
INSERT INTO `systempreferences` (variable,value,options,explanation,type) VALUES('AdvancedSearchTypes','itemtypes','itemtypes|ccode','Définit quel champ est utilisé pour la limitation par type de document dans la recherche avancée','Choice');
216
INSERT INTO `systempreferences` (variable,value,options,explanation,type) VALUES('AdvancedSearchTypes','itemtypes','itemtypes|ccode','Définit quel champ est utilisé pour la limitation par type de document dans la recherche avancée','Choice');
217
INSERT INTO `systempreferences` (variable,value,options,explanation,type) VALUES('AllowOnShelfHolds', '0', '', 'Autorise les réservations de documents en rayon.', 'YesNo');
218
INSERT INTO `systempreferences` (variable,value,options,explanation,type) VALUES('AllowHoldsOnDamagedItems', '1', '', 'Autorise les réservations de documents déclarés endommagés', 'YesNo');
217
INSERT INTO `systempreferences` (variable,value,options,explanation,type) VALUES('AllowHoldsOnDamagedItems', '1', '', 'Autorise les réservations de documents déclarés endommagés', 'YesNo');
219
INSERT INTO `systempreferences` (variable,value,options,explanation,type) VALUES('OpacSuppression', '0', '', 'Active la fonction de suppression à l''OPAC. Elle demande plus de paramétrage, demandez à votre administrateur', 'YesNo');
218
INSERT INTO `systempreferences` (variable,value,options,explanation,type) VALUES('OpacSuppression', '0', '', 'Active la fonction de suppression à l''OPAC. Elle demande plus de paramétrage, demandez à votre administrateur', 'YesNo');
220
INSERT INTO `systempreferences` (variable,value,options,explanation,type) VALUES ('SMSSendDriver','','','Détermine le pilote utilisé par SMS::Send pour envoyer des SMS.','free');
219
INSERT INTO `systempreferences` (variable,value,options,explanation,type) VALUES ('SMSSendDriver','','','Détermine le pilote utilisé par SMS::Send pour envoyer des SMS.','free');
(-)a/installer/data/mysql/it-IT/necessari/sysprefs.sql (-1 lines)
Lines 9-15 insert into `systempreferences` (`variable`, `value`, `options`, `explanation`, Link Here
9
insert into `systempreferences` (`variable`, `value`, `options`, `explanation`, `type`) values('advancedMARCeditor','0','','Se su ON, nel MARC editor non verranno visualizzati i campi/sottocampi delle descrizioni.','YesNo');
9
insert into `systempreferences` (`variable`, `value`, `options`, `explanation`, `type`) values('advancedMARCeditor','0','','Se su ON, nel MARC editor non verranno visualizzati i campi/sottocampi delle descrizioni.','YesNo');
10
insert into `systempreferences` (`variable`, `value`, `options`, `explanation`, `type`) values('AdvancedSearchTypes','itemtypes','itemtypes|ccode','Selezionare quale set di campi comprenderà la ricerca avanzata per tipo.','Choice');
10
insert into `systempreferences` (`variable`, `value`, `options`, `explanation`, `type`) values('AdvancedSearchTypes','itemtypes','itemtypes|ccode','Selezionare quale set di campi comprenderà la ricerca avanzata per tipo.','Choice');
11
insert into `systempreferences` (`variable`, `value`, `options`, `explanation`, `type`) values('AllowHoldsOnDamagedItems','1','','Permette l\'inserimento di richieste di prenotazione su copie danneggiate','YesNo');
11
insert into `systempreferences` (`variable`, `value`, `options`, `explanation`, `type`) values('AllowHoldsOnDamagedItems','1','','Permette l\'inserimento di richieste di prenotazione su copie danneggiate','YesNo');
12
insert into `systempreferences` (`variable`, `value`, `options`, `explanation`, `type`) values('AllowOnShelfHolds','1','','Permette di inserire prenotazioni su documenti non in prestito.','YesNo');
13
insert into `systempreferences` (`variable`, `value`, `options`, `explanation`, `type`) values('AllowRenewalLimitOverride','1','','Se On, permette che i limiti ai rinnovi possano essere superati dal bibliotecario nel modulo della circolazione','YesNo');
12
insert into `systempreferences` (`variable`, `value`, `options`, `explanation`, `type`) values('AllowRenewalLimitOverride','1','','Se On, permette che i limiti ai rinnovi possano essere superati dal bibliotecario nel modulo della circolazione','YesNo');
14
insert into `systempreferences` (`variable`, `value`, `options`, `explanation`, `type`) values('AmazonAssocTag','','','See:  http://aws.amazon.com','free');
13
insert into `systempreferences` (`variable`, `value`, `options`, `explanation`, `type`) values('AmazonAssocTag','','','See:  http://aws.amazon.com','free');
15
insert into `systempreferences` (`variable`, `value`, `options`, `explanation`, `type`) values('AmazonCoverImages','0','','Se ON, visualizza nell’interfaccia del bibliotecario l’immagine della copertina presa dal Web Service di Amazon','YesNo');
14
insert into `systempreferences` (`variable`, `value`, `options`, `explanation`, `type`) values('AmazonCoverImages','0','','Se ON, visualizza nell’interfaccia del bibliotecario l’immagine della copertina presa dal Web Service di Amazon','YesNo');
(-)a/installer/data/mysql/nb-NO/1-Obligatorisk/sysprefs.sql (-1 lines)
Lines 235-241 INSERT INTO `systempreferences` (variable,value,options,explanation,type) VALUES Link Here
235
('XSLTDetailsDisplay','0','','Enable XSL stylesheet control over details page display on intranet','YesNo'),
235
('XSLTDetailsDisplay','0','','Enable XSL stylesheet control over details page display on intranet','YesNo'),
236
('XSLTResultsDisplay','0','','Enable XSL stylesheet control over results page display on intranet','YesNo');
236
('XSLTResultsDisplay','0','','Enable XSL stylesheet control over results page display on intranet','YesNo');
237
INSERT INTO `systempreferences` (variable,value,options,explanation,type) VALUES('AdvancedSearchTypes','itemtypes','itemtypes|ccode','Select which set of fields comprise the Type limit in the advanced search','Choice');
237
INSERT INTO `systempreferences` (variable,value,options,explanation,type) VALUES('AdvancedSearchTypes','itemtypes','itemtypes|ccode','Select which set of fields comprise the Type limit in the advanced search','Choice');
238
INSERT INTO `systempreferences` (variable,value,options,explanation,type) VALUES('AllowOnShelfHolds', '0', '', 'Allow hold requests to be placed on items that are not on loan', 'YesNo');
239
INSERT INTO `systempreferences` (variable,value,options,explanation,type) VALUES('AllowHoldsOnDamagedItems', '1', '', 'Allow hold requests to be placed on damaged items', 'YesNo');
238
INSERT INTO `systempreferences` (variable,value,options,explanation,type) VALUES('AllowHoldsOnDamagedItems', '1', '', 'Allow hold requests to be placed on damaged items', 'YesNo');
240
INSERT INTO `systempreferences` (variable,value,options,explanation,type) VALUES('OpacSuppression', '0', '', 'Turn ON the OPAC Suppression feature, requires further setup, ask your system administrator for details', 'YesNo');
239
INSERT INTO `systempreferences` (variable,value,options,explanation,type) VALUES('OpacSuppression', '0', '', 'Turn ON the OPAC Suppression feature, requires further setup, ask your system administrator for details', 'YesNo');
241
-- FIXME: add FrameworksLoaded, noOPACUserLogin?
240
-- FIXME: add FrameworksLoaded, noOPACUserLogin?
(-)a/installer/data/mysql/pl-PL/mandatory/sysprefs.sql (-1 lines)
Lines 214-220 INSERT INTO `systempreferences` (variable,value,options,explanation,type) VALUES Link Here
214
('XSLTDetailsDisplay','0','','Enable XSL stylesheet control over details page display on OPAC WARNING: MARC21 Only','YesNo'),
214
('XSLTDetailsDisplay','0','','Enable XSL stylesheet control over details page display on OPAC WARNING: MARC21 Only','YesNo'),
215
('XSLTResultsDisplay','0','','Enable XSL stylesheet control over results page display on OPAC WARNING: MARC21 Only','YesNo');
215
('XSLTResultsDisplay','0','','Enable XSL stylesheet control over results page display on OPAC WARNING: MARC21 Only','YesNo');
216
INSERT INTO `systempreferences` (variable,value,options,explanation,type) VALUES('AdvancedSearchTypes','itemtypes','itemtypes|ccode','Select which set of fields comprise the Type limit in the advanced search','Choice');
216
INSERT INTO `systempreferences` (variable,value,options,explanation,type) VALUES('AdvancedSearchTypes','itemtypes','itemtypes|ccode','Select which set of fields comprise the Type limit in the advanced search','Choice');
217
INSERT INTO `systempreferences` (variable,value,options,explanation,type) VALUES('AllowOnShelfHolds', '0', '', 'Allow hold requests to be placed on items that are not on loan', 'YesNo');
218
INSERT INTO `systempreferences` (variable,value,options,explanation,type) VALUES('AllowHoldsOnDamagedItems', '1', '', 'Allow hold requests to be placed on damaged items', 'YesNo');
217
INSERT INTO `systempreferences` (variable,value,options,explanation,type) VALUES('AllowHoldsOnDamagedItems', '1', '', 'Allow hold requests to be placed on damaged items', 'YesNo');
219
INSERT INTO `systempreferences` (variable,value,options,explanation,type) VALUES('OpacSuppression', '0', '', 'Turn ON the OPAC Suppression feature, requires further setup, ask your system administrator for details', 'YesNo');
218
INSERT INTO `systempreferences` (variable,value,options,explanation,type) VALUES('OpacSuppression', '0', '', 'Turn ON the OPAC Suppression feature, requires further setup, ask your system administrator for details', 'YesNo');
220
-- FIXME: add FrameworksLoaded, noOPACUserLogin?
219
-- FIXME: add FrameworksLoaded, noOPACUserLogin?
(-)a/installer/data/mysql/ru-RU/mandatory/system_preferences_full_optimal_for_install_only.sql (-1 lines)
Lines 241-247 INSERT INTO `systempreferences` (variable,value,options,explanation,type) VALUES Link Here
241
('XSLTDetailsDisplay','0','','Enable XSL stylesheet control over details page display on OPAC exemple : ../koha-tmpl/opac-tmpl/prog/en/xslt/MARC21slim2OPACDetail.xsl','Textarea'),
241
('XSLTDetailsDisplay','0','','Enable XSL stylesheet control over details page display on OPAC exemple : ../koha-tmpl/opac-tmpl/prog/en/xslt/MARC21slim2OPACDetail.xsl','Textarea'),
242
('XSLTResultsDisplay','0','','Enable XSL stylesheet control over results page display on OPAC exemple : ../koha-tmpl/opac-tmpl/prog/en/xslt/MARC21slim2OPACResults.xsl','Textarea');
242
('XSLTResultsDisplay','0','','Enable XSL stylesheet control over results page display on OPAC exemple : ../koha-tmpl/opac-tmpl/prog/en/xslt/MARC21slim2OPACResults.xsl','Textarea');
243
INSERT INTO `systempreferences` (variable,value,options,explanation,type) VALUES('AdvancedSearchTypes','itemtypes','itemtypes|ccode','Select which set of fields comprise the Type limit in the advanced search','Choice');
243
INSERT INTO `systempreferences` (variable,value,options,explanation,type) VALUES('AdvancedSearchTypes','itemtypes','itemtypes|ccode','Select which set of fields comprise the Type limit in the advanced search','Choice');
244
INSERT INTO `systempreferences` (variable,value,options,explanation,type) VALUES('AllowOnShelfHolds', '0', '', 'Allow hold requests to be placed on items that are not on loan', 'YesNo');
245
INSERT INTO `systempreferences` (variable,value,options,explanation,type) VALUES('AllowHoldsOnDamagedItems', '1', '', 'Allow hold requests to be placed on damaged items', 'YesNo');
244
INSERT INTO `systempreferences` (variable,value,options,explanation,type) VALUES('AllowHoldsOnDamagedItems', '1', '', 'Allow hold requests to be placed on damaged items', 'YesNo');
246
INSERT INTO `systempreferences` (variable,value,options,explanation,type) VALUES('OpacSuppression', '0', '', 'Turn ON the OPAC Suppression feature, requires further setup, ask your system administrator for details', 'YesNo');
245
INSERT INTO `systempreferences` (variable,value,options,explanation,type) VALUES('OpacSuppression', '0', '', 'Turn ON the OPAC Suppression feature, requires further setup, ask your system administrator for details', 'YesNo');
247
-- FIXME: add FrameworksLoaded, noOPACUserLogin?
246
-- FIXME: add FrameworksLoaded, noOPACUserLogin?
(-)a/installer/data/mysql/uk-UA/mandatory/system_preferences_full_optimal_for_install_only.sql (-1 lines)
Lines 266-272 INSERT INTO `systempreferences` (variable,value,options,explanation,type) VALUES Link Here
266
('XSLTDetailsDisplay','0','','Enable XSL stylesheet control over details page display on OPAC exemple : ../koha-tmpl/opac-tmpl/prog/en/xslt/MARC21slim2OPACDetail.xsl','Textarea'),
266
('XSLTDetailsDisplay','0','','Enable XSL stylesheet control over details page display on OPAC exemple : ../koha-tmpl/opac-tmpl/prog/en/xslt/MARC21slim2OPACDetail.xsl','Textarea'),
267
('XSLTResultsDisplay','0','','Enable XSL stylesheet control over results page display on OPAC exemple : ../koha-tmpl/opac-tmpl/prog/en/xslt/MARC21slim2OPACResults.xsl','Textarea');
267
('XSLTResultsDisplay','0','','Enable XSL stylesheet control over results page display on OPAC exemple : ../koha-tmpl/opac-tmpl/prog/en/xslt/MARC21slim2OPACResults.xsl','Textarea');
268
INSERT INTO `systempreferences` (variable,value,options,explanation,type) VALUES('AdvancedSearchTypes','itemtypes','itemtypes|ccode','Select which set of fields comprise the Type limit in the advanced search','Choice');
268
INSERT INTO `systempreferences` (variable,value,options,explanation,type) VALUES('AdvancedSearchTypes','itemtypes','itemtypes|ccode','Select which set of fields comprise the Type limit in the advanced search','Choice');
269
INSERT INTO `systempreferences` (variable,value,options,explanation,type) VALUES('AllowOnShelfHolds', '0', '', 'Allow hold requests to be placed on items that are not on loan', 'YesNo');
270
INSERT INTO `systempreferences` (variable,value,options,explanation,type) VALUES('AllowHoldsOnDamagedItems', '1', '', 'Allow hold requests to be placed on damaged items', 'YesNo');
269
INSERT INTO `systempreferences` (variable,value,options,explanation,type) VALUES('AllowHoldsOnDamagedItems', '1', '', 'Allow hold requests to be placed on damaged items', 'YesNo');
271
INSERT INTO `systempreferences` (variable,value,options,explanation,type) VALUES('OpacSuppression', '0', '', 'Turn ON the OPAC Suppression feature, requires further setup, ask your system administrator for details', 'YesNo');
270
INSERT INTO `systempreferences` (variable,value,options,explanation,type) VALUES('OpacSuppression', '0', '', 'Turn ON the OPAC Suppression feature, requires further setup, ask your system administrator for details', 'YesNo');
272
-- FIXME: add FrameworksLoaded, noOPACUserLogin?
271
-- FIXME: add FrameworksLoaded, noOPACUserLogin?
(-)a/installer/data/mysql/updatedatabase.pl (+16 lines)
Lines 4370-4375 if (C4::Context->preference("Version") < TransformToNum($DBversion)) { Link Here
4370
    SetVersion($DBversion);
4370
    SetVersion($DBversion);
4371
}
4371
}
4372
4372
4373
$DBversion = '3.05.00.XXX';
4374
if (C4::Context->preference("Version") < TransformToNum($DBversion)) {
4375
    print "Upgrade to $DBversion done (Bug 5786 move AllowOnShelfHolds to circulation matrix)\n";
4376
    # First create the column
4377
    $dbh->do("ALTER TABLE issuingrules ADD onshelfholds BOOLEAN");
4378
    # Now update the column    
4379
    if (C4::Context->preference("AllowOnShelfHolds")){
4380
	# Pref is on, set allow for all rules
4381
	$dbh->do("UPDATE issuingrules SET onshelfholds=1");
4382
    }
4383
    # If the preference is not set, leave off
4384
    # Remove from the systempreferences table
4385
    $dbh->do("DELETE FROM systempreferences WHERE variable = 'AllowOnShelfHolds'");	
4386
    SetVersion ($DBversion);
4387
}
4388
4373
=head1 FUNCTIONS
4389
=head1 FUNCTIONS
4374
4390
4375
=head2 DropAllForeignKeys($table)
4391
=head2 DropAllForeignKeys($table)
(-)a/installer/html-template-to-template-toolkit.pl (-1 / +1 lines)
Lines 32-38 my @globals = ("themelang","JacketImages","OPACAmazonCoverImages","GoogleJackets Link Here
32
"SyndeticsEnabled", "OpacRenewalAllowed", "item_level_itypes","noItemTypeImages",
32
"SyndeticsEnabled", "OpacRenewalAllowed", "item_level_itypes","noItemTypeImages",
33
"virtualshelves", "RequestOnOpac", "COinSinOPACResults", "OPACXSLTResultsDisplay",
33
"virtualshelves", "RequestOnOpac", "COinSinOPACResults", "OPACXSLTResultsDisplay",
34
"OPACItemsResultsDisplay", "LibraryThingForLibrariesID", "opacuserlogin", "TagsEnabled",
34
"OPACItemsResultsDisplay", "LibraryThingForLibrariesID", "opacuserlogin", "TagsEnabled",
35
"TagsShowOnList", "TagsInputOnList","loggedinusername","AllowOnShelfHolds","opacbookbag",
35
"TagsShowOnList", "TagsInputOnList","loggedinusername","opacbookbag",
36
"OPACAmazonEnabled", "SyndeticsCoverImages","using_https");
36
"OPACAmazonEnabled", "SyndeticsCoverImages","using_https");
37
37
38
# Arguments:
38
# Arguments:
(-)a/koha-tmpl/intranet-tmpl/prog/en/modules/admin/preferences/circulation.pref (-6 lines)
Lines 229-240 Circulation: Link Here
229
                  no: "Don't allow"
229
                  no: "Don't allow"
230
            - hold requests to be placed on damaged items.
230
            - hold requests to be placed on damaged items.
231
        -
231
        -
232
            - pref: AllowOnShelfHolds
233
              choices:
234
                  yes: Allow
235
                  no: "Don't allow"
236
            - hold requests to be placed on items that are not checked out.
237
        -
238
            - pref: AllowHoldDateInFuture
232
            - pref: AllowHoldDateInFuture
239
              choices:
233
              choices:
240
                  yes: Allow
234
                  yes: Allow
(-)a/koha-tmpl/intranet-tmpl/prog/en/modules/admin/preferences/opac.pref (-6 lines)
Lines 295-306 OPAC: Link Here
295
#              choices:
295
#              choices:
296
#            - If ON, enables subject cloud on OPAC
296
#            - If ON, enables subject cloud on OPAC
297
        -
297
        -
298
            - pref: OPACItemHolds
299
              choices:
300
                  yes: Allow
301
                  no: "Don't allow"
302
            - 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.
303
        -
304
            - pref: OpacRenewalAllowed
298
            - pref: OpacRenewalAllowed
305
              choices:
299
              choices:
306
                  yes: Allow
300
                  yes: Allow
(-)a/koha-tmpl/intranet-tmpl/prog/en/modules/admin/smart-rules.tt (-8 / +17 lines)
Lines 80-86 for="tobranch"><strong>Clone these rules to:</strong></label> <input type="hidde Link Here
80
                <th>Suspension in Days (day)</th>
80
                <th>Suspension in Days (day)</th>
81
                <th>Renewals Allowed (count)</th>
81
                <th>Renewals Allowed (count)</th>
82
                <th>Holds Allowed (count)</th>
82
                <th>Holds Allowed (count)</th>
83
		        <th>Rental Discount (%)</th>
83
		<th>On Shelf Holds Allowed</th>
84
		<th>Rental Discount (%)</th>
84
				<th>&nbsp;</th>
85
				<th>&nbsp;</th>
85
            </tr>
86
            </tr>
86
				[% FOREACH rule IN rules %]
87
				[% FOREACH rule IN rules %]
Lines 108-126 for="tobranch"><strong>Clone these rules to:</strong></label> <input type="hidde Link Here
108
								[% END %]
109
								[% END %]
109
							</td>
110
							</td>
110
							<td>[% rule.issuelength %]</td>
111
							<td>[% rule.issuelength %]</td>
111
                                                        <td>[% IF ( rule.hardduedate ) %]
112
                            <td>[% IF ( rule.hardduedate ) %]
112
                                                               [% IF ( rule.hardduedatebefore ) %]before [% rule.hardduedate %]</td>
113
                                    [% IF ( rule.hardduedatebefore ) %]
113
                                                               [% ELSE %][% IF ( rule.hardduedateexact ) %]on [% rule.hardduedate %]</td>
114
                                        before
114
                                                                                 [% ELSE %][% IF ( rule.hardduedateafter ) %]after [% rule.hardduedate %]</td>[% END %]
115
                                    [% ELSIF ( rule.hardduedateexact ) %]
115
                                                                                 [% END %]
116
                                        on
116
                                                               [% END %]
117
                                    [% ELSIF ( rule.hardduedateafter ) %]
117
                                                            [% ELSE %]None defined[% END %]   
118
                                        after
119
                                    [% END %]
120
                                    [% rule.hardduedate %]
121
                                [% ELSE %]
122
                                    None defined
123
                                [% END %]   
124
                            </td>
118
							<td>[% rule.fine %]</td>
125
							<td>[% rule.fine %]</td>
119
							<td>[% rule.chargeperiod %]</td>
126
							<td>[% rule.chargeperiod %]</td>
120
							<td>[% rule.firstremind %]</td>
127
							<td>[% rule.firstremind %]</td>
121
							<td>[% rule.finedays %]</td>
128
							<td>[% rule.finedays %]</td>
122
							<td>[% rule.renewalsallowed %]</td>
129
							<td>[% rule.renewalsallowed %]</td>
123
							<td>[% rule.reservesallowed %]</td>
130
							<td>[% rule.reservesallowed %]</td>
131
							<td>[% IF rule.onshelfholds %]Yes[% ELSE %]No[% END %]</td>
124
							<td>[% rule.rentaldiscount %]</td>
132
							<td>[% rule.rentaldiscount %]</td>
125
							<td>
133
							<td>
126
								<a class="button" href="/cgi-bin/koha/admin/smart-rules.pl?op=delete&amp;itemtype=[% rule.itemtype %]&amp;categorycode=[% rule.categorycode %]&amp;branch=[% rule.current_branch %]">Delete</a>
134
								<a class="button" href="/cgi-bin/koha/admin/smart-rules.pl?op=delete&amp;itemtype=[% rule.itemtype %]&amp;categorycode=[% rule.categorycode %]&amp;branch=[% rule.current_branch %]">Delete</a>
Lines 175-180 for="tobranch"><strong>Clone these rules to:</strong></label> <input type="hidde Link Here
175
                    <td><input name="finedays" size="3" /> </td>
183
                    <td><input name="finedays" size="3" /> </td>
176
                    <td><input name="renewalsallowed" size="2" /></td>
184
                    <td><input name="renewalsallowed" size="2" /></td>
177
                    <td><input name="reservesallowed" size="2" /></td>
185
                    <td><input name="reservesallowed" size="2" /></td>
186
		    <td><input type="radio" name="onshelfholds" value="1">Yes <input type="radio" name="onshelfholds" value="0">No</td>
178
		    <td><input name="rentaldiscount" size="2" /></td>
187
		    <td><input name="rentaldiscount" size="2" /></td>
179
                    <td><input type="hidden" name="branch" value="[% current_branch %]"/><input type="submit" value="Add" class="submit" /></td>
188
                    <td><input type="hidden" name="branch" value="[% current_branch %]"/><input type="submit" value="Add" class="submit" /></td>
180
                </tr>
189
                </tr>
(-)a/koha-tmpl/intranet-tmpl/prog/en/modules/help/reserve/request.tt (-2 / +2 lines)
Lines 17-23 TIP: Note that in this case an error message appears notifying the circulation l Link Here
17
					<li>it is not marked not for loan AND,</li>
17
					<li>it is not marked not for loan AND,</li>
18
					<li>it is not withdrawn AND,</li>
18
					<li>it is not withdrawn AND,</li>
19
					<li>it is not damaged (unless the AllowHoldsOnDamagedItems system preference is ON), AND</li>
19
					<li>it is not damaged (unless the AllowHoldsOnDamagedItems system preference is ON), AND</li>
20
					<li>it is not on loan (unless the AllowOnShelfHolds system preference is ON)</li>
20
					<li>it is not on loan (unless the On Shelf Holds Allowed issue rule is ON)</li>
21
				</ul></li>
21
				</ul></li>
22
				<li>
22
				<li>
23
			    <span style="background-color: #ffe599">
23
			    <span style="background-color: #ffe599">
Lines 34-37 TIP: If independent branches is on and the canreservefromotherbranches system p Link Here
34
		<li>Hold priority can be altered by viewing the holds for the title</li>
34
		<li>Hold priority can be altered by viewing the holds for the title</li>
35
		<li>To view holds on a title, click the 'Holds' tab on the left</li>
35
		<li>To view holds on a title, click the 'Holds' tab on the left</li>
36
		<li>By changing the priority number a patron can be moved up or down on the list of holds</li>
36
		<li>By changing the priority number a patron can be moved up or down on the list of holds</li>
37
	</ul>[% INCLUDE 'help-bottom.inc' %]
37
	</ul>[% INCLUDE 'help-bottom.inc' %]
(-)a/koha-tmpl/opac-tmpl/prog/en/modules/opac-ISBDdetail.tt (-6 lines)
Lines 51-63 Link Here
51
[% UNLESS ( norequests ) %]
51
[% UNLESS ( norequests ) %]
52
        [% IF ( opacuserlogin ) %]
52
        [% IF ( opacuserlogin ) %]
53
		[% IF ( RequestOnOpac ) %]
53
		[% IF ( RequestOnOpac ) %]
54
			[% IF ( AllowOnShelfHolds ) %]
55
				<li><a class="reserve" href="/cgi-bin/koha/opac-reserve.pl?biblionumber=[% biblionumber %]">Place Hold</a></li>
54
				<li><a class="reserve" href="/cgi-bin/koha/opac-reserve.pl?biblionumber=[% biblionumber %]">Place Hold</a></li>
56
			[% ELSE %]
57
				[% IF ( ItemsIssued ) %]
58
					<li><a class="reserve" href="/cgi-bin/koha/opac-reserve.pl?biblionumber=[% biblionumber %]">Place Hold</a></li>
59
				[% END %]
60
			[% END %]
61
55
62
        	[% END %]
56
        	[% END %]
63
	[% END %]
57
	[% END %]
(-)a/koha-tmpl/opac-tmpl/prog/en/modules/opac-MARCdetail.tt (-6 lines)
Lines 206-218 $(document).ready(function(){ Link Here
206
[% UNLESS ( norequests ) %]
206
[% UNLESS ( norequests ) %]
207
        [% IF ( opacuserlogin ) %]
207
        [% IF ( opacuserlogin ) %]
208
        [% IF ( RequestOnOpac ) %]
208
        [% IF ( RequestOnOpac ) %]
209
            [% IF ( AllowOnShelfHolds ) %]
210
                <li><a class="reserve" href="/cgi-bin/koha/opac-reserve.pl?biblionumber=[% biblionumber %]">Place Hold</a></li>
209
                <li><a class="reserve" href="/cgi-bin/koha/opac-reserve.pl?biblionumber=[% biblionumber %]">Place Hold</a></li>
211
            [% ELSE %]
212
                [% IF ( ItemsIssued ) %]
213
                    <li><a class="reserve" href="/cgi-bin/koha/opac-reserve.pl?biblionumber=[% biblionumber %]">Place Hold</a></li>
214
                [% END %]
215
            [% END %]
216
210
217
            [% END %]
211
            [% END %]
218
    [% END %]
212
    [% END %]
(-)a/koha-tmpl/opac-tmpl/prog/en/modules/opac-detail.tt (-9 / +3 lines)
Lines 802-817 YAHOO.util.Event.onContentReady("furtherm", function () { Link Here
802
<ul id="action">
802
<ul id="action">
803
803
804
[% UNLESS ( norequests ) %]
804
[% UNLESS ( norequests ) %]
805
        [% IF ( opacuserlogin ) %]
805
    [% IF ( opacuserlogin ) %]
806
		[% IF ( RequestOnOpac ) %]
806
		[% IF ( RequestOnOpac ) %]
807
			[% IF ( AllowOnShelfHolds ) %]
807
            <li><a class="reserve" href="/cgi-bin/koha/opac-reserve.pl?biblionumber=[% biblionumber %]">Place Hold</a></li>
808
	            		<li><a class="reserve" href="/cgi-bin/koha/opac-reserve.pl?biblionumber=[% biblionumber %]">Place Hold</a></li>
808
       	[% END %]
809
			[% ELSE %]
810
				[% IF ( ItemsIssued ) %]
811
		            		<li><a class="reserve" href="/cgi-bin/koha/opac-reserve.pl?biblionumber=[% biblionumber %]">Place Hold</a></li>
812
				[% END %]
813
			[% END %]
814
        	[% END %]
815
	[% END %]
809
	[% END %]
816
[% END %]
810
[% END %]
817
        <li><a class="print" href="#" onclick="window.print();">Print</a></li>
811
        <li><a class="print" href="#" onclick="window.print();">Print</a></li>
(-)a/koha-tmpl/opac-tmpl/prog/en/modules/opac-results-grouped.tt (-6 lines)
Lines 260-272 function highlightOn() { Link Here
260
                                [% IF ( RequestOnOpac ) %]
260
                                [% IF ( RequestOnOpac ) %]
261
					[% UNLESS ( GROUP_RESULT.norequests ) %]
261
					[% UNLESS ( GROUP_RESULT.norequests ) %]
262
						[% IF ( opacuserlogin ) %]
262
						[% IF ( opacuserlogin ) %]
263
							[% IF ( AllowOnShelfHolds ) %]
264
								<a class="hold" href="/cgi-bin/koha/opac-reserve.pl?biblionumber=[% GROUP_RESULT.biblionumber %]">Place Hold</a><!-- add back when available 0 holds in queue-->
263
								<a class="hold" href="/cgi-bin/koha/opac-reserve.pl?biblionumber=[% GROUP_RESULT.biblionumber %]">Place Hold</a><!-- add back when available 0 holds in queue-->
265
							[% ELSE %]
266
								[% IF ( GROUP_RESULT.itemsissued ) %]
267
									<a class="hold" href="/cgi-bin/koha/opac-reserve.pl?biblionumber=[% GROUP_RESULT.biblionumber %]">Place Hold</a><!-- add back when available 0 holds in queue-->
268
								[% END %]
269
							[% END %]
270
						[% END %]
264
						[% END %]
271
					[% END %]
265
					[% END %]
272
				[% END %]
266
				[% END %]
(-)a/koha-tmpl/opac-tmpl/prog/en/modules/opac-results.tt (-7 / +1 lines)
Lines 509-521 $(document).ready(function(){ Link Here
509
                                [% IF ( RequestOnOpac ) %]
509
                                [% IF ( RequestOnOpac ) %]
510
					[% UNLESS ( SEARCH_RESULT.norequests ) %]
510
					[% UNLESS ( SEARCH_RESULT.norequests ) %]
511
						[% IF ( opacuserlogin ) %]
511
						[% IF ( opacuserlogin ) %]
512
							[% IF ( AllowOnShelfHolds ) %]
512
							<a class="hold" href="/cgi-bin/koha/opac-reserve.pl?biblionumber=[% SEARCH_RESULT.biblionumber %]">Place Hold</a><!-- add back when available 0 holds in queue-->
513
								<a class="hold" href="/cgi-bin/koha/opac-reserve.pl?biblionumber=[% SEARCH_RESULT.biblionumber %]">Place Hold</a><!-- add back when available 0 holds in queue-->
514
							[% ELSE %]
515
								[% IF ( SEARCH_RESULT.itemsissued ) %]
516
									<a class="hold" href="/cgi-bin/koha/opac-reserve.pl?biblionumber=[% SEARCH_RESULT.biblionumber %]">Place Hold</a><!-- add back when available 0 holds in queue-->
517
								[% END %]
518
							[% END %]
519
						[% END %]
513
						[% END %]
520
					[% END %]
514
					[% END %]
521
				[% END %]
515
				[% END %]
(-)a/koha-tmpl/opac-tmpl/prog/en/modules/opac-shelves.tt (-6 lines)
Lines 308-320 $(function() { Link Here
308
      [% IF ( RequestOnOpac ) %]
308
      [% IF ( RequestOnOpac ) %]
309
          [% UNLESS ( itemsloo.norequests ) %]
309
          [% UNLESS ( itemsloo.norequests ) %]
310
            [% IF ( opacuserlogin ) %]
310
            [% IF ( opacuserlogin ) %]
311
              [% IF ( AllowOnShelfHolds ) %]
312
                <a class="hold" href="/cgi-bin/koha/opac-reserve.pl?biblionumber=[% itemsloo.biblionumber %]">Place Hold</a><!-- add back when available 0 holds in queue-->
311
                <a class="hold" href="/cgi-bin/koha/opac-reserve.pl?biblionumber=[% itemsloo.biblionumber %]">Place Hold</a><!-- add back when available 0 holds in queue-->
313
              [% ELSE %]
314
                [% IF ( itemsloo.itemsissued ) %]
315
                  <a class="hold" href="/cgi-bin/koha/opac-reserve.pl?biblionumber=[% itemsloo.biblionumber %]">Place Hold</a><!-- add back when available 0 holds in queue-->
316
                [% END %]
317
              [% END %]
318
            [% END %]
312
            [% END %]
319
          [% END %]
313
          [% END %]
320
        [% END %]
314
        [% END %]
(-)a/opac/opac-ISBDdetail.pl (-2 lines)
Lines 69-75 my ( $template, $loggedinuser, $cookie ) = get_template_and_user( Link Here
69
69
70
my $biblionumber = $query->param('biblionumber');
70
my $biblionumber = $query->param('biblionumber');
71
71
72
$template->param( 'AllowOnShelfHolds' => C4::Context->preference('AllowOnShelfHolds') );
73
$template->param( 'ItemsIssued' => CountItemsIssued( $biblionumber ) );
72
$template->param( 'ItemsIssued' => CountItemsIssued( $biblionumber ) );
74
73
75
my $marcflavour      = C4::Context->preference("marcflavour");
74
my $marcflavour      = C4::Context->preference("marcflavour");
Lines 152-158 foreach ( @$reviews ) { Link Here
152
151
153
$template->param(
152
$template->param(
154
    RequestOnOpac       => C4::Context->preference("RequestOnOpac"),
153
    RequestOnOpac       => C4::Context->preference("RequestOnOpac"),
155
    AllowOnShelfHolds   => C4::Context->preference('AllowOnShelfHolds'),
156
    norequests   => $norequests,
154
    norequests   => $norequests,
157
    ISBD         => $res,
155
    ISBD         => $res,
158
    biblionumber => $biblionumber,
156
    biblionumber => $biblionumber,
(-)a/opac/opac-MARCdetail.pl (-1 lines)
Lines 81-87 $template->param( Link Here
81
    bibliotitle => $biblio->{title},
81
    bibliotitle => $biblio->{title},
82
);
82
);
83
83
84
$template->param( 'AllowOnShelfHolds' => C4::Context->preference('AllowOnShelfHolds') );
85
$template->param( 'ItemsIssued' => CountItemsIssued( $biblionumber ) );
84
$template->param( 'ItemsIssued' => CountItemsIssued( $biblionumber ) );
86
85
87
# adding the $RequestOnOpac param
86
# adding the $RequestOnOpac param
(-)a/opac/opac-detail.pl (-1 lines)
Lines 66-72 my ( $template, $borrowernumber, $cookie ) = get_template_and_user( Link Here
66
66
67
my $biblionumber = $query->param('biblionumber') || $query->param('bib');
67
my $biblionumber = $query->param('biblionumber') || $query->param('bib');
68
68
69
$template->param( 'AllowOnShelfHolds' => C4::Context->preference('AllowOnShelfHolds') );
70
$template->param( 'ItemsIssued' => CountItemsIssued( $biblionumber ) );
69
$template->param( 'ItemsIssued' => CountItemsIssued( $biblionumber ) );
71
70
72
my $record       = GetMarcBiblio($biblionumber);
71
my $record       = GetMarcBiblio($biblionumber);
(-)a/opac/opac-reserve.pl (-1 / +1 lines)
Lines 432-438 foreach my $biblioNum (@biblionumbers) { Link Here
432
            $policy_holdallowed = 0;
432
            $policy_holdallowed = 0;
433
        }
433
        }
434
434
435
        if (IsAvailableForItemLevelRequest($itemNum) and $policy_holdallowed and CanItemBeReserved($borrowernumber,$itemNum)) {
435
        if (IsAvailableForItemLevelRequest($itemNum,$borr->{'borrowernumber'},$itemInfo->{'homebranch'}) and $policy_holdallowed and CanItemBeReserved($borrowernumber,$itemNum)) {
436
            $itemLoopIter->{available} = 1;
436
            $itemLoopIter->{available} = 1;
437
            $numCopiesAvailable++;
437
            $numCopiesAvailable++;
438
        }
438
        }
(-)a/opac/opac-search.pl (-2 / +1 lines)
Lines 100-106 if (C4::Context->preference("marcflavour") eq "UNIMARC" ) { Link Here
100
elsif (C4::Context->preference("marcflavour") eq "MARC21" ) {
100
elsif (C4::Context->preference("marcflavour") eq "MARC21" ) {
101
    $template->param('usmarc' => 1);
101
    $template->param('usmarc' => 1);
102
}
102
}
103
$template->param( 'AllowOnShelfHolds' => C4::Context->preference('AllowOnShelfHolds') );
103
104
$template->param( 'OPACNoResultsFound' => C4::Context->preference('OPACNoResultsFound') );
104
$template->param( 'OPACNoResultsFound' => C4::Context->preference('OPACNoResultsFound') );
105
105
106
if (C4::Context->preference('BakerTaylorEnabled')) {
106
if (C4::Context->preference('BakerTaylorEnabled')) {
107
- 

Return to bug 5786