Bugzilla – Attachment 3246 Details for
Bug 5824
Creating a circ rule for a library other than default causes set library anomalies
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
patch
bug5824.patch (text/plain), 8.29 KB, created by
Nicole C. Engard
on 2011-03-04 00:31:56 UTC
(
hide
)
Description:
patch
Filename:
MIME Type:
Creator:
Nicole C. Engard
Created:
2011-03-04 00:31:56 UTC
Size:
8.29 KB
patch
obsolete
>From: Ian Walls <ian.walls@bywatersolutions.com> >To: dev@bywatersolutions.com >Cc: Ian Walls <ian.walls@bywatersolutions.com> >Subject: [PATCH] Bug 5824: Creating a circ rule for a specific library causes anomalies >Date: Thu, 3 Mar 2011 13:32:22 -0500 >Message-Id: <1299177142-23115-1-git-send-email-ian.walls@bywatersolutions.com> >X-Mailer: git-send-email 1.5.6.5 >X-Original-Sender: ian.walls@bywatersolutions.com >X-Original-Authentication-Results: mx.google.com; spf=pass (google.com: best > guess record for domain of koha@dev.bywatersolutions.com designates > 174.143.239.187 as permitted sender) smtp.mail=koha@dev.bywatersolutions.com >X-Google-Group-Id: 274270250429 >Precedence: list >Mailing-list: list dev@bywatersolutions.com; contact dev+owners@bywatersolutions.com >List-ID: <dev.bywatersolutions.com> >List-Help: <http://www.google.com/support/a/bywatersolutions.com/bin/static.py?hl=en_US&page=groups.cs>, > <mailto:dev+help@bywatersolutions.com> >Content-Type: text/plain; charset="utf-8" > >The variable name for the current branch being edited was the same as the variable used in >cat-search.inc, which passed along the circ-rule library to circulation.pl, and then overriding >the set library from there. > >This patch renames the template variable 'current_branch', so that it does not populate the 'branch' >param in cat-search.inc >--- > admin/smart-rules.pl | 2 +- > .../prog/en/modules/admin/smart-rules.tmpl | 19 ++++++++++--------- > 2 files changed, 11 insertions(+), 10 deletions(-) > >diff --git a/admin/smart-rules.pl b/admin/smart-rules.pl >index fdd9b91..d015ec2 100755 >--- a/admin/smart-rules.pl >+++ b/admin/smart-rules.pl >@@ -481,7 +481,7 @@ $template->param(categoryloop => \@category_loop, > rules => \@sorted_row_loop, > branchloop => \@branchloop, > humanbranch => ($branch ne '*' ? $branches->{$branch}->{branchname} : ''), >- branch => $branch, >+ current_branch => $branch, > definedbranch => scalar(@sorted_row_loop)>0 > ); > output_html_with_http_headers $input, $cookie, $template->output; >diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/admin/smart-rules.tmpl b/koha-tmpl/intranet-tmpl/prog/en/modules/admin/smart-rules.tmpl >index eaa0d43..92a44ce 100644 >--- a/koha-tmpl/intranet-tmpl/prog/en/modules/admin/smart-rules.tmpl >+++ b/koha-tmpl/intranet-tmpl/prog/en/modules/admin/smart-rules.tmpl >@@ -56,7 +56,8 @@ $(document).ready(function() { > <!-- /TMPL_LOOP --> > </select> > </form> >-<!-- TMPL_IF Name="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="<!-- TMPL_VAR NAME="branch" -->" /> >+<!-- TMPL_IF Name="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="<!-- TMPL_VAR NAME="current_branch" -->" /> > <select name="tobranch" id="tobranch"><!-- TMPL_LOOP NAME="branchloop" --><option value="<!-- TMPL_VAR NAME="value" -->"><!-- TMPL_VAR NAME="branchname" --></option><!-- /TMPL_LOOP --></select> <input type="submit" value="Clone" /></form><!-- /TMPL_IF --></fieldset> > > <form method="post" action="/cgi-bin/koha/admin/smart-rules.pl"> >@@ -109,7 +110,7 @@ $(document).ready(function() { > <td><!-- TMPL_VAR NAME="reservesallowed" --></td> > <td><!-- TMPL_VAR NAME="rentaldiscount" --></td> > <td> >- <a class="button" href="/cgi-bin/koha/admin/smart-rules.pl?op=delete&itemtype=<!-- TMPL_VAR NAME="itemtype" -->&categorycode=<!-- TMPL_VAR NAME="categorycode" -->&branch=<!-- TMPL_VAR NAME="branch" -->">Delete</a> >+ <a class="button" href="/cgi-bin/koha/admin/smart-rules.pl?op=delete&itemtype=<!-- TMPL_VAR NAME="itemtype" -->&categorycode=<!-- TMPL_VAR NAME="categorycode" -->&branch=<!-- TMPL_VAR NAME="current_branch" -->">Delete</a> > </td> > </tr> > <!-- /TMPL_LOOP --> >@@ -139,7 +140,7 @@ $(document).ready(function() { > <td><input name="renewalsallowed" size="2" /></td> > <td><input name="reservesallowed" size="2" /></td> > <td><input name="rentaldiscount" size="2" /></td> >- <td><input type="hidden" name="branch" value="<!-- TMPL_VAR NAME="branch" -->"/><input type="submit" value="Add" class="submit" /></td> >+ <td><input type="hidden" name="branch" value="<!-- TMPL_VAR NAME="current_branch" -->"/><input type="submit" value="Add" class="submit" /></td> > </tr> > </table> > </form> >@@ -149,7 +150,7 @@ $(document).ready(function() { > <p>You can set a default maximum number of checkouts and hold policy that will be used if none is defined below for a particular item type or category.</p> > <form method="post" action="/cgi-bin/koha/admin/smart-rules.pl"> > <input type="hidden" name="op" value="set-branch-defaults" /> >- <input type="hidden" name="branch" value="<!-- TMPL_VAR NAME="branch" -->"/> >+ <input type="hidden" name="branch" value="<!-- TMPL_VAR NAME="current_branch" -->"/> > <table> > <tr> > <th> </th> >@@ -188,7 +189,7 @@ $(document).ready(function() { > </td> > <td><input type="submit" value="Save" class="submit" /></td> > <td> >- <a class="button" href="/cgi-bin/koha/admin/smart-rules.pl?op=delete-branch-cat&categorycode=*&branch=<!-- TMPL_VAR NAME="branch" -->">Unset</a> >+ <a class="button" href="/cgi-bin/koha/admin/smart-rules.pl?op=delete-branch-cat&categorycode=*&branch=<!-- TMPL_VAR NAME="current_branch" -->">Unset</a> > </td> > </tr> > </table> >@@ -205,7 +206,7 @@ $(document).ready(function() { > </p> > <form method="post" action="/cgi-bin/koha/admin/smart-rules.pl"> > <input type="hidden" name="op" value="add-branch-cat" /> >- <input type="hidden" name="branch" value="<!-- TMPL_VAR NAME="branch" -->"/> >+ <input type="hidden" name="branch" value="<!-- TMPL_VAR NAME="current_branch" -->"/> > <table> > <tr> > <th>Patron Category</th> >@@ -231,7 +232,7 @@ $(document).ready(function() { > <!-- /TMPL_IF --> > </td> > <td> >- <a class="button" href="/cgi-bin/koha/admin/smart-rules.pl?op=delete-branch-cat&categorycode=<!-- TMPL_VAR NAME="categorycode" -->&branch=<!-- TMPL_VAR NAME="branch" -->">Delete</a> >+ <a class="button" href="/cgi-bin/koha/admin/smart-rules.pl?op=delete-branch-cat&categorycode=<!-- TMPL_VAR NAME="categorycode" -->&branch=<!-- TMPL_VAR NAME="current_branch" -->">Delete</a> > </td> > </tr> > <!-- /TMPL_LOOP --> >@@ -274,7 +275,7 @@ $(document).ready(function() { > > <form method="post" action="/cgi-bin/koha/admin/smart-rules.pl"> > <input type="hidden" name="op" value="add-branch-item" /> >- <input type="hidden" name="branch" value="<!-- TMPL_VAR NAME="branch" -->"/> >+ <input type="hidden" name="branch" value="<!-- TMPL_VAR NAME="current_branch" -->"/> > <table> > <tr> > <th>Item Type</th> >@@ -302,7 +303,7 @@ $(document).ready(function() { > <!-- /TMPL_IF --> > </td> > <td> >- <a class="button" href="/cgi-bin/koha/admin/smart-rules.pl?op=delete-branch-item&itemtype=<!-- TMPL_VAR NAME="itemtype" -->&branch=<!-- TMPL_VAR NAME="branch" -->">Delete</a> >+ <a class="button" href="/cgi-bin/koha/admin/smart-rules.pl?op=delete-branch-item&itemtype=<!-- TMPL_VAR NAME="itemtype" -->&branch=<!-- TMPL_VAR NAME="current_branch" -->">Delete</a> > </td> > </tr> > <!-- /TMPL_LOOP --> >-- >1.5.6.5 >
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 5824
: 3246