Lines 5-10
Link Here
|
5 |
[% USE Branches %] |
5 |
[% USE Branches %] |
6 |
[% USE Categories %] |
6 |
[% USE Categories %] |
7 |
[% USE ItemTypes %] |
7 |
[% USE ItemTypes %] |
|
|
8 |
[% USE Checkouts %] |
8 |
[% USE CirculationRules %] |
9 |
[% USE CirculationRules %] |
9 |
[% SET footerjs = 1 %] |
10 |
[% SET footerjs = 1 %] |
10 |
|
11 |
|
Lines 22-27
Link Here
|
22 |
[% END %] |
23 |
[% END %] |
23 |
[% itemtypes.push(undef) %] |
24 |
[% itemtypes.push(undef) %] |
24 |
|
25 |
|
|
|
26 |
[% SET checkout_types = [] %] |
27 |
[% FOREACH ct IN Checkouts.type %] |
28 |
[% checkout_types.push( ct.value ) %] |
29 |
[% END %] |
30 |
[% checkout_types.push(undef) %] |
31 |
|
25 |
[% INCLUDE 'doc-head-open.inc' %] |
32 |
[% INCLUDE 'doc-head-open.inc' %] |
26 |
<title>Koha › Administration › Circulation and fine rules</title> |
33 |
<title>Koha › Administration › Circulation and fine rules</title> |
27 |
[% INCLUDE 'doc-head-close.inc' %] |
34 |
[% INCLUDE 'doc-head-close.inc' %] |
Lines 88-93
Link Here
|
88 |
<tr> |
95 |
<tr> |
89 |
<th>Patron category</th> |
96 |
<th>Patron category</th> |
90 |
<th>Item type</th> |
97 |
<th>Item type</th> |
|
|
98 |
<th>Checkout type</th> |
91 |
<th>Actions</th> |
99 |
<th>Actions</th> |
92 |
<th>Note</th> |
100 |
<th>Note</th> |
93 |
<th>Current checkouts allowed</th> |
101 |
<th>Current checkouts allowed</th> |
Lines 125-302
Link Here
|
125 |
[% SET c = '' UNLESS c.defined %] |
133 |
[% SET c = '' UNLESS c.defined %] |
126 |
[% FOREACH i IN itemtypes %] |
134 |
[% FOREACH i IN itemtypes %] |
127 |
[% SET i = '' UNLESS i.defined %] |
135 |
[% SET i = '' UNLESS i.defined %] |
128 |
[% SET note = all_rules.$c.$i.note %] |
136 |
[% FOREACH ct IN checkout_types %] |
129 |
[% SET maxissueqty = all_rules.$c.$i.maxissueqty %] |
137 |
[% SET ct = '' UNLESS ct.defined %] |
130 |
[% SET issuelength = all_rules.$c.$i.issuelength %] |
138 |
[% SET note = all_rules.$c.$i.$ct.note %] |
131 |
[% SET lengthunit = all_rules.$c.$i.lengthunit %] |
139 |
[% SET maxissueqty = all_rules.$c.$i.$ct.maxissueqty %] |
132 |
[% SET hardduedate = all_rules.$c.$i.hardduedate %] |
140 |
[% SET issuelength = all_rules.$c.$i.$ct.issuelength %] |
133 |
[% SET hardduedatecompare = all_rules.$c.$i.hardduedatecompare %] |
141 |
[% SET lengthunit = all_rules.$c.$i.$ct.lengthunit %] |
134 |
[% SET fine = all_rules.$c.$i.fine %] |
142 |
[% SET hardduedate = all_rules.$c.$i.$ct.hardduedate %] |
135 |
[% SET chargeperiod = all_rules.$c.$i.chargeperiod %] |
143 |
[% SET hardduedatecompare = all_rules.$c.$i.$ct.hardduedatecompare %] |
136 |
[% SET chargeperiod_charge_at = all_rules.$c.$i.chargeperiod_charge_at %] |
144 |
[% SET fine = all_rules.$c.$i.$ct.fine %] |
137 |
[% SET firstremind = all_rules.$c.$i.firstremind %] |
145 |
[% SET chargeperiod = all_rules.$c.$i.$ct.chargeperiod %] |
138 |
[% SET overduefinescap = all_rules.$c.$i.overduefinescap %] |
146 |
[% SET chargeperiod_charge_at = all_rules.$c.$i.$ct.chargeperiod_charge_at %] |
139 |
[% SET cap_fine_to_replacement_price = all_rules.$c.$i.cap_fine_to_replacement_price %] |
147 |
[% SET firstremind = all_rules.$c.$i.$ct.firstremind %] |
140 |
[% SET finedays = all_rules.$c.$i.finedays %] |
148 |
[% SET overduefinescap = all_rules.$c.$i.$ct.overduefinescap %] |
141 |
[% SET maxsuspensiondays = all_rules.$c.$i.maxsuspensiondays %] |
149 |
[% SET cap_fine_to_replacement_price = all_rules.$c.$i.$ct.cap_fine_to_replacement_price %] |
142 |
[% SET suspension_chargeperiod = all_rules.$c.$i.suspension_chargeperiod %] |
150 |
[% SET finedays = all_rules.$c.$i.$ct.finedays %] |
143 |
[% SET renewalsallowed = all_rules.$c.$i.renewalsallowed %] |
151 |
[% SET maxsuspensiondays = all_rules.$c.$i.$ct.maxsuspensiondays %] |
144 |
[% SET renewalperiod = all_rules.$c.$i.renewalperiod %] |
152 |
[% SET suspension_chargeperiod = all_rules.$c.$i.$ct.suspension_chargeperiod %] |
145 |
[% SET norenewalbefore = all_rules.$c.$i.norenewalbefore %] |
153 |
[% SET renewalsallowed = all_rules.$c.$i.$ct.renewalsallowed %] |
146 |
[% SET auto_renew = all_rules.$c.$i.auto_renew %] |
154 |
[% SET renewalperiod = all_rules.$c.$i.$ct.renewalperiod %] |
147 |
[% SET no_auto_renewal_after = all_rules.$c.$i.no_auto_renewal_after %] |
155 |
[% SET norenewalbefore = all_rules.$c.$i.$ct.norenewalbefore %] |
148 |
[% SET no_auto_renewal_after_hard_limit = all_rules.$c.$i.no_auto_renewal_after_hard_limit %] |
156 |
[% SET auto_renew = all_rules.$c.$i.$ct.auto_renew %] |
149 |
[% SET reservesallowed = all_rules.$c.$i.reservesallowed %] |
157 |
[% SET no_auto_renewal_after = all_rules.$c.$i.$ct.no_auto_renewal_after %] |
150 |
[% SET holds_per_day = all_rules.$c.$i.holds_per_day %] |
158 |
[% SET no_auto_renewal_after_hard_limit = all_rules.$c.$i.$ct.no_auto_renewal_after_hard_limit %] |
151 |
[% SET holds_per_record = all_rules.$c.$i.holds_per_record %] |
159 |
[% SET reservesallowed = all_rules.$c.$i.$ct.reservesallowed %] |
152 |
[% SET onshelfholds = all_rules.$c.$i.onshelfholds %] |
160 |
[% SET holds_per_day = all_rules.$c.$i.$ct.holds_per_day %] |
153 |
[% SET opacitemholds = all_rules.$c.$i.opacitemholds %] |
161 |
[% SET holds_per_record = all_rules.$c.$i.$ct.holds_per_record %] |
154 |
[% SET article_requests = all_rules.$c.$i.article_requests %] |
162 |
[% SET onshelfholds = all_rules.$c.$i.$ct.onshelfholds %] |
155 |
[% SET rentaldiscount = all_rules.$c.$i.rentaldiscount %] |
163 |
[% SET opacitemholds = all_rules.$c.$i.$ct.opacitemholds %] |
156 |
|
164 |
[% SET article_requests = all_rules.$c.$i.$ct.article_requests %] |
157 |
[% SET show_rule = maxissueqty || issuelength || lengthunit || hardduedate || hardduedatebefore || hardduedateexact || fine || chargeperiod || chargeperiod_charge_at || firstremind || overduefinescap || cap_fine_to_replacement_price || finedays || maxsuspensiondays || suspension_chargeperiod || renewalsallowed || renewalsallowed || norenewalbefore || auto_renew || no_auto_renewal_after || no_auto_renewal_after_hard_limit || reservesallowed || holds_per_day || holds_per_record || onshelfholds || opacitemholds || article_requests || article_requests %] |
165 |
[% SET rentaldiscount = all_rules.$c.$i.$ct.rentaldiscount %] |
158 |
[% IF show_rule %] |
166 |
[% SET show_rule = maxissueqty || issuelength || lengthunit || hardduedate || hardduedatebefore || hardduedateexact || fine || chargeperiod || chargeperiod_charge_at || firstremind || overduefinescap || cap_fine_to_replacement_price || finedays || maxsuspensiondays || suspension_chargeperiod || renewalsallowed || renewalsallowed || norenewalbefore || auto_renew || no_auto_renewal_after || no_auto_renewal_after_hard_limit || reservesallowed || holds_per_day || holds_per_record || onshelfholds || opacitemholds || article_requests || article_requests %] |
159 |
[% SET row_count = row_count + 1 %] |
167 |
[% IF show_rule %] |
160 |
<tr row_countd="row_[% row_count | html %]"> |
168 |
[% SET row_count = row_count + 1 %] |
161 |
<td> |
169 |
<tr row_countd="row_[% row_count | html %]"> |
162 |
[% IF c == undef %] |
170 |
<td> |
163 |
<em>All</em> |
171 |
[% IF c == undef %] |
164 |
[% ELSE %] |
172 |
<em>All</em> |
165 |
[% Categories.GetName(c) | html %] |
173 |
[% ELSE %] |
166 |
[% END %] |
174 |
[% Categories.GetName(c) | html %] |
167 |
</td> |
175 |
[% END %] |
168 |
<td> |
176 |
</td> |
169 |
[% IF i == undef %] |
177 |
<td> |
170 |
<em>All</em> |
178 |
[% IF i == undef %] |
171 |
[% ELSE %] |
179 |
<em>All</em> |
172 |
[% ItemTypes.GetDescription(i) | html %] |
180 |
[% ELSE %] |
173 |
[% END %] |
181 |
[% ItemTypes.GetDescription(i) | html %] |
174 |
</td> |
182 |
[% END %] |
175 |
<td class="actions"> |
183 |
</td> |
176 |
<a href="#" class="editrule btn btn-default btn-xs"><i class="fa fa-pencil"></i> Edit</a> |
184 |
<td> |
177 |
<a class="btn btn-default btn-xs delete" href="/cgi-bin/koha/admin/smart-rules.pl?op=delete&itemtype=[% i || '*' | html %]&categorycode=[% c || '*' | html %]&branch=[% current_branch | html %]"><i class="fa fa-trash"></i> Delete</a> |
185 |
[% IF ct == undef %] |
178 |
</td> |
186 |
<em>All</em> |
179 |
<td> |
187 |
[% ELSE %] |
180 |
[% IF note.defined && note != '' %] |
188 |
[% IF ct == 'CHECKOUT' %] |
181 |
<a name="viewnote" data-toggle="popover" title="Note" data-content="[% note | html %]" data-placement="top" data-trigger="hover">View note</a> |
189 |
<em>Normal checkout</em> |
182 |
[% ELSE %]<span> </span>[% END %] |
190 |
[% ELSIF ct == 'ONSITE' %] |
183 |
</td> |
191 |
<em>On-site checkout</em> |
184 |
<td> |
192 |
[% END %] |
185 |
[% IF maxissueqty.defined && maxissueqty != '' %] |
193 |
[% END %] |
186 |
[% maxissueqty | html %] |
194 |
</td> |
187 |
[% ELSE %] |
195 |
<td class="actions"> |
188 |
<span>Unlimited</span> |
196 |
<a href="#" class="editrule btn btn-default btn-xs"><i class="fa fa-pencil"></i> Edit</a> |
189 |
[% END %] |
197 |
<a class="btn btn-default btn-xs delete" href="/cgi-bin/koha/admin/smart-rules.pl?op=delete&checkout_type=[% ct || '*' | html %]&itemtype=[% i || '*' | html %]&categorycode=[% c || '*' | html %]&branch=[% current_branch | html %]"><i class="fa fa-trash"></i> Delete</a> |
190 |
</td> |
198 |
</td> |
191 |
<td>[% issuelength | html %]</td> |
199 |
<td> |
192 |
<td> |
200 |
[% IF note.defined && note != '' %] |
193 |
[% IF ( lengthunit == 'days' ) %] |
201 |
<a name="viewnote" data-toggle="popover" title="Note" data-content="[% note | html %]" data-placement="top" data-trigger="hover">View note</a> |
194 |
Days |
202 |
[% ELSE %]<span> </span>[% END %] |
195 |
[% ELSIF ( lengthunit == 'hours') %] |
203 |
</td> |
196 |
Hours |
204 |
<td> |
197 |
[% ELSE %] |
205 |
[% IF maxissueqty.defined && maxissueqty != '' %] |
198 |
Undefined |
206 |
[% maxissueqty | html %] |
199 |
[% END %] |
207 |
[% ELSE %] |
200 |
</td> |
208 |
<span>Unlimited</span> |
201 |
<td> |
209 |
[% END %] |
202 |
[% IF ( hardduedate ) %] |
210 |
</td> |
203 |
[% IF ( hardduedatecompare == '-1' ) %] |
211 |
<td>[% issuelength | html %]</td> |
204 |
before [% hardduedate | $KohaDates %] |
212 |
<td> |
205 |
<input type="hidden" name="hardduedatecomparebackup" value="-1" /> |
213 |
[% IF ( lengthunit == 'days' ) %] |
206 |
[% ELSIF ( hardduedatecompare == '0' ) %] |
214 |
Days |
207 |
on [% hardduedate | $KohaDates %] |
215 |
[% ELSIF ( lengthunit == 'hours') %] |
208 |
<input type="hidden" name="hardduedatecomparebackup" value="0" /> |
216 |
Hours |
209 |
[% ELSIF ( hardduedatecompare == '1' ) %] |
217 |
[% ELSE %] |
210 |
after [% hardduedate | $KohaDates %] |
218 |
Undefined |
211 |
<input type="hidden" name="hardduedatecomparebackup" value="1" /> |
219 |
[% END %] |
212 |
[% END %] |
220 |
</td> |
213 |
[% ELSE %] |
221 |
<td> |
214 |
<span>None defined</span> |
222 |
[% IF ( hardduedate ) %] |
215 |
[% END %] |
223 |
[% IF ( hardduedatecompare == '-1' ) %] |
216 |
</td> |
224 |
before [% hardduedate | $KohaDates %] |
217 |
<td>[% fine | html %]</td> |
225 |
<input type="hidden" name="hardduedatecomparebackup" value="-1" /> |
218 |
<td>[% chargeperiod | html %]</td> |
226 |
[% ELSIF ( hardduedatecompare == '0' ) %] |
219 |
<td>[% IF chargeperiod_charge_at %]Start of interval[% ELSE %]End of interval[% END %]</td> |
227 |
on [% hardduedate | $KohaDates %] |
220 |
<td>[% firstremind | html %]</td> |
228 |
<input type="hidden" name="hardduedatecomparebackup" value="0" /> |
221 |
<td>[% overduefinescap FILTER format("%.2f") %]</td> |
229 |
[% ELSIF ( hardduedatecompare == '1' ) %] |
222 |
<td> |
230 |
after [% hardduedate | $KohaDates %] |
223 |
[% IF cap_fine_to_replacement_price %] |
231 |
<input type="hidden" name="hardduedatecomparebackup" value="1" /> |
224 |
<input type="checkbox" checked="checked" disabled="disabled" /> |
232 |
[% END %] |
225 |
[% ELSE %] |
233 |
[% ELSE %] |
226 |
<input type="checkbox" disabled="disabled" /> |
234 |
<span>None defined</span> |
227 |
[% END %] |
235 |
[% END %] |
228 |
</td> |
236 |
</td> |
229 |
<td>[% finedays | html %]</td> |
237 |
<td>[% fine | html %]</td> |
230 |
<td>[% maxsuspensiondays | html %]</td> |
238 |
<td>[% chargeperiod | html %]</td> |
231 |
<td>[% suspension_chargeperiod | html %]</td> |
239 |
<td>[% IF chargeperiod_charge_at %]Start of interval[% ELSE %]End of interval[% END %]</td> |
232 |
<td>[% renewalsallowed | html %]</td> |
240 |
<td>[% firstremind | html %]</td> |
233 |
<td>[% renewalperiod | html %]</td> |
241 |
<td>[% overduefinescap FILTER format("%.2f") %]</td> |
234 |
<td>[% norenewalbefore | html %]</td> |
242 |
<td> |
235 |
<td> |
243 |
[% IF cap_fine_to_replacement_price %] |
236 |
[% IF auto_renew %] |
244 |
<input type="checkbox" checked="checked" disabled="disabled" /> |
237 |
<span>Yes</span> |
245 |
[% ELSE %] |
238 |
[% ELSE %] |
246 |
<input type="checkbox" disabled="disabled" /> |
239 |
<span>No</span> |
247 |
[% END %] |
240 |
[% END %] |
248 |
</td> |
241 |
</td> |
249 |
<td>[% finedays | html %]</td> |
242 |
<td>[% no_auto_renewal_after | html %]</td> |
250 |
<td>[% maxsuspensiondays | html %]</td> |
243 |
<td>[% no_auto_renewal_after_hard_limit | $KohaDates %]</td> |
251 |
<td>[% suspension_chargeperiod | html %]</td> |
244 |
<td> |
252 |
<td>[% renewalsallowed | html %]</td> |
245 |
[% IF reservesallowed.defined && reservesallowed != '' %] |
253 |
<td>[% renewalperiod | html %]</td> |
246 |
[% reservesallowed | html %] |
254 |
<td>[% norenewalbefore | html %]</td> |
247 |
[% ELSE %] |
255 |
<td> |
248 |
<span>Unlimited</span> |
256 |
[% IF auto_renew %] |
249 |
[% END %] |
257 |
<span>Yes</span> |
250 |
</td> |
258 |
[% ELSE %] |
251 |
<td> |
259 |
<span>No</span> |
252 |
[% IF holds_per_day.defined && holds_per_day != '' %] |
260 |
[% END %] |
253 |
[% holds_per_day | html %] |
261 |
</td> |
254 |
[% ELSE %] |
262 |
<td>[% no_auto_renewal_after | html %]</td> |
255 |
<span>Unlimited</span> |
263 |
<td>[% no_auto_renewal_after_hard_limit | $KohaDates %]</td> |
256 |
[% END %] |
264 |
<td> |
257 |
</td> |
265 |
[% IF reservesallowed.defined && reservesallowed != '' %] |
258 |
<td> |
266 |
[% reservesallowed | html %] |
259 |
[% IF holds_per_record.defined && holds_per_record != '' %] |
267 |
[% ELSE %] |
260 |
[% holds_per_record | html %] |
268 |
<span>Unlimited</span> |
261 |
[% ELSE %] |
269 |
[% END %] |
262 |
<span>Unlimited</span> |
270 |
</td> |
263 |
[% END %] |
271 |
<td> |
264 |
</td> |
272 |
[% IF holds_per_day.defined && holds_per_day != '' %] |
265 |
<td> |
273 |
[% holds_per_day | html %] |
266 |
[% IF onshelfholds == 1 %] |
274 |
[% ELSE %] |
267 |
<span>Yes</span> |
275 |
<span>Unlimited</span> |
268 |
[% ELSIF onshelfholds == 2 %] |
276 |
[% END %] |
269 |
<span>If all unavailable</span> |
277 |
</td> |
270 |
[% ELSE %] |
278 |
<td> |
271 |
<span>If any unavailable</span> |
279 |
[% IF holds_per_record.defined && holds_per_record != '' %] |
272 |
[% END %] |
280 |
[% holds_per_record | html %] |
273 |
</td> |
281 |
[% ELSE %] |
274 |
<td> |
282 |
<span>Unlimited</span> |
275 |
[% IF opacitemholds == 'F'%] |
283 |
[% END %] |
276 |
<span>Force</span> |
284 |
</td> |
277 |
[% ELSIF opacitemholds == 'Y'%] |
285 |
<td> |
278 |
<span>Allow</span> |
286 |
[% IF onshelfholds == 1 %] |
279 |
[% ELSE %] |
287 |
<span>Yes</span> |
280 |
<span>Don't allow</span> |
288 |
[% ELSIF onshelfholds == 2 %] |
281 |
[% END %] |
289 |
<span>If all unavailable</span> |
282 |
</td> |
290 |
[% ELSE %] |
283 |
<td> |
291 |
<span>If any unavailable</span> |
284 |
[% IF article_requests == 'no' %] |
292 |
[% END %] |
285 |
<span>No</span> |
293 |
</td> |
286 |
[% ELSIF article_requests == 'yes' %] |
294 |
<td> |
287 |
<span>Yes</span> |
295 |
[% IF opacitemholds == 'F'%] |
288 |
[% ELSIF article_requests == 'bib_only' %] |
296 |
<span>Force</span> |
289 |
<span>Record only</span> |
297 |
[% ELSIF opacitemholds == 'Y'%] |
290 |
[% ELSIF article_requests == 'item_only' %] |
298 |
<span>Allow</span> |
291 |
<span>Item only</span> |
299 |
[% ELSE %] |
292 |
[% END %] |
300 |
<span>Don't allow</span> |
293 |
</td> |
301 |
[% END %] |
294 |
<td>[% rentaldiscount | html %]</td> |
302 |
</td> |
295 |
<td class="actions"> |
303 |
<td> |
296 |
<a href="#" class="editrule btn btn-default btn-xs"><i class="fa fa-pencil"></i> Edit</a> |
304 |
[% IF article_requests == 'no' %] |
297 |
<a class="btn btn-default btn-xs delete" href="/cgi-bin/koha/admin/smart-rules.pl?op=delete&itemtype=[% i || '*' | uri %]&categorycode=[% c || '*' | uri %]&branch=[% current_branch | uri %]"><i class="fa fa-trash"></i> Delete</a> |
305 |
<span>No</span> |
298 |
</td> |
306 |
[% ELSIF article_requests == 'yes' %] |
299 |
</tr> |
307 |
<span>Yes</span> |
|
|
308 |
[% ELSIF article_requests == 'bib_only' %] |
309 |
<span>Record only</span> |
310 |
[% ELSIF article_requests == 'item_only' %] |
311 |
<span>Item only</span> |
312 |
[% END %] |
313 |
</td> |
314 |
<td>[% rentaldiscount | html %]</td> |
315 |
<td class="actions"> |
316 |
<a href="#" class="editrule btn btn-default btn-xs"><i class="fa fa-pencil"></i> Edit</a> |
317 |
<a class="btn btn-default btn-xs delete" href="/cgi-bin/koha/admin/smart-rules.pl?op=delete&itemtype=[% i || '*' | uri %]&categorycode=[% c || '*' | uri %]&branch=[% current_branch | uri %]"><i class="fa fa-trash"></i> Delete</a> |
318 |
</td> |
319 |
</tr> |
320 |
[% END %] |
300 |
[% END %] |
321 |
[% END %] |
301 |
[% END %] |
322 |
[% END %] |
302 |
[% END %] |
323 |
[% END %] |
Lines 317-322
Link Here
|
317 |
[% END %] |
338 |
[% END %] |
318 |
</select> |
339 |
</select> |
319 |
</td> |
340 |
</td> |
|
|
341 |
<td> |
342 |
<select name="checkout_type" id="matrixcheckout_type" style="width:13em;"> |
343 |
<option value="*">All</option> |
344 |
<option value="CHECKOUT">Normal checkout</option> |
345 |
<option value="ONSITE">On-site checkout</option> |
346 |
</select> |
347 |
</td> |
320 |
<td class="actions"> |
348 |
<td class="actions"> |
321 |
<input type="hidden" name="branch" value="[% current_branch | html %]"/> |
349 |
<input type="hidden" name="branch" value="[% current_branch | html %]"/> |
322 |
<button type="submit" class="btn btn-default btn-xs"><i class="fa fa-save"></i> Save</button> |
350 |
<button type="submit" class="btn btn-default btn-xs"><i class="fa fa-save"></i> Save</button> |
Lines 404-409
Link Here
|
404 |
<tr> |
432 |
<tr> |
405 |
<th>Patron category</th> |
433 |
<th>Patron category</th> |
406 |
<th>Item type</th> |
434 |
<th>Item type</th> |
|
|
435 |
<th>Checkout type</th> |
407 |
<th> </th> |
436 |
<th> </th> |
408 |
<th>Note</th> |
437 |
<th>Note</th> |
409 |
<th>Current checkouts allowed</th> |
438 |
<th>Current checkouts allowed</th> |
Lines 449-454
Link Here
|
449 |
<tr> |
478 |
<tr> |
450 |
<th> </th> |
479 |
<th> </th> |
451 |
<th>Total current checkouts allowed</th> |
480 |
<th>Total current checkouts allowed</th> |
|
|
481 |
<th>Total current on-site checkouts allowed</th> |
452 |
<th>Maximum total holds allowed (count)</th> |
482 |
<th>Maximum total holds allowed (count)</th> |
453 |
<th>Hold policy</th> |
483 |
<th>Hold policy</th> |
454 |
<th>Hold pickup library match</th> |
484 |
<th>Hold pickup library match</th> |
Lines 458-473
Link Here
|
458 |
<tr> |
488 |
<tr> |
459 |
<td><em>Defaults</em></td> |
489 |
<td><em>Defaults</em></td> |
460 |
<td> |
490 |
<td> |
461 |
[% SET patron_maxissueqty = CirculationRules.Search( current_branch, undef, undef, 'patron_maxissueqty' ) %] |
491 |
[% SET patron_maxissueqty = CirculationRules.Search( current_branch, undef, undef, Checkouts.type.checkout, 'patron_maxissueqty' ) %] |
462 |
<input type="text" name="patron_maxissueqty" size="3" value="[% patron_maxissueqty | html %]"/> |
492 |
<input type="text" name="patron_maxissueqty" size="3" value="[% patron_maxissueqty | html %]"/> |
463 |
</td> |
493 |
</td> |
464 |
<td> |
494 |
<td> |
465 |
[% SET rule_value = CirculationRules.Search( current_branch, undef , undef, 'max_holds' ) %] |
495 |
[% SET patron_maxissueqty = CirculationRules.Search( current_branch, undef, undef, Checkouts.type.onsite_checkout, 'patron_maxissueqty' ) %] |
|
|
496 |
<input type="text" name="patron_maxonsiteissueqty" size="3" value="[% patron_maxissueqty | html %]"/> |
497 |
</td> |
498 |
<td> |
499 |
[% SET rule_value = CirculationRules.Search( current_branch, undef , undef, undef, 'max_holds' ) %] |
466 |
<input name="max_holds" size="3" value="[% rule_value | html %]" /> |
500 |
<input name="max_holds" size="3" value="[% rule_value | html %]" /> |
467 |
</td> |
501 |
</td> |
468 |
<td> |
502 |
<td> |
469 |
<select name="holdallowed"> |
503 |
<select name="holdallowed"> |
470 |
[% SET holdallowed = CirculationRules.Search( current_branch, undef, undef, 'holdallowed' ) %] |
504 |
[% SET holdallowed = CirculationRules.Search( current_branch, undef, undef, undef, 'holdallowed' ) %] |
471 |
<option value=""> |
505 |
<option value=""> |
472 |
Not set |
506 |
Not set |
473 |
</option> |
507 |
</option> |
Lines 507-513
Link Here
|
507 |
</td> |
541 |
</td> |
508 |
<td> |
542 |
<td> |
509 |
<select name="hold_fulfillment_policy"> |
543 |
<select name="hold_fulfillment_policy"> |
510 |
[% SET hold_fulfillment_policy = CirculationRules.Search( current_branch, undef, undef, 'hold_fulfillment_policy' ) %] |
544 |
[% SET hold_fulfillment_policy = CirculationRules.Search( current_branch, undef, undef, undef, 'hold_fulfillment_policy' ) %] |
511 |
|
545 |
|
512 |
<option value=""> |
546 |
<option value=""> |
513 |
Not set |
547 |
Not set |
Lines 566-572
Link Here
|
566 |
</td> |
600 |
</td> |
567 |
<td> |
601 |
<td> |
568 |
<select name="returnbranch"> |
602 |
<select name="returnbranch"> |
569 |
[% SET returnbranch = CirculationRules.Search( current_branch, undef, undef, 'returnbranch' ) %] |
603 |
[% SET returnbranch = CirculationRules.Search( current_branch, undef, undef, undef, 'returnbranch' ) %] |
570 |
|
604 |
|
571 |
<option value=""> |
605 |
<option value=""> |
572 |
Not set |
606 |
Not set |
Lines 619-631
Link Here
|
619 |
<tr> |
653 |
<tr> |
620 |
<th>Patron category</th> |
654 |
<th>Patron category</th> |
621 |
<th>Total current checkouts allowed</th> |
655 |
<th>Total current checkouts allowed</th> |
|
|
656 |
<th>Total current on-site checkouts allowed</th> |
622 |
<th>Total holds allowed</th> |
657 |
<th>Total holds allowed</th> |
623 |
<th> </th> |
658 |
<th> </th> |
624 |
</tr> |
659 |
</tr> |
625 |
[% FOREACH c IN categorycodes %] |
660 |
[% FOREACH c IN categorycodes %] |
626 |
[% NEXT UNLESS c %] |
661 |
[% NEXT UNLESS c %] |
627 |
[% SET patron_maxissueqty = CirculationRules.Search( branchcode, c, undef, 'patron_maxissueqty' ) %] |
662 |
[% SET patron_maxissueqty = CirculationRules.Search( branchcode, c, undef, Checkouts.type.checkout, 'patron_maxissueqty' ) %] |
628 |
[% SET max_holds = CirculationRules.Search( branchcode, c, undef, 'max_holds' ) %] |
663 |
[% SET patron_maxonsiteissueqty = CirculationRules.Search( branchcode, c, undef, Checkouts.type.onsite_checkout, 'patron_maxissueqty' ) %] |
|
|
664 |
[% SET max_holds = CirculationRules.Search( branchcode, c, undef, undef, 'max_holds' ) %] |
629 |
|
665 |
|
630 |
[% IF ( patron_maxissueqty.defined && patron_maxissueqty != '' ) || ( max_holds.defined && max_holds != '' ) %] |
666 |
[% IF ( patron_maxissueqty.defined && patron_maxissueqty != '' ) || ( max_holds.defined && max_holds != '' ) %] |
631 |
<tr> |
667 |
<tr> |
Lines 643-648
Link Here
|
643 |
<span>Unlimited</span> |
679 |
<span>Unlimited</span> |
644 |
[% END %] |
680 |
[% END %] |
645 |
</td> |
681 |
</td> |
|
|
682 |
<td> |
683 |
[% IF patron_maxonsiteissueqty.defined && patron_maxonsiteissueqty != '' %] |
684 |
[% patron_maxonsiteissueqty | html %] |
685 |
[% ELSE %] |
686 |
<span>Unlimited</span> |
687 |
[% END %] |
688 |
</td> |
646 |
<td> |
689 |
<td> |
647 |
[% IF max_holds.defined && max_holds != '' %] |
690 |
[% IF max_holds.defined && max_holds != '' %] |
648 |
[% max_holds | html %] |
691 |
[% max_holds | html %] |
Lines 666-671
Link Here
|
666 |
</select> |
709 |
</select> |
667 |
</td> |
710 |
</td> |
668 |
<td><input name="patron_maxissueqty" size="3" type="text" /></td> |
711 |
<td><input name="patron_maxissueqty" size="3" type="text" /></td> |
|
|
712 |
<td><input name="patron_maxonsiteissueqty" size="3" type="text" /></td> |
669 |
<td><input name="max_holds" size="3" type="text" /></td> |
713 |
<td><input name="max_holds" size="3" type="text" /></td> |
670 |
<td class="actions"><button type="submit" class="btn btn-default btn-xs"><i class="fa fa-plus"></i> Add</td> |
714 |
<td class="actions"><button type="submit" class="btn btn-default btn-xs"><i class="fa fa-plus"></i> Add</td> |
671 |
</tr> |
715 |
</tr> |
Lines 785-793
Link Here
|
785 |
<th> </th> |
829 |
<th> </th> |
786 |
</tr> |
830 |
</tr> |
787 |
[% FOREACH i IN itemtypeloop %] |
831 |
[% FOREACH i IN itemtypeloop %] |
788 |
[% SET holdallowed = CirculationRules.Search( branchcode, undef, i.itemtype, 'holdallowed' ) %] |
832 |
[% SET holdallowed = CirculationRules.Search( branchcode, undef, i.itemtype, undef, 'holdallowed' ) %] |
789 |
[% SET hold_fulfillment_policy = CirculationRules.Search( branchcode, undef, i.itemtype, 'hold_fulfillment_policy' ) %] |
833 |
[% SET hold_fulfillment_policy = CirculationRules.Search( branchcode, undef, i.itemtype, undef, 'hold_fulfillment_policy' ) %] |
790 |
[% SET returnbranch = CirculationRules.Search( branchcode, undef, i.itemtype, 'returnbranch' ) %] |
834 |
[% SET returnbranch = CirculationRules.Search( branchcode, undef, i.itemtype, undef, 'returnbranch' ) %] |
791 |
|
835 |
|
792 |
[% IF holdallowed || hold_fulfillment_policy || returnbranch %] |
836 |
[% IF holdallowed || hold_fulfillment_policy || returnbranch %] |
793 |
<tr> |
837 |
<tr> |
Lines 958-968
Link Here
|
958 |
itm = $(this).text(); |
1002 |
itm = $(this).text(); |
959 |
itm = itm.replace(/^\s*|\s*$/g,''); |
1003 |
itm = itm.replace(/^\s*|\s*$/g,''); |
960 |
var current_column = $("#edit_row td:eq("+i+")"); |
1004 |
var current_column = $("#edit_row td:eq("+i+")"); |
961 |
if ( i == 3 ) { |
1005 |
if ( i == 4 ) { |
962 |
// specific processing for the Note column |
1006 |
// specific processing for the Note column |
963 |
var note = $(this).find("a[name='viewnote']").data("content"); |
1007 |
var note = $(this).find("a[name='viewnote']").data("content"); |
964 |
$(current_column).find("input[type='text']").val(note); |
1008 |
$(current_column).find("input[type='text']").val(note); |
965 |
} else if ( i == 7 ) { |
1009 |
} else if ( i == 8 ) { |
966 |
// specific processing for the Hard due date column |
1010 |
// specific processing for the Hard due date column |
967 |
var select_value = $(this).find("input[type='hidden'][name='hardduedatecomparebackup']").val(); |
1011 |
var select_value = $(this).find("input[type='hidden'][name='hardduedatecomparebackup']").val(); |
968 |
var input_value = ''; |
1012 |
var input_value = ''; |
Lines 973-979
Link Here
|
973 |
} |
1017 |
} |
974 |
$(current_column).find("input[type='text']").val(input_value); |
1018 |
$(current_column).find("input[type='text']").val(input_value); |
975 |
$(current_column).find("select").val(select_value); |
1019 |
$(current_column).find("select").val(select_value); |
976 |
} else if ( i == 13 ) { |
1020 |
} else if ( i == 14 ) { |
977 |
// specific processing for cap_fine_to_replacement_price |
1021 |
// specific processing for cap_fine_to_replacement_price |
978 |
var cap_fine_to_replacement_price = $(this).find("input[type='checkbox']"); |
1022 |
var cap_fine_to_replacement_price = $(this).find("input[type='checkbox']"); |
979 |
$('#cap_fine_to_replacement_price').prop('checked', cap_fine_to_replacement_price.is(':checked') ); |
1023 |
$('#cap_fine_to_replacement_price').prop('checked', cap_fine_to_replacement_price.is(':checked') ); |
Lines 988-1004
Link Here
|
988 |
$(this).attr('selected', 'selected'); |
1032 |
$(this).attr('selected', 'selected'); |
989 |
} |
1033 |
} |
990 |
}); |
1034 |
}); |
991 |
if ( i == 0 || i == 1 ) { |
1035 |
if ( i == 0 || i == 1 || i == 2 ) { |
992 |
// Disable the 2 first columns, we cannot update them. |
1036 |
// Disable the 2 first columns, we cannot update them. |
993 |
var val = $(current_column).find("select option:selected").val(); |
1037 |
var val = $(current_column).find("select option:selected").val(); |
994 |
var name = "categorycode"; |
1038 |
var name = "categorycode"; |
995 |
if ( i == 1 ) { |
1039 |
if ( i == 1 ) { |
996 |
name="itemtype"; |
1040 |
name="itemtype"; |
997 |
} |
1041 |
} |
|
|
1042 |
if ( i == 2 ) { |
1043 |
name="checkout_type"; |
1044 |
} |
998 |
// Remove potential previous input added |
1045 |
// Remove potential previous input added |
999 |
$(current_column).find("input").remove(); |
1046 |
$(current_column).find("input").remove(); |
1000 |
$(current_column).append("<input type='hidden' name='"+name+"' value='"+val+"' />"); |
1047 |
$(current_column).append("<input type='hidden' name='"+name+"' value='"+val+"' />"); |
1001 |
} else if ( i == 4 || i == 23 || i == 24 || i == 25 ) { |
1048 |
} else if ( i == 5 || i == 24 || i == 25 || i == 26 ) { |
1002 |
// If the value is not an integer for |
1049 |
// If the value is not an integer for |
1003 |
// - "Current checkouts allowed" |
1050 |
// - "Current checkouts allowed" |
1004 |
// - "Holds allowed (total)" |
1051 |
// - "Holds allowed (total)" |
Lines 1014-1019
Link Here
|
1014 |
}); |
1061 |
}); |
1015 |
$("#default-circulation-rules tr:last td:eq(0) select").prop('disabled', true); |
1062 |
$("#default-circulation-rules tr:last td:eq(0) select").prop('disabled', true); |
1016 |
$("#default-circulation-rules tr:last td:eq(1) select").prop('disabled', true); |
1063 |
$("#default-circulation-rules tr:last td:eq(1) select").prop('disabled', true); |
|
|
1064 |
$("#default-circulation-rules tr:last td:eq(2) select").prop('disabled', true); |
1017 |
return false; |
1065 |
return false; |
1018 |
}); |
1066 |
}); |
1019 |
$(".clear_edit").on("click",function(e){ |
1067 |
$(".clear_edit").on("click",function(e){ |
1020 |
- |
|
|