Lines 113-118
Link Here
|
113 |
<th>Note</th> |
113 |
<th>Note</th> |
114 |
<th>Current checkouts allowed</th> |
114 |
<th>Current checkouts allowed</th> |
115 |
<th>Current on-site checkouts allowed</th> |
115 |
<th>Current on-site checkouts allowed</th> |
|
|
116 |
<th class="hasPriority">Priority checkouts rule</th> |
116 |
<th>Loan period</th> |
117 |
<th>Loan period</th> |
117 |
<th>Days mode</th> |
118 |
<th>Days mode</th> |
118 |
<th>Unit</th> |
119 |
<th>Unit</th> |
Lines 167-172
Link Here
|
167 |
[% SET note = all_rules.$c.$i.note %] |
168 |
[% SET note = all_rules.$c.$i.note %] |
168 |
[% SET maxissueqty = all_rules.$c.$i.maxissueqty %] |
169 |
[% SET maxissueqty = all_rules.$c.$i.maxissueqty %] |
169 |
[% SET maxonsiteissueqty = all_rules.$c.$i.maxonsiteissueqty %] |
170 |
[% SET maxonsiteissueqty = all_rules.$c.$i.maxonsiteissueqty %] |
|
|
171 |
[% SET maxissueqty = CirculationRules.Search( current_branch, c, i, 'maxissueqty', { want_rule => 1 } ) %] |
172 |
[% SET maxonsiteissueqty = CirculationRules.Search( current_branch, c, i, 'maxonsiteissueqty', { want_rule => 1 } ) %] |
170 |
[% SET issuelength = all_rules.$c.$i.issuelength %] |
173 |
[% SET issuelength = all_rules.$c.$i.issuelength %] |
171 |
[% SET daysmode = all_rules.$c.$i.daysmode %] |
174 |
[% SET daysmode = all_rules.$c.$i.daysmode %] |
172 |
[% SET lengthunit = all_rules.$c.$i.lengthunit %] |
175 |
[% SET lengthunit = all_rules.$c.$i.lengthunit %] |
Lines 204-211
Link Here
|
204 |
[% SET recall_overdue_fine = all_rules.$c.$i.recall_overdue_fine %] |
207 |
[% SET recall_overdue_fine = all_rules.$c.$i.recall_overdue_fine %] |
205 |
[% SET recall_shelf_time = all_rules.$c.$i.recall_shelf_time %] |
208 |
[% SET recall_shelf_time = all_rules.$c.$i.recall_shelf_time %] |
206 |
[% SET holds_pickup_period = all_rules.$c.$i.holds_pickup_period %] |
209 |
[% SET holds_pickup_period = all_rules.$c.$i.holds_pickup_period %] |
|
|
210 |
[% SET has_priority_rule = maxissueqty.has_priority && maxonsiteissueqty.has_priority %] |
207 |
|
211 |
|
208 |
[% SET show_rule = note || maxissueqty || maxonsiteissueqty || issuelength || daysmode || lengthunit || hardduedate || hardduedatecompare || fine || chargeperiod || chargeperiod_charge_at || firstremind || overduefinescap || cap_fine_to_replacement_price || finedays || maxsuspensiondays || suspension_chargeperiod || renewalsallowed || unseenrenewalsallowed || renewalperiod || norenewalbefore || noautorenewalbefore || auto_renew || no_auto_renewal_after || no_auto_renewal_after_hard_limit || reservesallowed || holds_per_day || holds_per_record || onshelfholds || opacitemholds || article_requests || rentaldiscount || decreaseloanholds || recalls_allowed || recalls_per_record || on_shelf_recalls || recall_due_date_interval || recall_overdue_fine || recall_shelf_time || holds_pickup_period %] |
212 |
[% SET show_rule = note || maxissueqty.rule_value || maxonsiteissueqty.rule_value || issuelength || daysmode || lengthunit || hardduedate || hardduedatecompare || fine || chargeperiod || chargeperiod_charge_at || firstremind || overduefinescap || cap_fine_to_replacement_price || finedays || maxsuspensiondays || suspension_chargeperiod || renewalsallowed || unseenrenewalsallowed || renewalperiod || norenewalbefore || noautorenewalbefore || auto_renew || no_auto_renewal_after || no_auto_renewal_after_hard_limit || reservesallowed || holds_per_day || holds_per_record || onshelfholds || opacitemholds || article_requests || rentaldiscount || decreaseloanholds || recalls_allowed || recalls_per_record || on_shelf_recalls || recall_due_date_interval || recall_overdue_fine || recall_shelf_time || holds_pickup_period %] |
209 |
[% IF show_rule %] |
213 |
[% IF show_rule %] |
210 |
[% SET row_count = row_count + 1 %] |
214 |
[% SET row_count = row_count + 1 %] |
211 |
<tr row_countd="row_[% row_count | html %]"> |
215 |
<tr row_countd="row_[% row_count | html %]"> |
Lines 243-261
Link Here
|
243 |
[% ELSE %]<span> </span>[% END %] |
247 |
[% ELSE %]<span> </span>[% END %] |
244 |
</td> |
248 |
</td> |
245 |
<td> |
249 |
<td> |
246 |
[% IF maxissueqty.defined && maxissueqty != '' %] |
250 |
[% IF maxissueqty.rule_value && maxissueqty.rule_value != '' %] |
247 |
[% maxissueqty | html %] |
251 |
[% maxissueqty.rule_value | html %] |
248 |
[% ELSE %] |
252 |
[% ELSE %] |
249 |
<span>Unlimited</span> |
253 |
<span>Unlimited</span> |
250 |
[% END %] |
254 |
[% END %] |
251 |
</td> |
255 |
</td> |
252 |
<td> |
256 |
<td> |
253 |
[% IF maxonsiteissueqty.defined && maxonsiteissueqty != '' %] |
257 |
[% IF maxonsiteissueqty.rule_value && maxonsiteissueqty.rule_value != '' %] |
254 |
[% maxonsiteissueqty | html %] |
258 |
[% maxonsiteissueqty.rule_value | html %] |
255 |
[% ELSE %] |
259 |
[% ELSE %] |
256 |
<span>Unlimited</span> |
260 |
<span>Unlimited</span> |
257 |
[% END %] |
261 |
[% END %] |
258 |
</td> |
262 |
</td> |
|
|
263 |
<td class="hasPriority"> |
264 |
<input type="checkbox" name="has_priority_rule" [% IF has_priority_rule %]checked="checked"[% END %] disabled/> |
265 |
</td> |
259 |
<td>[% issuelength | html %]</td> |
266 |
<td>[% issuelength | html %]</td> |
260 |
<td data-code="[% daysmode | html %]"> |
267 |
<td data-code="[% daysmode | html %]"> |
261 |
[% SWITCH daysmode %] |
268 |
[% SWITCH daysmode %] |
Lines 446-451
Link Here
|
446 |
<td><input type="text" name="note" id="note" size="15" value="" maxlength="100"></td> |
453 |
<td><input type="text" name="note" id="note" size="15" value="" maxlength="100"></td> |
447 |
<td><input type="text" name="maxissueqty" id="maxissueqty" size="3" /></td> |
454 |
<td><input type="text" name="maxissueqty" id="maxissueqty" size="3" /></td> |
448 |
<td><input type="text" name="maxonsiteissueqty" id="maxonsiteissueqty" size="3" /></td> |
455 |
<td><input type="text" name="maxonsiteissueqty" id="maxonsiteissueqty" size="3" /></td> |
|
|
456 |
<td class="hasPriority"> |
457 |
<input type="checkbox" name="has_priority_rule"/> |
458 |
</td> |
449 |
<td><input type="text" name="issuelength" id="issuelength" size="3" /> </td> |
459 |
<td><input type="text" name="issuelength" id="issuelength" size="3" /> </td> |
450 |
<td> |
460 |
<td> |
451 |
<select name="daysmode" id="daysmode"> |
461 |
<select name="daysmode" id="daysmode"> |
Lines 563-568
Link Here
|
563 |
<th>Note</th> |
573 |
<th>Note</th> |
564 |
<th>Current checkouts allowed</th> |
574 |
<th>Current checkouts allowed</th> |
565 |
<th>Current on-site checkouts allowed</th> |
575 |
<th>Current on-site checkouts allowed</th> |
|
|
576 |
<th class="hasPriority">Priority checkouts rule</th> |
566 |
<th>Loan period</th> |
577 |
<th>Loan period</th> |
567 |
<th>Days mode</th> |
578 |
<th>Days mode</th> |
568 |
<th>Unit</th> |
579 |
<th>Unit</th> |
Lines 622-627
Link Here
|
622 |
<table> |
633 |
<table> |
623 |
<tr> |
634 |
<tr> |
624 |
<th> </th> |
635 |
<th> </th> |
|
|
636 |
<th class="hasPriority">Priority checkouts rule</th> |
625 |
<th>Total current checkouts allowed</th> |
637 |
<th>Total current checkouts allowed</th> |
626 |
<th>Total current on-site checkouts allowed</th> |
638 |
<th>Total current on-site checkouts allowed</th> |
627 |
<th>Maximum total holds allowed (count)</th> |
639 |
<th>Maximum total holds allowed (count)</th> |
Lines 637-642
Link Here
|
637 |
[% SET hold_fulfillment_policy = CirculationRules.Search( current_branch, undef, undef, 'hold_fulfillment_policy', { want_rule => 1 }) %] |
649 |
[% SET hold_fulfillment_policy = CirculationRules.Search( current_branch, undef, undef, 'hold_fulfillment_policy', { want_rule => 1 }) %] |
638 |
[% SET returnbranch = CirculationRules.Search( current_branch, undef, undef, 'returnbranch', { want_rule => 1 }) %] |
650 |
[% SET returnbranch = CirculationRules.Search( current_branch, undef, undef, 'returnbranch', { want_rule => 1 }) %] |
639 |
[% SET default_checkout_hold_and_return_policy = ( patron_maxissueqty || patron_maxonsiteissueqty || rule_value || holdallowed || hold_fulfillment_policy || returnbranch ) %] |
651 |
[% SET default_checkout_hold_and_return_policy = ( patron_maxissueqty || patron_maxonsiteissueqty || rule_value || holdallowed || hold_fulfillment_policy || returnbranch ) %] |
|
|
652 |
[% SET has_priority_defaults = patron_maxissueqty.has_priority && patron_maxonsiteissueqty.has_priority %] |
640 |
<tr> |
653 |
<tr> |
641 |
<td> |
654 |
<td> |
642 |
[% IF ( default_checkout_hold_and_return_policy ) %] |
655 |
[% IF ( default_checkout_hold_and_return_policy ) %] |
Lines 647-652
Link Here
|
647 |
Not set |
660 |
Not set |
648 |
[% END %] |
661 |
[% END %] |
649 |
</td> |
662 |
</td> |
|
|
663 |
<td class="hasPriority"> |
664 |
<input type="checkbox" name="has_priority_defaults" [% IF has_priority_defaults %]checked="checked"[% END %]/> |
665 |
</td> |
650 |
<td> |
666 |
<td> |
651 |
<input type="text" name="patron_maxissueqty" size="9" value="[% patron_maxissueqty.rule_value | html %]" placeholder="Unlimited"/> |
667 |
<input type="text" name="patron_maxissueqty" size="9" value="[% patron_maxissueqty.rule_value | html %]" placeholder="Unlimited"/> |
652 |
</td> |
668 |
</td> |
Lines 817-822
Link Here
|
817 |
<table> |
833 |
<table> |
818 |
<tr> |
834 |
<tr> |
819 |
<th>Patron category</th> |
835 |
<th>Patron category</th> |
|
|
836 |
<th class="hasPriority">Priority checkouts rule</th> |
820 |
<th>Total current checkouts allowed</th> |
837 |
<th>Total current checkouts allowed</th> |
821 |
<th>Total current on-site checkouts allowed</th> |
838 |
<th>Total current on-site checkouts allowed</th> |
822 |
<th>Total holds allowed</th> |
839 |
<th>Total holds allowed</th> |
Lines 825-835
Link Here
|
825 |
[% FOREACH c IN categorycodes %] |
842 |
[% FOREACH c IN categorycodes %] |
826 |
[% NEXT UNLESS c %] |
843 |
[% NEXT UNLESS c %] |
827 |
[% SET i = undef %] |
844 |
[% SET i = undef %] |
828 |
[% SET patron_maxissueqty = all_rules.$c.$i.patron_maxissueqty %] |
845 |
[% SET patron_maxissueqty = CirculationRules.Search( current_branch, c, undef, 'patron_maxissueqty', { want_rule => 1 } ) %] |
829 |
[% SET patron_maxonsiteissueqty = all_rules.$c.$i.patron_maxonsiteissueqty %] |
846 |
[% SET patron_maxonsiteissueqty = CirculationRules.Search( current_branch, c, undef, 'patron_maxonsiteissueqty', { want_rule => 1 } ) %] |
830 |
[% SET max_holds = all_rules.$c.$i.max_holds %] |
847 |
[% SET max_holds = CirculationRules.Search( current_branch, c, undef, 'max_holds', { want_rule => 1 } ) %] |
831 |
|
848 |
[% SET has_priority_by_cat = patron_maxissueqty.has_priority && patron_maxonsiteissueqty.has_priority %] |
832 |
[% IF ( patron_maxissueqty.defined && patron_maxissueqty != '' ) || ( patron_maxonsiteissueqty.defined && patron_maxonsiteissueqty != '' ) || ( max_holds.defined && max_holds != '' ) %] |
849 |
[% IF ( patron_maxissueqty.rule_value && patron_maxissueqty.rule_value != '' ) || ( patron_maxonsiteissueqty.rule_value && patron_maxonsiteissueqty.rule_value != '' ) || ( max_holds.rule_value && max_holds.rule_value != '' ) %] |
833 |
<tr> |
850 |
<tr> |
834 |
<td> |
851 |
<td> |
835 |
[% IF c == undef %] |
852 |
[% IF c == undef %] |
Lines 838-865
Link Here
|
838 |
[% Categories.GetName(c) | html %] |
855 |
[% Categories.GetName(c) | html %] |
839 |
[% END %] |
856 |
[% END %] |
840 |
</td> |
857 |
</td> |
|
|
858 |
<td class="hasPriority"> |
859 |
<input type="checkbox" name="has_priority_by_cat" [% IF has_priority_by_cat %]checked="checked"[% END %] disabled/> |
860 |
</td> |
841 |
<td> |
861 |
<td> |
842 |
[% IF patron_maxissueqty.defined && patron_maxissueqty != '' %] |
862 |
[% IF patron_maxissueqty.rule_value && patron_maxissueqty.rule_value != '' %] |
843 |
[% patron_maxissueqty | html %] |
863 |
[% patron_maxissueqty.rule_value | html %] |
844 |
[% ELSE %] |
864 |
[% ELSE %] |
845 |
<span>Unlimited</span> |
865 |
<span>Unlimited</span> |
846 |
[% END %] |
866 |
[% END %] |
847 |
</td> |
867 |
</td> |
848 |
<td> |
868 |
<td> |
849 |
[% IF patron_maxonsiteissueqty.defined && patron_maxonsiteissueqty != '' %] |
869 |
[% IF patron_maxonsiteissueqty.rule_value && patron_maxonsiteissueqty.rule_value != '' %] |
850 |
[% patron_maxonsiteissueqty | html %] |
870 |
[% patron_maxonsiteissueqty.rule_value | html %] |
851 |
[% ELSE %] |
871 |
[% ELSE %] |
852 |
<span>Unlimited</span> |
872 |
<span>Unlimited</span> |
853 |
[% END %] |
873 |
[% END %] |
854 |
</td> |
874 |
</td> |
855 |
<td> |
875 |
<td> |
856 |
[% IF max_holds.defined && max_holds != '' %] |
876 |
[% IF max_holds.rule_value && max_holds.rule_value != '' %] |
857 |
[% max_holds | html %] |
877 |
[% max_holds.rule_value | html %] |
858 |
[% ELSE %] |
878 |
[% ELSE %] |
859 |
<span>Unlimited</span> |
879 |
<span>Unlimited</span> |
860 |
[% END %] |
880 |
[% END %] |
861 |
</td> |
881 |
</td> |
862 |
|
|
|
863 |
<td class="actions"> |
882 |
<td class="actions"> |
864 |
<a href="#" class="delete-branch-cat btn btn-default btn-xs" data-categorycode="[% c | html %]" data-branch="[% current_branch | html %]"><i class="fa fa-trash-can"></i> Delete</a> |
883 |
<a href="#" class="delete-branch-cat btn btn-default btn-xs" data-categorycode="[% c | html %]" data-branch="[% current_branch | html %]"><i class="fa fa-trash-can"></i> Delete</a> |
865 |
</td> |
884 |
</td> |
Lines 874-879
Link Here
|
874 |
[% END %] |
893 |
[% END %] |
875 |
</select> |
894 |
</select> |
876 |
</td> |
895 |
</td> |
|
|
896 |
<td class="hasPriority"> |
897 |
<input type="checkbox" name="has_priority_by_cat"/> |
898 |
</td> |
877 |
<td><input name="patron_maxissueqty" size="3" type="text" /></td> |
899 |
<td><input name="patron_maxissueqty" size="3" type="text" /></td> |
878 |
<td><input name="patron_maxonsiteissueqty" size="3" type="text" /></td> |
900 |
<td><input name="patron_maxonsiteissueqty" size="3" type="text" /></td> |
879 |
<td><input name="max_holds" size="3" type="text" /></td> |
901 |
<td><input name="max_holds" size="3" type="text" /></td> |
Lines 1577-1582
Link Here
|
1577 |
$(current_column).find("input[type='text']").val(""); |
1599 |
$(current_column).find("input[type='text']").val(""); |
1578 |
} |
1600 |
} |
1579 |
} |
1601 |
} |
|
|
1602 |
if($(current_column).hasClass('hasPriority')) { |
1603 |
var has_priority_rule_checked = $(this).children("input[type='checkbox']").prop('checked'); |
1604 |
$(current_column).children("input[name='has_priority_rule']").prop('checked', has_priority_rule_checked); |
1605 |
} |
1580 |
} |
1606 |
} |
1581 |
}); |
1607 |
}); |
1582 |
$("#default-circulation-rules tr:last td:eq(0) select").prop('disabled', true); |
1608 |
$("#default-circulation-rules tr:last td:eq(0) select").prop('disabled', true); |
Lines 1678-1683
Link Here
|
1678 |
return f.submit(); |
1704 |
return f.submit(); |
1679 |
}); |
1705 |
}); |
1680 |
|
1706 |
|
|
|
1707 |
if($("#branch").val() != '*') { |
1708 |
$(".hasPriority").each(function() { |
1709 |
$(this).remove(); |
1710 |
}); |
1711 |
} |
1681 |
}); |
1712 |
}); |
1682 |
</script> |
1713 |
</script> |
1683 |
[% END %] |
1714 |
[% END %] |
1684 |
- |
|
|