# Suite 330, Boston, MA 02111-1307 USA
use strict;
+use warnings;
+
use CGI;
use C4::Auth;
use C4::Context;
use C4::Output;
use C4::Koha;
use C4::Branch;
+use C4::Circulation qw{ IsBranchTransferAllowed DeleteBranchTransferLimits CreateBranchTransferLimit };
my $input = new CGI;
}
## Build the default data
-my @loop0;
+my @itemtypes_loop;
foreach my $itemtype ( @itemtypes ) {
- my @loop1;
+ my @to_branch_loop;
my %row_data;
$row_data{ itemtype } = $itemtype;
- $row_data{ loop1 } = \@loop1;
+ $row_data{ to_branch_loop } = \@to_branch_loop;
foreach my $toBranch ( @branchcodes ) {
- my @loop2;
+ my @from_branch_loop;
my %row_data;
$row_data{ itemtype } = $itemtype;
$row_data{ toBranch } = $toBranch;
- $row_data{ loop2 } = \@loop2;
+ $row_data{ from_branch_loop } = \@from_branch_loop;
foreach my $fromBranch ( @branchcodes ) {
my %row_data;
$row_data{ fromBranch } = $fromBranch;
$row_data{ isChecked } = $isChecked;
- push( @loop2, \%row_data );
+ push( @from_branch_loop, \%row_data );
}
- push( @loop1, \%row_data );
+ push( @to_branch_loop, \%row_data );
}
- push( @loop0, \%row_data );
+ push( @itemtypes_loop, \%row_data );
}
$template->param(
- loop0 => \@loop0,
+ itemtypes_loop => \@itemtypes_loop,
branchcode_loop => \@branchcode_loop,
- intranetcolorstylesheet => C4::Context->preference("intranetcolorstylesheet"),
- intranetstylesheet => C4::Context->preference("intranetstylesheet"),
- IntranetNav => C4::Context->preference("IntranetNav"),
);
output_html_with_http_headers $input, $cookie, $template->output;
<dd>Define extended attributes (identifiers and statistical categories) for patron records</dd>
<dt><a href="/cgi-bin/koha/admin/smart-rules.pl">Circulation and fines rules</a></dt>
<dd>Define circulation and fines rules for combinations of libraries, patron categories, and item types</dd>
- <dt><a href="/cgi-bin/koha/admin/branch_transfer_limits.pl">Branch Transfer Limits</a></dt>
- <dd>Limit the ability to transfer items between libraries based on the branch sending, the brand recieving, and the itemtype involved. These rules only go into effect if the preference UseBranchTransferLimits is set to ON.</dd>
+ <dt><a href="/cgi-bin/koha/admin/branch_transfer_limits.pl">Library Transfer Limits</a></dt>
+ <dd>Limit the ability to transfer items between libraries based on the library sending, the library receiving, and the item type involved. These rules only go into effect if the preference UseBranchTransferLimits is set to ON.</dd>
</dl>
</div>
<!-- TMPL_INCLUDE NAME="doc-head-open.inc" -->
-<title>Koha › Administration › Set Branch Transfer Limits</title>
+<title>Koha › Administration › Library Transfer Limits</title>
<script language="JavaScript" type="text/javascript">
function SwitchAll() {
count = document.mainform.elements.length;
<!-- TMPL_INCLUDE NAME="header.inc" -->
<!-- TMPL_INCLUDE NAME="cat-search.inc" -->
-<div id="breadcrumbs"><a href="/cgi-bin/koha/mainpage.pl">Home</a> › <a href="/cgi-bin/koha/admin/admin-home.pl">Administration</a> › Set Branch Transfer Limits</div>
+<div id="breadcrumbs"><a href="/cgi-bin/koha/mainpage.pl">Home</a> › <a href="/cgi-bin/koha/admin/admin-home.pl">Administration</a> › Set Library Transfer Limits</div>
- <div id="main">
+<div id="doc3" class="yui-t1">
+
+<div id="bd">
+ <div id="yui-main">
+ <div class="yui-b">
+
+<div id="toolbar">
+ <script type="text/javascript">
+ //<![CDATA[
+ // prepare DOM for YUI Toolbar
+ $(document).ready(function() {
+ yuiToolbar();
+ });
+ // YUI Toolbar Functions
+ function yuiToolbar() {
+ new YAHOO.widget.Button("CheckAll").addListener('click', CheckAll);
+ new YAHOO.widget.Button("UncheckAll").addListener('click', UncheckAll);
+ new YAHOO.widget.Button("SwapAll").addListener('click',SwitchAll);
+ } //]]>
+ </script>
+ <ul class="toolbar">
+ <li><a id="CheckAll" href="#">Check All</a></li>
+ <li><a id="UncheckAll" href="#">Uncheck All</a></li>
+ <li><a id="SwapAll" href="#">Swap All</a></li>
+</ul></div>
+
+<h1 class="parameters">Library Transfer Limits</h1>
+<div class="help">Check the boxes for the items that should <em>not</em> be transferable.</div>
-<p>Check the boxes for the items that should <i>not</i> be transferable.</p>
-<p>
-<input type=button name="CheckAll" value="Check All" onClick="CheckAll()">
-<input type=button name="UncheckAll" value="Uncheck All" onClick="UncheckAll()"
-<input type=button name="SwapAll" value="Swap All" onClick="SwitchAll()">
-</p>
<div class="table">
<form name="mainform" method="post" action="branch_transfer_limits.pl">
<table>
<thead>
<tr>
<th>To/From</th>
- <TMPL_LOOP NAME="branchcode_loop">
+ <!-- TMPL_LOOP NAME="branchcode_loop" -->
<th><TMPL_VAR NAME="branchcode"></th>
- </TMPL_LOOP>
+ <!-- /TMPL_LOOP -->
</tr>
</thead>
<tbody>
- <TMPL_LOOP NAME="itemtypes_loop">
- <tr><th>Limits for Item Type: <TMPL_VAR NAME="itemtype"></th></tr>
+ <!-- TMPL_LOOP NAME="itemtypes_loop" -->
+ <tr><th>Limits for Item Type: <!-- TMPL_VAR NAME="itemtype" --></th></tr>
- <TMPL_LOOP NAME="to_branch_loop">
+ <!-- TMPL_LOOP NAME="to_branch_loop" -->
<tr>
- <td><TMPL_VAR NAME="toBranch"></td>
- <TMPL_LOOP NAME="from_branc_loop">
+ <td><!-- TMPL_VAR NAME="toBranch" --></td>
+ <!-- TMPL_LOOP NAME="from_branch_loop" -->
<td>
<input
- name="<TMPL_VAR NAME="itemtype">_<TMPL_VAR NAME="toBranch">_<TMPL_VAR NAME="fromBranch">"
+ name="<!-- TMPL_VAR NAME="itemtype" -->_<!-- TMPL_VAR NAME="toBranch" -->_<!-- TMPL_VAR NAME="fromBranch" -->"
type="checkbox"
value="1"
- <TMPL_IF NAME="isChecked">checked</TMPL_IF>
- >
+ <!-- TMPL_IF NAME="isChecked" -->checked="checked"<!-- /TMPL_IF -->
+ />
</td>
- </TMPL_LOOP>
- <tr>
- </TMPL_LOOP>
- </TMPL_LOOP>
+ <!-- /TMPL_LOOP -->
+ </tr>
+ <!-- /TMPL_LOOP -->
+ <!-- /TMPL_LOOP -->
</tbody>
</table>
- <input type="hidden" name="updateLimits" value="1">
- <input type="submit" value="Save Data">
+ <input type="hidden" name="updateLimits" value="1" />
+ <input type="submit" value="Save Data" />
</form>
</div>
- </div>
- </dd>
- </dl>
-</body>
-</html>
+ </div>
+</div>
+<div class="yui-b">
+ <!-- TMPL_INCLUDE NAME="admin-menu.inc" -->
+</div>
+</div>
+<!-- TMPL_INCLUDE NAME="intranet-bottom.inc" -->