Lines 132-336
Link Here
|
132 |
[% FOREACH osc IN [ undef, 0, 1 ] %] |
132 |
[% FOREACH osc IN [ undef, 0, 1 ] %] |
133 |
[% FOREACH c IN categorycodes %] |
133 |
[% FOREACH c IN categorycodes %] |
134 |
[% SET c = '' UNLESS c.defined %] |
134 |
[% SET c = '' UNLESS c.defined %] |
135 |
[% FOREACH i IN itemtypes %] |
135 |
[% FOREACH i IN itemtypes %] |
136 |
[% SET i = '' UNLESS i.defined %] |
136 |
[% SET i = '' UNLESS i.defined %] |
137 |
[% SET osc = '' UNLESS osc.defined %] |
137 |
[% SET osc = '' UNLESS osc.defined %] |
138 |
[% SET note = all_rules.$c.$i.note %] |
138 |
[% SET note = all_rules.$osc.$c.$i.note %] |
139 |
[% SET maxissueqty = all_rules.$c.$i.maxissueqty %] |
139 |
[% SET maxissueqty = all_rules.$osc.$c.$i.maxissueqty %] |
140 |
[% SET issuelength = all_rules.$c.$i.issuelength %] |
140 |
[% SET issuelength = all_rules.$osc.$c.$i.issuelength %] |
141 |
[% SET daysmode = all_rules.$c.$i.daysmode %] |
141 |
[% SET daysmode = all_rules.$osc.$c.$i.daysmode %] |
142 |
[% SET lengthunit = all_rules.$c.$i.lengthunit %] |
142 |
[% SET lengthunit = all_rules.$osc.$c.$i.lengthunit %] |
143 |
[% SET hardduedate = all_rules.$c.$i.hardduedate %] |
143 |
[% SET hardduedate = all_rules.$osc.$c.$i.hardduedate %] |
144 |
[% SET hardduedatecompare = all_rules.$c.$i.hardduedatecompare %] |
144 |
[% SET hardduedatecompare = all_rules.$osc.$c.$i.hardduedatecompare %] |
145 |
[% SET fine = all_rules.$c.$i.fine %] |
145 |
[% SET fine = all_rules.$osc.$c.$i.fine %] |
146 |
[% SET chargeperiod = all_rules.$c.$i.chargeperiod %] |
146 |
[% SET chargeperiod = all_rules.$osc.$c.$i.chargeperiod %] |
147 |
[% SET chargeperiod_charge_at = all_rules.$c.$i.chargeperiod_charge_at %] |
147 |
[% SET chargeperiod_charge_at = all_rules.$osc.$c.$i.chargeperiod_charge_at %] |
148 |
[% SET firstremind = all_rules.$c.$i.firstremind %] |
148 |
[% SET firstremind = all_rules.$osc.$c.$i.firstremind %] |
149 |
[% SET overduefinescap = all_rules.$c.$i.overduefinescap %] |
149 |
[% SET overduefinescap = all_rules.$osc.$c.$i.overduefinescap %] |
150 |
[% SET cap_fine_to_replacement_price = all_rules.$c.$i.cap_fine_to_replacement_price %] |
150 |
[% SET cap_fine_to_replacement_price = all_rules.$osc.$c.$i.cap_fine_to_replacement_price %] |
151 |
[% SET finedays = all_rules.$c.$i.finedays %] |
151 |
[% SET finedays = all_rules.$osc.$c.$i.finedays %] |
152 |
[% SET maxsuspensiondays = all_rules.$c.$i.maxsuspensiondays %] |
152 |
[% SET maxsuspensiondays = all_rules.$osc.$c.$i.maxsuspensiondays %] |
153 |
[% SET suspension_chargeperiod = all_rules.$c.$i.suspension_chargeperiod %] |
153 |
[% SET suspension_chargeperiod = all_rules.$osc.$c.$i.suspension_chargeperiod %] |
154 |
[% SET renewalsallowed = all_rules.$c.$i.renewalsallowed %] |
154 |
[% SET renewalsallowed = all_rules.$osc.$c.$i.renewalsallowed %] |
155 |
[% SET renewalperiod = all_rules.$c.$i.renewalperiod %] |
155 |
[% SET renewalperiod = all_rules.$osc.$c.$i.renewalperiod %] |
156 |
[% SET norenewalbefore = all_rules.$c.$i.norenewalbefore %] |
156 |
[% SET norenewalbefore = all_rules.$osc.$c.$i.norenewalbefore %] |
157 |
[% SET auto_renew = all_rules.$c.$i.auto_renew %] |
157 |
[% SET auto_renew = all_rules.$osc.$c.$i.auto_renew %] |
158 |
[% SET no_auto_renewal_after = all_rules.$c.$i.no_auto_renewal_after %] |
158 |
[% SET no_auto_renewal_after = all_rules.$osc.$c.$i.no_auto_renewal_after %] |
159 |
[% SET no_auto_renewal_after_hard_limit = all_rules.$c.$i.no_auto_renewal_after_hard_limit %] |
159 |
[% SET no_auto_renewal_after_hard_limit = all_rules.$osc.$c.$i.no_auto_renewal_after_hard_limit %] |
160 |
[% SET reservesallowed = all_rules.$c.$i.reservesallowed %] |
160 |
[% SET reservesallowed = all_rules.$osc.$c.$i.reservesallowed %] |
161 |
[% SET holds_per_day = all_rules.$c.$i.holds_per_day %] |
161 |
[% SET holds_per_day = all_rules.$osc.$c.$i.holds_per_day %] |
162 |
[% SET holds_per_record = all_rules.$c.$i.holds_per_record %] |
162 |
[% SET holds_per_record = all_rules.$osc.$c.$i.holds_per_record %] |
163 |
[% SET onshelfholds = all_rules.$c.$i.onshelfholds %] |
163 |
[% SET onshelfholds = all_rules.$osc.$c.$i.onshelfholds %] |
164 |
[% SET opacitemholds = all_rules.$c.$i.opacitemholds %] |
164 |
[% SET opacitemholds = all_rules.$osc.$c.$i.opacitemholds %] |
165 |
[% SET article_requests = all_rules.$c.$i.article_requests %] |
165 |
[% SET article_requests = all_rules.$osc.$c.$i.article_requests %] |
166 |
[% SET rentaldiscount = all_rules.$c.$i.rentaldiscount %] |
166 |
[% SET rentaldiscount = all_rules.$osc.$c.$i.rentaldiscount %] |
167 |
|
167 |
|
168 |
[% SET show_rule = note || maxissueqty || issuelength || daysmode || lengthunit || hardduedate || hardduedatecompare || fine || chargeperiod || chargeperiod_charge_at || firstremind || overduefinescap || cap_fine_to_replacement_price || finedays || maxsuspensiondays || suspension_chargeperiod || renewalsallowed || renewalperiod || norenewalbefore || auto_renew || no_auto_renewal_after || no_auto_renewal_after_hard_limit || reservesallowed || holds_per_day || holds_per_record || onshelfholds || opacitemholds || article_requests || rentaldiscount %] |
168 |
[% SET show_rule = note || maxissueqty || issuelength || daysmode || lengthunit || hardduedate || hardduedatecompare || fine || chargeperiod || chargeperiod_charge_at || firstremind || overduefinescap || cap_fine_to_replacement_price || finedays || maxsuspensiondays || suspension_chargeperiod || renewalsallowed || renewalperiod || norenewalbefore || auto_renew || no_auto_renewal_after || no_auto_renewal_after_hard_limit || reservesallowed || holds_per_day || holds_per_record || onshelfholds || opacitemholds || article_requests || rentaldiscount %] |
169 |
[% IF show_rule %] |
169 |
[% IF show_rule %] |
170 |
[% SET row_count = row_count + 1 %] |
170 |
[% SET row_count = row_count + 1 %] |
171 |
<tr row_countd="row_[% row_count | html %]"> |
171 |
<tr row_countd="row_[% row_count | html %]"> |
172 |
<td>[% IF ( c == undef ) %]1[% ELSE %]0[% END %]</td> |
172 |
<td>[% IF ( c == undef ) %]1[% ELSE %]0[% END %]</td> |
173 |
<td> |
173 |
<td> |
174 |
[% IF osc == undef %] |
174 |
[% IF osc == undef %] |
175 |
<em>All</em> |
175 |
<em>All</em> |
176 |
[% ELSE %] |
176 |
[% ELSE %] |
177 |
[% IF osc == 0 %] |
177 |
[% IF osc == 0 %] |
178 |
<em>No</em> |
178 |
<em>No</em> |
179 |
[% ELSIF osc == 1 %] |
179 |
[% ELSIF osc == 1 %] |
180 |
<em>On-site</em> |
180 |
<em>On-site</em> |
|
|
181 |
[% END %] |
181 |
[% END %] |
182 |
[% END %] |
182 |
[% END %] |
183 |
</td> |
183 |
</td> |
184 |
<td> |
184 |
<td> |
185 |
[% IF c == undef %] |
185 |
[% IF c == undef %] |
186 |
<em>All</em> |
186 |
<em>All</em> |
187 |
[% ELSE %] |
187 |
[% ELSE %] |
188 |
[% Categories.GetName(c) | html %] |
188 |
[% Categories.GetName(c) | html %] |
189 |
[% END %] |
189 |
[% END %] |
190 |
</td> |
190 |
</td> |
191 |
<td>[% IF ( i == undef ) %]1[% ELSE %]0[% END %]</td> |
191 |
<td>[% IF ( i == undef ) %]1[% ELSE %]0[% END %]</td> |
192 |
<td> |
192 |
<td> |
193 |
[% IF i == undef %] |
193 |
[% IF i == undef %] |
194 |
<em>All</em> |
194 |
<em>All</em> |
195 |
[% ELSE %] |
195 |
[% ELSE %] |
196 |
[% ItemTypes.GetDescription(i,1) | html %] |
196 |
[% ItemTypes.GetDescription(i,1) | html %] |
197 |
[% END %] |
197 |
[% END %] |
198 |
</td> |
198 |
</td> |
199 |
<td class="actions"> |
199 |
<td class="actions"> |
200 |
<a href="#" class="editrule btn btn-default btn-xs"><i class="fa fa-pencil"></i> Edit</a> |
200 |
<a href="#" class="editrule btn btn-default btn-xs"><i class="fa fa-pencil"></i> Edit</a> |
201 |
<a class="btn btn-default btn-xs delete" href="/cgi-bin/koha/admin/smart-rules.pl?op=delete&onsite_checkout=[% ct || '*' | html %]&itemtype=[% i || '*' | html %]&categorycode=[% c || '*' | html %]&branch=[% current_branch | html %]"><i class="fa fa-trash"></i> Delete</a> |
201 |
<a class="btn btn-default btn-xs delete" href="/cgi-bin/koha/admin/smart-rules.pl?op=delete&onsite_checkout=[% ct || '*' | html %]&itemtype=[% i || '*' | html %]&categorycode=[% c || '*' | html %]&branch=[% current_branch | html %]"><i class="fa fa-trash"></i> Delete</a> |
202 |
</td> |
202 |
</td> |
203 |
<td> |
203 |
<td> |
204 |
[% IF note.defined && note != '' %] |
204 |
[% IF note.defined && note != '' %] |
205 |
<a name="viewnote" data-toggle="popover" title="Note" data-content="[% note | html %]" data-placement="top" data-trigger="hover">View note</a> |
205 |
<a name="viewnote" data-toggle="popover" title="Note" data-content="[% note | html %]" data-placement="top" data-trigger="hover">View note</a> |
206 |
[% ELSE %]<span> </span>[% END %] |
206 |
[% ELSE %]<span> </span>[% END %] |
207 |
</td> |
207 |
</td> |
208 |
<td> |
208 |
<td> |
209 |
[% IF maxissueqty.defined && maxissueqty != '' %] |
209 |
[% IF maxissueqty.defined && maxissueqty != '' %] |
210 |
[% maxissueqty | html %] |
210 |
[% maxissueqty | html %] |
211 |
[% ELSE %] |
211 |
[% ELSE %] |
212 |
<span>Unlimited</span> |
212 |
<span>Unlimited</span> |
213 |
[% END %] |
213 |
[% END %] |
214 |
</td> |
214 |
</td> |
215 |
<td>[% issuelength | html %]</td> |
215 |
<td>[% issuelength | html %]</td> |
216 |
<td> |
216 |
<td> |
217 |
[% SWITCH daysmode %] |
217 |
[% SWITCH daysmode %] |
218 |
[% CASE 'Calendar' %]<span title="Use the calendar to skip days the library is closed">Calendar</span> |
218 |
[% CASE 'Calendar' %]<span title="Use the calendar to skip days the library is closed">Calendar</span> |
219 |
[% CASE 'Datedue' %]<span title="Use the calendar to push the due date to the next open day">Datedue</span> |
219 |
[% CASE 'Datedue' %]<span title="Use the calendar to push the due date to the next open day">Datedue</span> |
220 |
[% CASE 'Days' %]<span title="Ignore the calendar">Days</span> |
220 |
[% CASE 'Days' %]<span title="Ignore the calendar">Days</span> |
221 |
[% CASE 'Dayweek' %]<span title="Use the calendar to push the due date to the next open matching weekday for weekly loan periods, or the next open day otherwise">Dayweek</span> |
221 |
[% CASE 'Dayweek' %]<span title="Use the calendar to push the due date to the next open matching weekday for weekly loan periods, or the next open day otherwise">Dayweek</span> |
222 |
[% CASE %]<span title="Use the system preference 'useDaysMode' as a default value">Default</span> |
222 |
[% CASE %]<span title="Use the system preference 'useDaysMode' as a default value">Default</span> |
223 |
[% END %] |
223 |
[% END %] |
224 |
</td> |
224 |
</td> |
225 |
<td> |
225 |
<td> |
226 |
[% IF ( lengthunit == 'days' ) %] |
226 |
[% IF ( lengthunit == 'days' ) %] |
227 |
Days |
227 |
Days |
228 |
[% ELSIF ( lengthunit == 'hours') %] |
228 |
[% ELSIF ( lengthunit == 'hours') %] |
229 |
Hours |
229 |
Hours |
230 |
[% ELSE %] |
230 |
[% ELSE %] |
231 |
Undefined |
231 |
Undefined |
232 |
[% END %] |
232 |
[% END %] |
233 |
</td> |
233 |
</td> |
234 |
<td> |
234 |
<td> |
235 |
[% IF ( hardduedate ) %] |
235 |
[% IF ( hardduedate ) %] |
236 |
[% IF ( hardduedatecompare == '-1' ) %] |
236 |
[% IF ( hardduedatecompare == '-1' ) %] |
237 |
before [% hardduedate | $KohaDates %] |
237 |
before [% hardduedate | $KohaDates %] |
238 |
<input type="hidden" name="hardduedatecomparebackup" value="-1" /> |
238 |
<input type="hidden" name="hardduedatecomparebackup" value="-1" /> |
239 |
[% ELSIF ( hardduedatecompare == '0' ) %] |
239 |
[% ELSIF ( hardduedatecompare == '0' ) %] |
240 |
on [% hardduedate | $KohaDates %] |
240 |
on [% hardduedate | $KohaDates %] |
241 |
<input type="hidden" name="hardduedatecomparebackup" value="0" /> |
241 |
<input type="hidden" name="hardduedatecomparebackup" value="0" /> |
242 |
[% ELSIF ( hardduedatecompare == '1' ) %] |
242 |
[% ELSIF ( hardduedatecompare == '1' ) %] |
243 |
after [% hardduedate | $KohaDates %] |
243 |
after [% hardduedate | $KohaDates %] |
244 |
<input type="hidden" name="hardduedatecomparebackup" value="1" /> |
244 |
<input type="hidden" name="hardduedatecomparebackup" value="1" /> |
245 |
[% END %] |
245 |
[% END %] |
246 |
[% ELSE %] |
246 |
[% ELSE %] |
247 |
<span>None defined</span> |
247 |
<span>None defined</span> |
248 |
[% END %] |
248 |
[% END %] |
249 |
</td> |
249 |
</td> |
250 |
<td>[% fine | html %]</td> |
250 |
<td>[% fine | html %]</td> |
251 |
<td>[% chargeperiod | html %]</td> |
251 |
<td>[% chargeperiod | html %]</td> |
252 |
<td>[% IF chargeperiod_charge_at %]Start of interval[% ELSE %]End of interval[% END %]</td> |
252 |
<td>[% IF chargeperiod_charge_at %]Start of interval[% ELSE %]End of interval[% END %]</td> |
253 |
<td>[% firstremind | html %]</td> |
253 |
<td>[% firstremind | html %]</td> |
254 |
<td>[% overduefinescap FILTER format("%.2f") %]</td> |
254 |
<td>[% overduefinescap FILTER format("%.2f") %]</td> |
255 |
<td> |
255 |
<td> |
256 |
[% IF cap_fine_to_replacement_price %] |
256 |
[% IF cap_fine_to_replacement_price %] |
257 |
<input type="checkbox" checked="checked" disabled="disabled" /> |
257 |
<input type="checkbox" checked="checked" disabled="disabled" /> |
258 |
[% ELSE %] |
258 |
[% ELSE %] |
259 |
<input type="checkbox" disabled="disabled" /> |
259 |
<input type="checkbox" disabled="disabled" /> |
260 |
[% END %] |
260 |
[% END %] |
261 |
</td> |
261 |
</td> |
262 |
<td>[% finedays | html %]</td> |
262 |
<td>[% finedays | html %]</td> |
263 |
<td>[% maxsuspensiondays | html %]</td> |
263 |
<td>[% maxsuspensiondays | html %]</td> |
264 |
<td>[% suspension_chargeperiod | html %]</td> |
264 |
<td>[% suspension_chargeperiod | html %]</td> |
265 |
<td>[% renewalsallowed | html %]</td> |
265 |
<td>[% renewalsallowed | html %]</td> |
266 |
<td>[% renewalperiod | html %]</td> |
266 |
<td>[% renewalperiod | html %]</td> |
267 |
<td>[% norenewalbefore | html %]</td> |
267 |
<td>[% norenewalbefore | html %]</td> |
268 |
<td> |
268 |
<td> |
269 |
[% IF auto_renew %] |
269 |
[% IF auto_renew %] |
270 |
<span>Yes</span> |
270 |
<span>Yes</span> |
271 |
[% ELSE %] |
271 |
[% ELSE %] |
272 |
<span>No</span> |
272 |
<span>No</span> |
273 |
[% END %] |
273 |
[% END %] |
274 |
</td> |
274 |
</td> |
275 |
<td>[% no_auto_renewal_after | html %]</td> |
275 |
<td>[% no_auto_renewal_after | html %]</td> |
276 |
<td>[% no_auto_renewal_after_hard_limit | $KohaDates %]</td> |
276 |
<td>[% no_auto_renewal_after_hard_limit | $KohaDates %]</td> |
277 |
<td> |
277 |
<td> |
278 |
[% IF reservesallowed.defined && reservesallowed != '' %] |
278 |
[% IF reservesallowed.defined && reservesallowed != '' %] |
279 |
[% reservesallowed | html %] |
279 |
[% reservesallowed | html %] |
280 |
[% ELSE %] |
280 |
[% ELSE %] |
281 |
<span>Unlimited</span> |
281 |
<span>Unlimited</span> |
282 |
[% END %] |
282 |
[% END %] |
283 |
</td> |
283 |
</td> |
284 |
<td> |
284 |
<td> |
285 |
[% IF holds_per_day.defined && holds_per_day != '' %] |
285 |
[% IF holds_per_day.defined && holds_per_day != '' %] |
286 |
[% holds_per_day | html %] |
286 |
[% holds_per_day | html %] |
287 |
[% ELSE %] |
287 |
[% ELSE %] |
288 |
<span>Unlimited</span> |
288 |
<span>Unlimited</span> |
289 |
[% END %] |
289 |
[% END %] |
290 |
</td> |
290 |
</td> |
291 |
<td> |
291 |
<td> |
292 |
[% IF holds_per_record.defined && holds_per_record != '' %] |
292 |
[% IF holds_per_record.defined && holds_per_record != '' %] |
293 |
[% holds_per_record | html %] |
293 |
[% holds_per_record | html %] |
294 |
[% ELSE %] |
294 |
[% ELSE %] |
295 |
<span>Unlimited</span> |
295 |
<span>Unlimited</span> |
296 |
[% END %] |
296 |
[% END %] |
297 |
</td> |
297 |
</td> |
298 |
<td> |
298 |
<td> |
299 |
[% IF onshelfholds == 1 %] |
299 |
[% IF onshelfholds == 1 %] |
300 |
<span>Yes</span> |
300 |
<span>Yes</span> |
301 |
[% ELSIF onshelfholds == 2 %] |
301 |
[% ELSIF onshelfholds == 2 %] |
302 |
<span>If all unavailable</span> |
302 |
<span>If all unavailable</span> |
303 |
[% ELSE %] |
303 |
[% ELSE %] |
304 |
<span>If any unavailable</span> |
304 |
<span>If any unavailable</span> |
305 |
[% END %] |
305 |
[% END %] |
306 |
</td> |
306 |
</td> |
307 |
<td> |
307 |
<td> |
308 |
[% IF opacitemholds == 'F'%] |
308 |
[% IF opacitemholds == 'F'%] |
309 |
<span>Force</span> |
309 |
<span>Force</span> |
310 |
[% ELSIF opacitemholds == 'Y'%] |
310 |
[% ELSIF opacitemholds == 'Y'%] |
311 |
<span>Allow</span> |
311 |
<span>Allow</span> |
312 |
[% ELSE %] |
312 |
[% ELSE %] |
313 |
<span>Don't allow</span> |
313 |
<span>Don't allow</span> |
314 |
[% END %] |
314 |
[% END %] |
315 |
</td> |
315 |
</td> |
316 |
<td> |
316 |
<td> |
317 |
[% IF article_requests == 'no' %] |
317 |
[% IF article_requests == 'no' %] |
318 |
<span>No</span> |
318 |
<span>No</span> |
319 |
[% ELSIF article_requests == 'yes' %] |
319 |
[% ELSIF article_requests == 'yes' %] |
320 |
<span>Yes</span> |
320 |
<span>Yes</span> |
321 |
[% ELSIF article_requests == 'bib_only' %] |
321 |
[% ELSIF article_requests == 'bib_only' %] |
322 |
<span>Record only</span> |
322 |
<span>Record only</span> |
323 |
[% ELSIF article_requests == 'item_only' %] |
323 |
[% ELSIF article_requests == 'item_only' %] |
324 |
<span>Item only</span> |
324 |
<span>Item only</span> |
325 |
[% END %] |
325 |
[% END %] |
326 |
</td> |
326 |
</td> |
327 |
<td>[% rentaldiscount | html %]</td> |
327 |
<td>[% rentaldiscount | html %]</td> |
328 |
<td class="actions"> |
328 |
<td class="actions"> |
329 |
<a href="#" class="editrule btn btn-default btn-xs"><i class="fa fa-pencil"></i> Edit</a> |
329 |
<a href="#" class="editrule btn btn-default btn-xs"><i class="fa fa-pencil"></i> Edit</a> |
330 |
<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> |
330 |
<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> |
331 |
</td> |
331 |
</td> |
332 |
</tr> |
332 |
</tr> |
333 |
[% END %] |
333 |
[% END %] |
|
|
334 |
[% END %] |
334 |
[% END %] |
335 |
[% END %] |
335 |
[% END %] |
336 |
[% END %] |
336 |
[% END %] |
337 |
- |
|
|