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

(-)a/installer/data/mysql/en/mandatory/userpermissions.sql (+2 lines)
Lines 2-7 INSERT INTO permissions (module_bit, code, description) VALUES Link Here
2
   ( 1, 'circulate_remaining_permissions', 'Remaining circulation permissions'),
2
   ( 1, 'circulate_remaining_permissions', 'Remaining circulation permissions'),
3
   ( 1, 'override_renewals', 'Override blocked renewals'),
3
   ( 1, 'override_renewals', 'Override blocked renewals'),
4
   ( 1, 'overdues_report', 'Execute overdue items report'),
4
   ( 1, 'overdues_report', 'Execute overdue items report'),
5
   ( 1, 'force_checkout', 'Force checkout if a limitation exists'),
6
   ( 1, 'lift_restriction', 'Lift restriction for restricted accounts'),
5
   ( 3, 'parameters_remaining_permissions', 'Remaining system parameters permissions'),
7
   ( 3, 'parameters_remaining_permissions', 'Remaining system parameters permissions'),
6
   ( 3, 'manage_circ_rules', 'manage circulation rules'),
8
   ( 3, 'manage_circ_rules', 'manage circulation rules'),
7
   ( 6, 'place_holds', 'Place holds for patrons'),
9
   ( 6, 'place_holds', 'Place holds for patrons'),
(-)a/installer/data/mysql/fr-FR/1-Obligatoire/userpermissions.sql (+2 lines)
Lines 2-7 INSERT INTO permissions (module_bit, code, description) VALUES Link Here
2
   ( 1, 'circulate_remaining_permissions', 'Fonctions de circulation restantes'),
2
   ( 1, 'circulate_remaining_permissions', 'Fonctions de circulation restantes'),
3
   ( 1, 'override_renewals', 'Outrepasser les limites de renouvellement'),
3
   ( 1, 'override_renewals', 'Outrepasser les limites de renouvellement'),
4
   ( 1, 'overdues_report', 'Executer le rapport de retards'),
4
   ( 1, 'overdues_report', 'Executer le rapport de retards'),
5
   ( 1, 'force_checkout', 'Forcer le prêt si une limitation existe'),
6
   ( 1, 'lift_restriction', 'Lever la suspenssion d\'un utilisateur suspendu'),
5
   ( 3, 'parameters_remaining_permissions', 'Paramètres du système restants'),
7
   ( 3, 'parameters_remaining_permissions', 'Paramètres du système restants'),
6
   ( 3, 'manage_circ_rules', 'Gestion des règles de circulation'),
8
   ( 3, 'manage_circ_rules', 'Gestion des règles de circulation'),
7
   ( 6, 'place_holds', 'Réserver pour des adhérents'),
9
   ( 6, 'place_holds', 'Réserver pour des adhérents'),
(-)a/installer/data/mysql/updatedatabase.pl (+29 lines)
Lines 7139-7144 if ( CheckVersion($DBversion) ) { Link Here
7139
    SetVersion ($DBversion);
7139
    SetVersion ($DBversion);
7140
}
7140
}
7141
7141
7142
7143
7144
$DBversion = "3.13.00.XXX";
7145
if ( CheckVersion($DBversion) ) {
7146
    $dbh->do(q{
7147
        INSERT INTO permissions (module_bit, code, description) VALUES ( 1, 'force_checkout', 'Force checkout if a limitation exists')
7148
    });
7149
    $dbh->do(q{
7150
        INSERT INTO permissions (module_bit, code, description) VALUES ( 1, 'lift_restriction', 'Lift restriction for restricted accounts')
7151
    });
7152
    $dbh->do(q{
7153
        INSERT INTO user_permissions (borrowernumber, module_bit, code)
7154
            SELECT user_permissions.borrowernumber, 1, 'force_checkout'
7155
            FROM user_permissions
7156
            LEFT JOIN borrowers USING(borrowernumber)
7157
            WHERE borrowers.flags & (1 << 1)
7158
    });
7159
    $dbh->do(q{
7160
        INSERT INTO user_permissions (borrowernumber, module_bit, code)
7161
            SELECT user_permissions.borrowernumber, 1, 'lift_restriction'
7162
            FROM user_permissions
7163
            LEFT JOIN borrowers USING(borrowernumber)
7164
            WHERE borrowers.flags & (1 << 1)
7165
    });
7166
7167
    print "Upgrade to $DBversion done (Bug 10863 - Add permission force_checkout and lift_restriction)\n";
7168
    SetVersion($DBversion);
7169
}
7170
7142
=head1 FUNCTIONS
7171
=head1 FUNCTIONS
7143
7172
7144
=head2 TableExists($table)
7173
=head2 TableExists($table)
(-)a/koha-tmpl/intranet-tmpl/prog/en/modules/circ/circulation.tt (-7 / +38 lines)
Lines 327-337 function validate1(date) { Link Here
327
<div class="yui-g">
327
<div class="yui-g">
328
328
329
<div id="circ_needsconfirmation" class="dialog alert">
329
<div id="circ_needsconfirmation" class="dialog alert">
330
<h3>Please confirm checkout</h3>
330
[% IF CAN_user_circulate_force_checkout %]
331
  <h3>Please confirm checkout</h3>
332
[% ELSE %]
333
  <h3>Cannot checkout</h3>
334
[% END %]
331
335
332
<ul>
336
<ul>
333
[%IF ( AGE_RESTRICTION ) %]
337
[%IF ( AGE_RESTRICTION ) %]
334
    <li>Age restriction [% AGE_RESTRICTION %]. Check out anyway?</li>
338
    <li>Age restriction [% AGE_RESTRICTION %].
339
      [% IF CAN_user_circulate_force_checkout %]
340
        Check out anyway?
341
      [% END %]
342
    </li>
335
[% END %]
343
[% END %]
336
344
337
[% IF ( DEBT ) %]
345
[% IF ( DEBT ) %]
Lines 351-357 function validate1(date) { Link Here
351
[% END %]
359
[% END %]
352
360
353
[% IF ( ISSUED_TO_ANOTHER ) %]
361
[% IF ( ISSUED_TO_ANOTHER ) %]
354
    <li>Item <i>[% getTitleMessageIteminfo %]</i> ([% getBarcodeMessageIteminfo %]) is checked out to <a href="/cgi-bin/koha/members/moremember.pl?borrowernumber=[% issued_borrowernumber %]">[% issued_firstname %] [% issued_surname %]</a> ([% issued_cardnumber %]). Check in and check out?</li>
362
    <li>Item <i>[% getTitleMessageIteminfo %]</i> ([% getBarcodeMessageIteminfo %]) is checked out to <a href="/cgi-bin/koha/members/moremember.pl?borrowernumber=[% issued_borrowernumber %]">[% issued_firstname %] [% issued_surname %]</a> ([% issued_cardnumber %]).
363
      [% IF CAN_user_circulate_force_checkout %]
364
        Check in and check out?
365
      [% END %]
366
    </li>
355
[% END %]
367
[% END %]
356
368
357
[% IF ( TOO_MANY ) %]
369
[% IF ( TOO_MANY ) %]
Lines 374-393 function validate1(date) { Link Here
374
        [% item_notforloan_lib = KohaAuthorisedValues.GetByCode( authvalcode_notforloan, item_notforloan, 0 ) %]
386
        [% item_notforloan_lib = KohaAuthorisedValues.GetByCode( authvalcode_notforloan, item_notforloan, 0 ) %]
375
        Item is normally not for loan [% IF (item_notforloan_lib) %]([% item_notforloan_lib %])[% END %].
387
        Item is normally not for loan [% IF (item_notforloan_lib) %]([% item_notforloan_lib %])[% END %].
376
    [% END %]
388
    [% END %]
389
      [% IF CAN_user_circulate_force_checkout %]
377
        Check out anyway?
390
        Check out anyway?
391
      [% END %]
378
    </li>
392
    </li>
379
[% END %]
393
[% END %]
380
394
381
[% IF ( USERBLOCKEDOVERDUE ) %]
395
[% IF ( USERBLOCKEDOVERDUE ) %]
382
    <li>Patron has [% USERBLOCKEDOVERDUE %] overdue item(s).  Check out anyway?</li>
396
    <li>Patron has [% USERBLOCKEDOVERDUE %] overdue item(s).
397
      [% IF CAN_user_circulate_force_checkout %]
398
       Check out anyway?
399
      [% END %]
400
    </li>
383
[% END %]
401
[% END %]
384
402
385
[% IF ( ITEM_LOST ) %]
403
[% IF ( ITEM_LOST ) %]
386
    <li>This item has been lost with a status of "[% ITEM_LOST %]". Check out anyway?</li>
404
    <li>This item has been lost with a status of "[% ITEM_LOST %]".
405
      [% IF CAN_user_circulate_force_checkout %]
406
        Check out anyway?
407
      [% END %]
408
    </li>
387
[% END %]
409
[% END %]
388
410
389
[% IF  HIGHHOLDS %]
411
[% IF  HIGHHOLDS %]
390
	<li>High demand item. Loan period shortened to [% HIGHHOLDS.duration %] days (due [% HIGHHOLDS.returndate %]). Check out anyway?</li>
412
	<li>High demand item. Loan period shortened to [% HIGHHOLDS.duration %] days (due [% HIGHHOLDS.returndate %]).
413
      [% IF CAN_user_circulate_force_checkout %]
414
        Check out anyway?
415
      [% END %]
416
    </li>
391
[% END %]
417
[% END %]
392
</ul>
418
</ul>
393
419
Lines 398-403 function validate1(date) { Link Here
398
	});
424
	});
399
	</script>
425
	</script>
400
[% END %]
426
[% END %]
427
428
[% IF CAN_user_circulate_force_checkout %]
401
<form method="post" action="/cgi-bin/koha/circ/circulation.pl" autocomplete="off">
429
<form method="post" action="/cgi-bin/koha/circ/circulation.pl" autocomplete="off">
402
430
403
[% IF ( RESERVED ) %]
431
[% IF ( RESERVED ) %]
Lines 447-452 function validate1(date) { Link Here
447
    <input type="submit" class="deny" value="No, Don't Check Out (N)" accesskey="n" />
475
    <input type="submit" class="deny" value="No, Don't Check Out (N)" accesskey="n" />
448
    [% END %]
476
    [% END %]
449
</form>
477
</form>
478
[% END %]
450
479
451
</div></div>
480
</div></div>
452
[% END %] <!-- NEEDSCONFIRMATION -->
481
[% END %] <!-- NEEDSCONFIRMATION -->
Lines 623-629 No patron matched <span class="ex">[% message %]</span> Link Here
623
652
624
	<div class="hint">Enter item barcode:</div>
653
	<div class="hint">Enter item barcode:</div>
625
654
626
    [% IF ( NEEDSCONFIRMATION ) %]
655
    [% IF NEEDSCONFIRMATION %]
627
	    <input type="text" name="barcode" id="barcode" class="barcode focus" size="14" disabled="disabled" />
656
	    <input type="text" name="barcode" id="barcode" class="barcode focus" size="14" disabled="disabled" />
628
    [% ELSE %]
657
    [% ELSE %]
629
	    <input type="text" name="barcode" id="barcode" class="barcode focus" size="14" />
658
	    <input type="text" name="barcode" id="barcode" class="barcode focus" size="14" />
Lines 700-711 No patron matched <span class="ex">[% message %]</span> Link Here
700
            [% IF ( userdebarred ) %]
729
            [% IF ( userdebarred ) %]
701
               <li class="blocker">
730
               <li class="blocker">
702
               <span class="circ-hlt"> Restricted:</span> Patron's account is restricted [% IF (userdebarreddate ) %] until [% userdebarreddate %] [% END %] [% IF (debarredcomment ) %] with the comment "[% debarredcomment %]"[% END %]
731
               <span class="circ-hlt"> Restricted:</span> Patron's account is restricted [% IF (userdebarreddate ) %] until [% userdebarreddate %] [% END %] [% IF (debarredcomment ) %] with the comment "[% debarredcomment %]"[% END %]
732
               [% IF CAN_user_circulate_lift_restriction %]
703
               <form class="inline compact" action="/cgi-bin/koha/members/setstatus.pl" method="post">
733
               <form class="inline compact" action="/cgi-bin/koha/members/setstatus.pl" method="post">
704
	                <input type="hidden" name="borrowernumber" value="[% borrowernumber %]" />
734
	                <input type="hidden" name="borrowernumber" value="[% borrowernumber %]" />
705
	                <input type="hidden" name="destination" value="circ" />
735
	                <input type="hidden" name="destination" value="circ" />
706
	                <input type="hidden" name="cardnumber" value="[% cardnumber %]" />
736
	                <input type="hidden" name="cardnumber" value="[% cardnumber %]" />
707
	                <input type="submit" value="Lift restriction" />
737
	                <input type="submit" value="Lift restriction" />
708
               </form>
738
               </form>
739
               [% END %]
709
			</li>[% END %]
740
			</li>[% END %]
710
741
711
        	[% IF ( odues ) %]<li>[% IF ( nonreturns ) %]<span class="circ-hlt">Overdues:</span> Patron has <span class="circ-hlt">ITEMS OVERDUE</span>. See highlighted items <a href="#checkouts">below</a>[% END %]</li>
742
        	[% IF ( odues ) %]<li>[% IF ( nonreturns ) %]<span class="circ-hlt">Overdues:</span> Patron has <span class="circ-hlt">ITEMS OVERDUE</span>. See highlighted items <a href="#checkouts">below</a>[% END %]</li>
(-)a/koha-tmpl/intranet-tmpl/prog/en/modules/members/memberentrygen.tt (-18 / +24 lines)
Lines 1160-1182 Link Here
1160
1160
1161
            </li>
1161
            </li>
1162
			[% END %]
1162
			[% END %]
1163
			<li>
1163
            <li>
1164
				<label for="yesdebarred" class="radio">Restricted: </label>
1164
                <label for="yesdebarred" class="radio">Restricted: </label>
1165
				[% IF ( debarred ) %]
1165
                [% IF CAN_user_circulate_lift_restriction %]
1166
				<label for="yesdebarred">Yes </label>
1166
                  [% IF ( debarred ) %]
1167
				<input type="radio" id="yesdebarred" name="debarred" value="1" checked="checked"/>
1167
                  <label for="yesdebarred">Yes </label>
1168
                <label for="nodebarred">No </label>
1168
                    <input type="radio" id="yesdebarred" name="debarred" value="1" checked="checked"/>
1169
                <input type="radio" id="nodebarred" name="debarred" value="0"/>
1169
                    <label for="nodebarred">No </label>
1170
				[% ELSE %]
1170
                    <input type="radio" id="nodebarred" name="debarred" value="0"/>
1171
				<label for="yesdebarred">Yes </label>
1171
                  [% ELSE %]
1172
				<input type="radio" id="yesdebarred" name="debarred" value="1" />
1172
                    <label for="yesdebarred">Yes </label>
1173
                <label for="nodebarred">No </label>
1173
                    <input type="radio" id="yesdebarred" name="debarred" value="1" />
1174
                <input type="radio" id="nodebarred" name="debarred" value="0" checked="checked"/>
1174
                    <label for="nodebarred">No </label>
1175
				[% END %]
1175
                    <input type="radio" id="nodebarred" name="debarred" value="0" checked="checked"/>
1176
1176
                  [% END %]
1177
                <span id="debarreduntil"><label for="datedebarred" class="inline">Until:</label>
1177
                  <span id="debarreduntil"><label for="datedebarred" class="inline">Until:</label>
1178
                <input type="text" name="datedebarred" id="datedebarred" class="debarred datepicker [% focusAction %]" value="[% datedebarred %]" />
1178
                  <input type="text" name="datedebarred" id="datedebarred" class="debarred datepicker [% focusAction %]" value="[% datedebarred %]" />
1179
                <span class="hint">(optional)</span> </span>
1179
                  <span class="hint">(optional)</span> </span>
1180
                [% ELSE %]
1181
                  [% IF ( debarred ) %]
1182
                    Yes, until [% datedebarred %]
1183
                  [% ELSE %]
1184
                    No
1185
                  [% END %]
1186
                [% END %]
1180
                </li>
1187
                </li>
1181
                <li>
1188
                <li>
1182
		        <label for="debarredcomment" class="radio">Comment:</label>
1189
		        <label for="debarredcomment" class="radio">Comment:</label>
1183
- 

Return to bug 10863