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 185-195 var MSG_EXPORT_SELECT_CHECKOUTS = _("You must select checkout(s) to export"); Link Here
185
<div class="yui-g">
185
<div class="yui-g">
186
186
187
<div id="circ_needsconfirmation" class="dialog alert">
187
<div id="circ_needsconfirmation" class="dialog alert">
188
<h3>Please confirm checkout</h3>
188
[% IF CAN_user_circulate_force_checkout %]
189
  <h3>Please confirm checkout</h3>
190
[% ELSE %]
191
  <h3>Cannot checkout</h3>
192
[% END %]
189
193
190
<ul>
194
<ul>
191
[%IF ( AGE_RESTRICTION ) %]
195
[%IF ( AGE_RESTRICTION ) %]
192
    <li>Age restriction [% AGE_RESTRICTION %]. Check out anyway?</li>
196
    <li>Age restriction [% AGE_RESTRICTION %].
197
      [% IF CAN_user_circulate_force_checkout %]
198
        Check out anyway?
199
      [% END %]
200
    </li>
193
[% END %]
201
[% END %]
194
202
195
[% IF ( DEBT ) %]
203
[% IF ( DEBT ) %]
Lines 209-215 var MSG_EXPORT_SELECT_CHECKOUTS = _("You must select checkout(s) to export"); Link Here
209
[% END %]
217
[% END %]
210
218
211
[% IF ( ISSUED_TO_ANOTHER ) %]
219
[% IF ( ISSUED_TO_ANOTHER ) %]
212
    <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>
220
    <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 %]).
221
      [% IF CAN_user_circulate_force_checkout %]
222
        Check in and check out?
223
      [% END %]
224
    </li>
213
[% END %]
225
[% END %]
214
226
215
[% IF ( TOO_MANY ) %]
227
[% IF ( TOO_MANY ) %]
Lines 232-251 var MSG_EXPORT_SELECT_CHECKOUTS = _("You must select checkout(s) to export"); Link Here
232
        [% item_notforloan_lib = KohaAuthorisedValues.GetByCode( authvalcode_notforloan, item_notforloan, 0 ) %]
244
        [% item_notforloan_lib = KohaAuthorisedValues.GetByCode( authvalcode_notforloan, item_notforloan, 0 ) %]
233
        Item is normally not for loan [% IF (item_notforloan_lib) %]([% item_notforloan_lib %])[% END %].
245
        Item is normally not for loan [% IF (item_notforloan_lib) %]([% item_notforloan_lib %])[% END %].
234
    [% END %]
246
    [% END %]
247
      [% IF CAN_user_circulate_force_checkout %]
235
        Check out anyway?
248
        Check out anyway?
249
      [% END %]
236
    </li>
250
    </li>
237
[% END %]
251
[% END %]
238
252
239
[% IF ( USERBLOCKEDOVERDUE ) %]
253
[% IF ( USERBLOCKEDOVERDUE ) %]
240
    <li>Patron has [% USERBLOCKEDOVERDUE %] overdue item(s).  Check out anyway?</li>
254
    <li>Patron has [% USERBLOCKEDOVERDUE %] overdue item(s).
255
      [% IF CAN_user_circulate_force_checkout %]
256
       Check out anyway?
257
      [% END %]
258
    </li>
241
[% END %]
259
[% END %]
242
260
243
[% IF ( ITEM_LOST ) %]
261
[% IF ( ITEM_LOST ) %]
244
    <li>This item has been lost with a status of "[% ITEM_LOST %]". Check out anyway?</li>
262
    <li>This item has been lost with a status of "[% ITEM_LOST %]".
263
      [% IF CAN_user_circulate_force_checkout %]
264
        Check out anyway?
265
      [% END %]
266
    </li>
245
[% END %]
267
[% END %]
246
268
247
[% IF  HIGHHOLDS %]
269
[% IF  HIGHHOLDS %]
248
	<li>High demand item. Loan period shortened to [% HIGHHOLDS.duration %] days (due [% HIGHHOLDS.returndate %]). Check out anyway?</li>
270
	<li>High demand item. Loan period shortened to [% HIGHHOLDS.duration %] days (due [% HIGHHOLDS.returndate %]).
271
      [% IF CAN_user_circulate_force_checkout %]
272
        Check out anyway?
273
      [% END %]
274
    </li>
249
[% END %]
275
[% END %]
250
</ul>
276
</ul>
251
277
Lines 256-261 var MSG_EXPORT_SELECT_CHECKOUTS = _("You must select checkout(s) to export"); Link Here
256
	});
282
	});
257
	</script>
283
	</script>
258
[% END %]
284
[% END %]
285
286
[% IF CAN_user_circulate_force_checkout %]
259
<form method="post" action="/cgi-bin/koha/circ/circulation.pl" autocomplete="off">
287
<form method="post" action="/cgi-bin/koha/circ/circulation.pl" autocomplete="off">
260
288
261
[% IF ( RESERVED ) %]
289
[% IF ( RESERVED ) %]
Lines 305-310 var MSG_EXPORT_SELECT_CHECKOUTS = _("You must select checkout(s) to export"); Link Here
305
    <input type="submit" class="deny" value="No, Don't Check Out (N)" accesskey="n" />
333
    <input type="submit" class="deny" value="No, Don't Check Out (N)" accesskey="n" />
306
    [% END %]
334
    [% END %]
307
</form>
335
</form>
336
[% END %]
308
337
309
</div></div>
338
</div></div>
310
[% END %] <!-- NEEDSCONFIRMATION -->
339
[% END %] <!-- NEEDSCONFIRMATION -->
Lines 481-487 No patron matched <span class="ex">[% message %]</span> Link Here
481
510
482
	<div class="hint">Enter item barcode:</div>
511
	<div class="hint">Enter item barcode:</div>
483
512
484
    [% IF ( NEEDSCONFIRMATION ) %]
513
    [% IF NEEDSCONFIRMATION %]
485
	    <input type="text" name="barcode" id="barcode" class="barcode focus" size="14" disabled="disabled" />
514
	    <input type="text" name="barcode" id="barcode" class="barcode focus" size="14" disabled="disabled" />
486
    [% ELSE %]
515
    [% ELSE %]
487
	    <input type="text" name="barcode" id="barcode" class="barcode focus" size="14" />
516
	    <input type="text" name="barcode" id="barcode" class="barcode focus" size="14" />
Lines 558-569 No patron matched <span class="ex">[% message %]</span> Link Here
558
            [% IF ( userdebarred ) %]
587
            [% IF ( userdebarred ) %]
559
               <li class="blocker">
588
               <li class="blocker">
560
               <span class="circ-hlt"> Restricted:</span> Patron's account is restricted [% IF (userdebarreddate ) %] until [% userdebarreddate %] [% END %] [% IF (debarredcomment ) %] with the comment "[% debarredcomment %]"[% END %]
589
               <span class="circ-hlt"> Restricted:</span> Patron's account is restricted [% IF (userdebarreddate ) %] until [% userdebarreddate %] [% END %] [% IF (debarredcomment ) %] with the comment "[% debarredcomment %]"[% END %]
590
               [% IF CAN_user_circulate_lift_restriction %]
561
               <form class="inline compact" action="/cgi-bin/koha/members/setstatus.pl" method="post">
591
               <form class="inline compact" action="/cgi-bin/koha/members/setstatus.pl" method="post">
562
	                <input type="hidden" name="borrowernumber" value="[% borrowernumber %]" />
592
	                <input type="hidden" name="borrowernumber" value="[% borrowernumber %]" />
563
	                <input type="hidden" name="destination" value="circ" />
593
	                <input type="hidden" name="destination" value="circ" />
564
	                <input type="hidden" name="cardnumber" value="[% cardnumber %]" />
594
	                <input type="hidden" name="cardnumber" value="[% cardnumber %]" />
565
	                <input type="submit" value="Lift restriction" />
595
	                <input type="submit" value="Lift restriction" />
566
               </form>
596
               </form>
597
               [% END %]
567
			</li>[% END %]
598
			</li>[% END %]
568
599
569
        	[% 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>
600
        	[% 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