Bugzilla – Attachment 50417 Details for
Bug 15456
Fix tabs and inconsistent indentation in smart-rules.tt
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
[SIGNED-OFF] Bug 15456: Fix tabs and inconsistent indentation in smart-rules.tt
SIGNED-OFF-Bug-15456-Fix-tabs-and-inconsistent-ind.patch (text/plain), 15.88 KB, created by
Owen Leonard
on 2016-04-19 14:48:52 UTC
(
hide
)
Description:
[SIGNED-OFF] Bug 15456: Fix tabs and inconsistent indentation in smart-rules.tt
Filename:
MIME Type:
Creator:
Owen Leonard
Created:
2016-04-19 14:48:52 UTC
Size:
15.88 KB
patch
obsolete
>From 38fd2a3dce5d8873985c1d4eb4c0724cc772139a Mon Sep 17 00:00:00 2001 >From: Jesse Weaver <jweaver@bywatersolutions.com> >Date: Thu, 31 Dec 2015 12:48:01 -0700 >Subject: [PATCH] [SIGNED-OFF] Bug 15456: Fix tabs and inconsistent indentation > in smart-rules.tt >Content-Type: text/plain; charset="utf-8" > >To verify patch, run `git diff -w HEAD^' and note that the only changes >shown are where [% IF %] statements are expanded/unexpanded onto >multiple lines to match the prevailing style. > >Signed-off-by: Bernardo Gonzalez Kriegel <bgkriegel@gmail.com> >Looks like refactoring :) >No regressions, no koha-qa errors > >Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com> >Signed-off-by: Owen Leonard <oleonard@myacpl.org> >--- > .../prog/en/modules/admin/smart-rules.tt | 190 +++++++++++---------- > 1 file changed, 96 insertions(+), 94 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 c7e27ad..aa8d679 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 >@@ -135,12 +135,12 @@ $(document).ready(function() { > Select a library : > <select name="branch" id="branch" style="width:20em;"> > <option value="*">All libraries</option> >- [% FOREACH branchloo IN branchloop %] >- [% IF ( branchloo.selected ) %]<option value="[% branchloo.value %]" selected="selected">[% branchloo.branchname %]</option>[% ELSE %]<option value="[% branchloo.value %]">[% branchloo.branchname %]</option>[% END %] >- [% END %] >+ [% FOREACH branchloo IN branchloop %] >+ [% IF ( branchloo.selected ) %]<option value="[% branchloo.value %]" selected="selected">[% branchloo.branchname %]</option>[% ELSE %]<option value="[% branchloo.value %]">[% branchloo.branchname %]</option>[% END %] >+ [% END %] > </select> > </form> >-[% IF ( definedbranch ) %]<form action="/cgi-bin/koha/admin/clone-rules.pl" method="post"><label >+[% IF ( definedbranch ) %]<form action="/cgi-bin/koha/admin/clone-rules.pl" method="post"><label > for="tobranch"><strong>Clone these rules to:</strong></label> <input type="hidden" name="frombranch" value="[% current_branch %]" /> > <select name="tobranch" id="tobranch">[% FOREACH branchloo IN branchloop %]<option value="[% branchloo.value %]">[% branchloo.branchname %]</option>[% END %]</select> <input type="submit" value="Clone" /></form>[% END %] > >@@ -177,101 +177,97 @@ for="tobranch"><strong>Clone these rules to:</strong></label> <input type="hidde > </tr> > </thead> > <tbody> >- [% FOREACH rule IN rules %] >- <tr id="row_[% loop.count %]"> >- <td>[% IF ( rule.default_humancategorycode ) %] >- <em>All</em> >- [% ELSE %] >- [% rule.humancategorycode %] >- [% END %] >- </td> >- <td>[% IF rule.default_translated_description %] >- <em>All</em> >- [% ELSE %] >- [% rule.translated_description %] >- [% END %] >- </td> >- <td>[% IF ( rule.unlimited_maxissueqty ) %] >- Unlimited >- [% ELSE %] >- [% rule.maxissueqty %] >- [% END %] >- </td> >- <td>[% IF rule.unlimited_maxonsiteissueqty %] >- Unlimited >- [% ELSE %] >- [% rule.maxonsiteissueqty %] >- [% END %] >- </td> >- <td>[% rule.issuelength %]</td> >- <td> >- [% rule.lengthunit %] >- </td> >- <td> >- [% IF ( rule.hardduedate ) %] >+ [% FOREACH rule IN rules %] >+ <tr id="row_[% loop.count %]"> >+ <td> >+ [% IF ( rule.default_humancategorycode ) %] >+ <em>All</em> >+ [% ELSE %] >+ [% rule.humancategorycode %] >+ [% END %] >+ </td> >+ <td> >+ [% IF rule.default_translated_description %] >+ <em>All</em> >+ [% ELSE %] >+ [% rule.translated_description %] >+ [% END %] >+ </td> >+ <td> >+ [% IF ( rule.unlimited_maxissueqty ) %] >+ Unlimited >+ [% ELSE %] >+ [% rule.maxissueqty %] >+ [% END %] >+ </td> >+ <td> >+ [% IF rule.unlimited_maxonsiteissueqty %] >+ Unlimited >+ [% ELSE %] >+ [% rule.maxonsiteissueqty %] >+ [% END %] >+ </td> >+ <td>[% rule.issuelength %]</td> >+ <td>[% rule.lengthunit %]</td> >+ <td> >+ [% IF ( rule.hardduedate ) %] > [% IF ( rule.hardduedatebefore ) %] >- before [% rule.hardduedate %] >- <input type="hidden" name="hardduedatecomparebackup" value="-1" /> >+ before [% rule.hardduedate %] >+ <input type="hidden" name="hardduedatecomparebackup" value="-1" /> > [% ELSIF ( rule.hardduedateexact ) %] >- on [% rule.hardduedate %] >- <input type="hidden" name="hardduedatecomparebackup" value="0" /> >+ on [% rule.hardduedate %] >+ <input type="hidden" name="hardduedatecomparebackup" value="0" /> > [% ELSIF ( rule.hardduedateafter ) %] >- after [% rule.hardduedate %] >- <input type="hidden" name="hardduedatecomparebackup" value="1" /> >+ after [% rule.hardduedate %] >+ <input type="hidden" name="hardduedatecomparebackup" value="1" /> > [% END %] >- [% ELSE %] >+ [% ELSE %] > None defined >- [% END %] >- </td> >- <td>[% rule.fine %]</td> >- <td>[% rule.chargeperiod %]</td> >- <td>[% IF rule.chargeperiod_charge_at %]Start of interval[% ELSE %]End of interval[% END %]</td> >- <td>[% rule.firstremind %]</td> >- <td>[% rule.overduefinescap FILTER format("%.2f") %]</td> >- <td> >- [% IF rule.cap_fine_to_replacement_price %] >- <input type="checkbox" checked="checked" disabled="disabled" /> >- [% ELSE %] >- <input type="checkbox" disabled="disabled" /> >- [% END %] >- </td> >- <td>[% rule.finedays %]</td> >- <td>[% rule.maxsuspensiondays %]</td> >- <td>[% rule.renewalsallowed %]</td> >- <td>[% rule.renewalperiod %]</td> >- <td>[% rule.norenewalbefore %]</td> >- <td> >- [% IF ( rule.auto_renew ) %] >- Yes >- [% ELSE %] >- No >- [% END %] >- </td> >- <td>[% rule.reservesallowed %]</td> >- <td>[% IF rule.onshelfholds %]Yes[% ELSE %]No[% END %]</td> >- <td>[% IF rule.opacitemholds == 'F'%]Force[% ELSIF rule.opacitemholds == 'Y'%]Allow[% ELSE %]Don't allow[% END %]</td> >- <td>[% rule.rentaldiscount %]</td> >- <td><a href="#" class="editrule">Edit</a></td> >- <td> >- <a class="button" href="/cgi-bin/koha/admin/smart-rules.pl?op=delete&itemtype=[% rule.itemtype %]&categorycode=[% rule.categorycode %]&branch=[% rule.current_branch %]">Delete</a> >- </td> >- </tr> >- [% END %] >+ [% END %] >+ </td> >+ <td>[% rule.fine %]</td> >+ <td>[% rule.chargeperiod %]</td> >+ <td>[% IF rule.chargeperiod_charge_at %]Start of interval[% ELSE %]End of interval[% END %]</td> >+ <td>[% rule.firstremind %]</td> >+ <td>[% rule.overduefinescap FILTER format("%.2f") %]</td> >+ <td> >+ [% IF rule.cap_fine_to_replacement_price %] >+ <input type="checkbox" checked="checked" disabled="disabled" /> >+ [% ELSE %] >+ <input type="checkbox" disabled="disabled" /> >+ [% END %] >+ </td> >+ <td>[% rule.finedays %]</td> >+ <td>[% rule.maxsuspensiondays %]</td> >+ <td>[% rule.renewalsallowed %]</td> >+ <td>[% rule.renewalperiod %]</td> >+ <td>[% rule.norenewalbefore %]</td> >+ <td>[% IF ( rule.auto_renew ) %]Yes[% ELSE %]No[% END %]</td> >+ <td>[% rule.reservesallowed %]</td> >+ <td>[% IF rule.onshelfholds %]Yes[% ELSE %]No[% END %]</td> >+ <td>[% IF rule.opacitemholds == 'F'%]Force[% ELSIF rule.opacitemholds == 'Y'%]Allow[% ELSE %]Don't allow[% END %]</td> >+ <td>[% rule.rentaldiscount %]</td> >+ <td><a href="#" class="editrule">Edit</a></td> >+ <td> >+ <a class="button" href="/cgi-bin/koha/admin/smart-rules.pl?op=delete&itemtype=[% rule.itemtype %]&categorycode=[% rule.categorycode %]&branch=[% rule.current_branch %]">Delete</a> >+ </td> >+ </tr> >+ [% END %] > <tr id="edit_row"> > <td> > <select name="categorycode" id="categorycode"> > <option value="*">All</option> >- [% FOREACH categoryloo IN categoryloop %] >- <option value="[% categoryloo.categorycode %]">[% categoryloo.description %]</option> >- [% END %] >+ [% FOREACH categoryloo IN categoryloop %] >+ <option value="[% categoryloo.categorycode %]">[% categoryloo.description %]</option> >+ [% END %] > </select> > </td> > <td> > <select name="itemtype" id="matrixitemtype" style="width:13em;"> > <option value="*">All</option> >- [% FOREACH itemtypeloo IN itemtypeloop %] >- <option value="[% itemtypeloo.itemtype %]">[% itemtypeloo.translated_description %]</option> >- [% END %] >+ [% FOREACH itemtypeloo IN itemtypeloop %] >+ <option value="[% itemtypeloo.itemtype %]">[% itemtypeloo.translated_description %]</option> >+ [% END %] > </select> > </td> > <td><input type="text" name="maxissueqty" id="maxissueqty" size="3" /></td> >@@ -470,19 +466,22 @@ for="tobranch"><strong>Clone these rules to:</strong></label> <input type="hidde > [% ELSE %] > <tr> > [% END %] >- <td>[% IF ( branch_cat_rule_loo.default_humancategorycode ) %] >+ <td> >+ [% IF ( branch_cat_rule_loo.default_humancategorycode ) %] > <em>Default</em> > [% ELSE %] > [% branch_cat_rule_loo.humancategorycode %] > [% END %] > </td> >- <td>[% IF ( branch_cat_rule_loo.unlimited_maxissueqty ) %] >+ <td> >+ [% IF ( branch_cat_rule_loo.unlimited_maxissueqty ) %] > Unlimited > [% ELSE %] > [% branch_cat_rule_loo.maxissueqty %] > [% END %] > </td> >- <td>[% IF ( branch_cat_rule_loo.unlimited_maxonsiteissueqty ) %] >+ <td> >+ [% IF ( branch_cat_rule_loo.unlimited_maxonsiteissueqty ) %] > Unlimited > [% ELSE %] > [% branch_cat_rule_loo.maxonsiteissueqty %] >@@ -497,9 +496,9 @@ for="tobranch"><strong>Clone these rules to:</strong></label> <input type="hidde > <tr> > <td> > <select name="categorycode"> >- [% FOREACH categoryloo IN categoryloop %] >- <option value="[% categoryloo.categorycode %]">[% categoryloo.description %]</option> >- [% END %] >+ [% FOREACH categoryloo IN categoryloop %] >+ <option value="[% categoryloo.categorycode %]">[% categoryloo.description %]</option> >+ [% END %] > </select> > </td> > <td><input name="maxissueqty" size="3" /></td> >@@ -545,13 +544,15 @@ for="tobranch"><strong>Clone these rules to:</strong></label> <input type="hidde > [% ELSE %] > <tr> > [% END %] >- <td>[% IF ( branch_item_rule_loo.default_translated_description ) %] >+ <td> >+ [% IF ( branch_item_rule_loo.default_translated_description ) %] > <em>Default</em> > [% ELSE %] > [% branch_item_rule_loo.translated_description %] > [% END %] > </td> >- <td>[% IF ( branch_item_rule_loo.holdallowed_any ) %] >+ <td> >+ [% IF ( branch_item_rule_loo.holdallowed_any ) %] > From any library > [% ELSIF ( branch_item_rule_loo.holdallowed_same ) %] > From home library >@@ -559,7 +560,8 @@ for="tobranch"><strong>Clone these rules to:</strong></label> <input type="hidde > No holds allowed > [% END %] > </td> >- <td>[% IF ( branch_item_rule_loo.returnbranch == 'homebranch' ) %] >+ <td> >+ [% IF ( branch_item_rule_loo.returnbranch == 'homebranch' ) %] > Item returns home > [% ELSIF ( branch_item_rule_loo.returnbranch == 'holdingbranch' ) %] > Item returns to issuing branch >-- >2.1.4
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Diff
|
Splinter Review
Attachments on
bug 15456
:
46161
|
46241
|
46453
|
50364
| 50417