From 33e6a73621b09c2a81293928856d9913d1d867a7 Mon Sep 17 00:00:00 2001 From: Lari Taskula Date: Wed, 29 Jul 2020 19:49:51 +0000 Subject: [PATCH] Bug 25089: (OLD GUI) Indent and add checkout type to all_rules hash No other changes in this patch. To test: 1. git diff --word-diff=color --ignore-all-space HEAD~1 -- koha-tmpl/intranet-tmpl/prog/en/modules/admin/smart-rules.tt 2. Observe only $ct has been added Sponsored-by: The National Library of Finland --- .../prog/en/modules/admin/smart-rules.tt | 388 +++++++++--------- 1 file changed, 194 insertions(+), 194 deletions(-) diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/admin/smart-rules.tt b/koha-tmpl/intranet-tmpl/prog/en/modules/admin/smart-rules.tt index 88919074c7..ed29b113f1 100644 --- a/koha-tmpl/intranet-tmpl/prog/en/modules/admin/smart-rules.tt +++ b/koha-tmpl/intranet-tmpl/prog/en/modules/admin/smart-rules.tt @@ -134,202 +134,202 @@ [% FOREACH c IN categorycodes %] [% SET c = '' UNLESS c.defined %] [% FOREACH i IN itemtypes %] - [% SET i = '' UNLESS i.defined %] - [% SET ct = '' UNLESS ct.defined %] - [% SET note = all_rules.$c.$i.note %] - [% SET maxissueqty = all_rules.$c.$i.maxissueqty %] - [% SET issuelength = all_rules.$c.$i.issuelength %] - [% SET daysmode = all_rules.$c.$i.daysmode %] - [% SET lengthunit = all_rules.$c.$i.lengthunit %] - [% SET hardduedate = all_rules.$c.$i.hardduedate %] - [% SET hardduedatecompare = all_rules.$c.$i.hardduedatecompare %] - [% SET fine = all_rules.$c.$i.fine %] - [% SET chargeperiod = all_rules.$c.$i.chargeperiod %] - [% SET chargeperiod_charge_at = all_rules.$c.$i.chargeperiod_charge_at %] - [% SET firstremind = all_rules.$c.$i.firstremind %] - [% SET overduefinescap = all_rules.$c.$i.overduefinescap %] - [% SET cap_fine_to_replacement_price = all_rules.$c.$i.cap_fine_to_replacement_price %] - [% SET finedays = all_rules.$c.$i.finedays %] - [% SET maxsuspensiondays = all_rules.$c.$i.maxsuspensiondays %] - [% SET suspension_chargeperiod = all_rules.$c.$i.suspension_chargeperiod %] - [% SET renewalsallowed = all_rules.$c.$i.renewalsallowed %] - [% SET renewalperiod = all_rules.$c.$i.renewalperiod %] - [% SET norenewalbefore = all_rules.$c.$i.norenewalbefore %] - [% SET auto_renew = all_rules.$c.$i.auto_renew %] - [% SET no_auto_renewal_after = all_rules.$c.$i.no_auto_renewal_after %] - [% SET no_auto_renewal_after_hard_limit = all_rules.$c.$i.no_auto_renewal_after_hard_limit %] - [% SET reservesallowed = all_rules.$c.$i.reservesallowed %] - [% SET holds_per_day = all_rules.$c.$i.holds_per_day %] - [% SET holds_per_record = all_rules.$c.$i.holds_per_record %] - [% SET onshelfholds = all_rules.$c.$i.onshelfholds %] - [% SET opacitemholds = all_rules.$c.$i.opacitemholds %] - [% SET article_requests = all_rules.$c.$i.article_requests %] - [% SET rentaldiscount = all_rules.$c.$i.rentaldiscount %] + [% SET i = '' UNLESS i.defined %] + [% SET ct = '' UNLESS ct.defined %] + [% SET note = all_rules.$c.$i.$ct.note %] + [% SET maxissueqty = all_rules.$c.$i.$ct.maxissueqty %] + [% SET issuelength = all_rules.$c.$i.$ct.issuelength %] + [% SET daysmode = all_rules.$c.$i.$ct.daysmode %] + [% SET lengthunit = all_rules.$c.$i.$ct.lengthunit %] + [% SET hardduedate = all_rules.$c.$i.$ct.hardduedate %] + [% SET hardduedatecompare = all_rules.$c.$i.$ct.hardduedatecompare %] + [% SET fine = all_rules.$c.$i.$ct.fine %] + [% SET chargeperiod = all_rules.$c.$i.$ct.chargeperiod %] + [% SET chargeperiod_charge_at = all_rules.$c.$i.$ct.chargeperiod_charge_at %] + [% SET firstremind = all_rules.$c.$i.$ct.firstremind %] + [% SET overduefinescap = all_rules.$c.$i.$ct.overduefinescap %] + [% SET cap_fine_to_replacement_price = all_rules.$c.$i.$ct.cap_fine_to_replacement_price %] + [% SET finedays = all_rules.$c.$i.$ct.finedays %] + [% SET maxsuspensiondays = all_rules.$c.$i.$ct.maxsuspensiondays %] + [% SET suspension_chargeperiod = all_rules.$c.$i.$ct.suspension_chargeperiod %] + [% SET renewalsallowed = all_rules.$c.$i.$ct.renewalsallowed %] + [% SET renewalperiod = all_rules.$c.$i.$ct.renewalperiod %] + [% SET norenewalbefore = all_rules.$c.$i.$ct.norenewalbefore %] + [% SET auto_renew = all_rules.$c.$i.$ct.auto_renew %] + [% SET no_auto_renewal_after = all_rules.$c.$i.$ct.no_auto_renewal_after %] + [% SET no_auto_renewal_after_hard_limit = all_rules.$c.$i.$ct.no_auto_renewal_after_hard_limit %] + [% SET reservesallowed = all_rules.$c.$i.$ct.reservesallowed %] + [% SET holds_per_day = all_rules.$c.$i.$ct.holds_per_day %] + [% SET holds_per_record = all_rules.$c.$ct.$i.holds_per_record %] + [% SET onshelfholds = all_rules.$c.$i.$ct.onshelfholds %] + [% SET opacitemholds = all_rules.$c.$i.$ct.opacitemholds %] + [% SET article_requests = all_rules.$c.$ct.$i.article_requests %] + [% SET rentaldiscount = all_rules.$c.$i.$ct.rentaldiscount %] - [% 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 %] - [% IF show_rule %] - [% SET row_count = row_count + 1 %] - - - [% IF ct == undef %] - All - [% ELSE %] - [% IF ct == 'CHECKOUT' %] - Normal checkout - [% ELSIF ct == 'ONSITE' %] - On-site checkout + [% 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 %] + [% IF show_rule %] + [% SET row_count = row_count + 1 %] + + + [% IF ct == undef %] + All + [% ELSE %] + [% IF ct == 'CHECKOUT' %] + Normal checkout + [% ELSIF ct == 'ONSITE' %] + On-site checkout + [% END %] [% END %] - [% END %] - - - [% IF c == undef %] - All - [% ELSE %] - [% Categories.GetName(c) | html %] - [% END %] - - - [% IF i == undef %] - All - [% ELSE %] - [% ItemTypes.GetDescription(i) | html %] - [% END %] - - - Edit - Delete - - - [% IF note.defined && note != '' %] - View note - [% ELSE %] [% END %] - - - [% IF maxissueqty.defined && maxissueqty != '' %] - [% maxissueqty | html %] - [% ELSE %] - Unlimited - [% END %] - - [% issuelength | html %] - - [% SWITCH daysmode %] - [% CASE 'Calendar' %]Calendar - [% CASE 'Datedue' %]Datedue - [% CASE 'Days' %]Days - [% CASE 'Dayweek' %]Dayweek - [% CASE %]Default - [% END %] - - - [% IF ( lengthunit == 'days' ) %] - Days - [% ELSIF ( lengthunit == 'hours') %] - Hours - [% ELSE %] - Undefined - [% END %] - - - [% IF ( hardduedate ) %] - [% IF ( hardduedatecompare == '-1' ) %] - before [% hardduedate | $KohaDates %] - - [% ELSIF ( hardduedatecompare == '0' ) %] - on [% hardduedate | $KohaDates %] - - [% ELSIF ( hardduedatecompare == '1' ) %] - after [% hardduedate | $KohaDates %] - - [% END %] - [% ELSE %] - None defined - [% END %] - - [% fine | html %] - [% chargeperiod | html %] - [% IF chargeperiod_charge_at %]Start of interval[% ELSE %]End of interval[% END %] - [% firstremind | html %] - [% overduefinescap FILTER format("%.2f") %] - - [% IF cap_fine_to_replacement_price %] - - [% ELSE %] - - [% END %] - - [% finedays | html %] - [% maxsuspensiondays | html %] - [% suspension_chargeperiod | html %] - [% renewalsallowed | html %] - [% renewalperiod | html %] - [% norenewalbefore | html %] - - [% IF auto_renew %] - Yes - [% ELSE %] - No - [% END %] - - [% no_auto_renewal_after | html %] - [% no_auto_renewal_after_hard_limit | $KohaDates %] - - [% IF reservesallowed.defined && reservesallowed != '' %] - [% reservesallowed | html %] - [% ELSE %] - Unlimited - [% END %] - - - [% IF holds_per_day.defined && holds_per_day != '' %] - [% holds_per_day | html %] - [% ELSE %] - Unlimited - [% END %] - - - [% IF holds_per_record.defined && holds_per_record != '' %] - [% holds_per_record | html %] - [% ELSE %] - Unlimited - [% END %] - - - [% IF onshelfholds == 1 %] - Yes - [% ELSIF onshelfholds == 2 %] - If all unavailable - [% ELSE %] - If any unavailable - [% END %] - - - [% IF opacitemholds == 'F'%] - Force - [% ELSIF opacitemholds == 'Y'%] - Allow - [% ELSE %] - Don't allow - [% END %] - - - [% IF article_requests == 'no' %] - No - [% ELSIF article_requests == 'yes' %] - Yes - [% ELSIF article_requests == 'bib_only' %] - Record only - [% ELSIF article_requests == 'item_only' %] - Item only - [% END %] - - [% rentaldiscount | html %] - - Edit - Delete - - - [% END %] + + + [% IF c == undef %] + All + [% ELSE %] + [% Categories.GetName(c) | html %] + [% END %] + + + [% IF i == undef %] + All + [% ELSE %] + [% ItemTypes.GetDescription(i) | html %] + [% END %] + + + Edit + Delete + + + [% IF note.defined && note != '' %] + View note + [% ELSE %] [% END %] + + + [% IF maxissueqty.defined && maxissueqty != '' %] + [% maxissueqty | html %] + [% ELSE %] + Unlimited + [% END %] + + [% issuelength | html %] + + [% SWITCH daysmode %] + [% CASE 'Calendar' %]Calendar + [% CASE 'Datedue' %]Datedue + [% CASE 'Days' %]Days + [% CASE 'Dayweek' %]Dayweek + [% CASE %]Default + [% END %] + + + [% IF ( lengthunit == 'days' ) %] + Days + [% ELSIF ( lengthunit == 'hours') %] + Hours + [% ELSE %] + Undefined + [% END %] + + + [% IF ( hardduedate ) %] + [% IF ( hardduedatecompare == '-1' ) %] + before [% hardduedate | $KohaDates %] + + [% ELSIF ( hardduedatecompare == '0' ) %] + on [% hardduedate | $KohaDates %] + + [% ELSIF ( hardduedatecompare == '1' ) %] + after [% hardduedate | $KohaDates %] + + [% END %] + [% ELSE %] + None defined + [% END %] + + [% fine | html %] + [% chargeperiod | html %] + [% IF chargeperiod_charge_at %]Start of interval[% ELSE %]End of interval[% END %] + [% firstremind | html %] + [% overduefinescap FILTER format("%.2f") %] + + [% IF cap_fine_to_replacement_price %] + + [% ELSE %] + + [% END %] + + [% finedays | html %] + [% maxsuspensiondays | html %] + [% suspension_chargeperiod | html %] + [% renewalsallowed | html %] + [% renewalperiod | html %] + [% norenewalbefore | html %] + + [% IF auto_renew %] + Yes + [% ELSE %] + No + [% END %] + + [% no_auto_renewal_after | html %] + [% no_auto_renewal_after_hard_limit | $KohaDates %] + + [% IF reservesallowed.defined && reservesallowed != '' %] + [% reservesallowed | html %] + [% ELSE %] + Unlimited + [% END %] + + + [% IF holds_per_day.defined && holds_per_day != '' %] + [% holds_per_day | html %] + [% ELSE %] + Unlimited + [% END %] + + + [% IF holds_per_record.defined && holds_per_record != '' %] + [% holds_per_record | html %] + [% ELSE %] + Unlimited + [% END %] + + + [% IF onshelfholds == 1 %] + Yes + [% ELSIF onshelfholds == 2 %] + If all unavailable + [% ELSE %] + If any unavailable + [% END %] + + + [% IF opacitemholds == 'F'%] + Force + [% ELSIF opacitemholds == 'Y'%] + Allow + [% ELSE %] + Don't allow + [% END %] + + + [% IF article_requests == 'no' %] + No + [% ELSIF article_requests == 'yes' %] + Yes + [% ELSIF article_requests == 'bib_only' %] + Record only + [% ELSIF article_requests == 'item_only' %] + Item only + [% END %] + + [% rentaldiscount | html %] + + Edit + Delete + + + [% END %] [% END %] [% END %] [% END %] -- 2.17.1