Owen Leonard
377f174b06
- Changing library select form so that chosen library is preselected - Changing pager <form> to a <p> so that nested form tags don't conflict. It was the addition of the javascript table pager which broke the functionality on this page. Signed-off-by: Katrin Fischer <Katrin.Fischer.83@web.de> - It's possible to select a different library now. The pull down shows the chosen library correctly. - I can make changes and save them without any problems. Signed-off-by: Ian Walls <ian.walls@bywatersolutions.com> Signed-off-by: Chris Cormack <chrisc@catalyst.net.nz>
164 lines
6.3 KiB
Text
164 lines
6.3 KiB
Text
[% INCLUDE 'doc-head-open.inc' %]
|
|
<title>Koha › Administration › Library Checkin and Transfer Policy</title>
|
|
[% INCLUDE 'doc-head-close.inc' %]
|
|
<script type="text/javascript" src="[% themelang %]/lib/jquery/plugins/jquery.tablesorter.min.js"></script>
|
|
<script type="text/javascript" src="[% themelang %]/lib/jquery/plugins/jquery.tablesorter.pager.js"></script>
|
|
<script type="text/javascript" src="[% themelang %]/lib/jquery/plugins/jquery.checkboxes.min.js"></script>
|
|
<script type="text/javascript">
|
|
$(document).ready(function(){
|
|
$("#CheckAll").click(function(){ $("#transferlimit_tabs").checkCheckboxes();});
|
|
$("#UncheckAll").click(function(){ $("#transferlimit_tabs").unCheckCheckboxes();});
|
|
$("#SwapAll").click(function(){ $("#transferlimit_tabs").toggleCheckboxes();});
|
|
$('#transferlimit_tabs > ul').tabs();
|
|
|
|
$('#branchselect').change(function() {
|
|
$('#selectlibrary').submit();
|
|
});
|
|
|
|
|
|
var checkcolumn = $(".checkcolumn");
|
|
var checkrow = $(".checkrow");
|
|
var checkall = $(".checkall");
|
|
var uncheckall = $(".uncheckall");
|
|
|
|
$(checkcolumn).click(function(){
|
|
if(this.checked){ status = "checked" } else { status = "" }
|
|
var tableid = $(this).parent().parent().parent().parent().attr("id");
|
|
var columncontext = $(this).parent();
|
|
var tdindex = columncontext.parent().children().index(columncontext);
|
|
$("#"+tableid+" tr td:nth-child("+(tdindex+2)+") input[type='checkbox']").attr("checked",status);
|
|
});
|
|
|
|
$(checkrow).click(function(){
|
|
if(this.checked){ status = "checked" } else { status = "" }
|
|
$(this).parent().siblings().each(function(){
|
|
$(this).find("input[type='checkbox']").attr("checked",status);
|
|
})
|
|
});
|
|
|
|
$(checkall).click(function(){
|
|
var tid = $(this).attr("id");
|
|
tid = tid.replace("CheckAll","");
|
|
$("#"+tid).checkCheckboxes();
|
|
return false;
|
|
});
|
|
|
|
$(uncheckall).click(function(){
|
|
var tid = $(this).attr("id");
|
|
tid = tid.replace("UncheckAll","");
|
|
$("#"+tid).unCheckCheckboxes();
|
|
return false;
|
|
});
|
|
|
|
});
|
|
</script>
|
|
<style type="text/css">td { text-align: center; }</style>
|
|
</head>
|
|
<body>
|
|
[% INCLUDE 'header.inc' %]
|
|
[% INCLUDE '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 Library Checkin and Transfer Policy</div>
|
|
|
|
<div id="doc3" class="yui-t1">
|
|
|
|
<div id="bd">
|
|
<div id="yui-main">
|
|
<div class="yui-b">
|
|
|
|
<h1>Library [% branchcode %] - [% branchname %] Checkin and Transfer Policy</h1>
|
|
<form method="get" action="/cgi-bin/koha/admin/branch_transfer_limits.pl" id="selectlibrary">
|
|
<label for="branchselect">Select a library :</label>
|
|
<select name="branchcode" id="branchselect">
|
|
[% FOREACH branch_loo IN branch_loop %]
|
|
[% IF ( branch_loo.selected ) %]
|
|
<option value="[% branch_loo.value %]" selected="selected">[% branch_loo.branchname %]</option>
|
|
[% ELSE %]
|
|
<option value="[% branch_loo.value %]">[% branch_loo.branchname %]</option>
|
|
[% END %]
|
|
[% END %]
|
|
</select>
|
|
<input type="submit" value="Choose" />
|
|
</form>
|
|
|
|
<p class="help">Check the boxes for the libraries you accept to checkin items from.</p>
|
|
<fieldset>For <strong>all</strong> [% limit_phrase %]s: <a id="CheckAll" href="#">Check All</a> | <a id="UncheckAll" href="#">Uncheck All</a></fieldset>
|
|
|
|
|
|
<div id="transferlimit_tabs" class="toptabs">
|
|
<ul class="ui-tabs-nav">
|
|
[% FOREACH codes_loo IN codes_loop %]<li><a href="#[% codes_loo.code %]set">[% codes_loo.code %]</a></li>[% END %]
|
|
</ul>
|
|
|
|
<form method="post" action="branch_transfer_limits.pl">
|
|
|
|
[% FOREACH codes_loo IN codes_loop %]
|
|
<div id="[% codes_loo.code %]set">
|
|
<h4>Policy for [% codes_loo.limit_phrase %]: [% codes_loo.code %]</h4>
|
|
<p><a id="CheckAll[% codes_loo.code %]table" class="checkall" href="#">Check All</a> | <a id="UncheckAll[% codes_loo.code %]table" class="uncheckall" href="#">Uncheck All</a></p>
|
|
<script type="text/javascript" id="js">$(document).ready(function() {
|
|
$("#[% codes_loo.code %]table").tablesorter({
|
|
sortList: [[0,0]],
|
|
headers: { 1: { sorter: false}}
|
|
}).tablesorterPager({container: $("#pager[% codes_loo.code %]table"),positionFixed: false,size: 10});
|
|
}); </script>
|
|
|
|
<div id="pager[% codes_loo.code %]table" class="pager">
|
|
<p class="formpager"> <strong>page(s)</strong> :
|
|
<img src="[% interface %]/[% theme %]/img/first.png" class="first"/>
|
|
<img src="[% interface %]/[% theme %]/img/prev.png" class="prev"/>
|
|
<input type="text" size="5" class="pagedisplay"/>
|
|
<img src="[% interface %]/[% theme %]/img/next.png" class="next"/>
|
|
<img src="[% interface %]/[% theme %]/img/last.png" class="last"/>
|
|
, entries/page :
|
|
<select class="pagesize">
|
|
<option selected="selected" value="10">10</option>
|
|
<option value="20">20</option>
|
|
<option value="30">30</option>
|
|
<option value="40">40</option>
|
|
<option value="50">50</option>
|
|
<option value="100">100</option>
|
|
</select>
|
|
</p>
|
|
</div>
|
|
<table id="[% codes_loo.code %]table">
|
|
<thead>
|
|
<tr>
|
|
<th>Library</th>
|
|
<th>Allow transfer?</th>
|
|
</tr>
|
|
</thead>
|
|
|
|
<tbody>
|
|
[% FOREACH to_branch_loo IN codes_loo.to_branch_loop %]
|
|
[% UNLESS ( loop.odd ) %]<tr class="highlight">[% ELSE %]<tr>[% END %]
|
|
<td><label style="min-width:400px;" for="[% to_branch_loo.code %][% to_branch_loo.toBranch %]row">[% to_branch_loo.toBranch %] - [% to_branch_loo.toBranchname %]</label></td>
|
|
<td>
|
|
[% IF ( to_branch_loo.isChecked ) %]
|
|
<input type="checkbox" id="[% to_branch_loo.code %][% to_branch_loo.toBranch %]row" name="[% to_branch_loo.code %]_[% to_branch_loo.toBranch %]" checked="checked" />
|
|
[% ELSE %]
|
|
<input type="checkbox" id="[% to_branch_loo.code %][% to_branch_loo.toBranch %]row" name="[% to_branch_loo.code %]_[% to_branch_loo.toBranch %]" />
|
|
[% END %]
|
|
</td>
|
|
</tr>
|
|
[% END %]
|
|
</tbody>
|
|
</table>
|
|
</div>
|
|
[% END %]
|
|
|
|
<fieldset class="action">
|
|
<input type="hidden" name="updateLimits" value="1" />
|
|
<input type="hidden" name="branchcode" value="[% branchcode %]" />
|
|
<input type="submit" value="Save" />
|
|
<a class="cancel" href="/cgi-bin/koha/admin/admin-home.pl">Cancel</a>
|
|
</fieldset>
|
|
</form>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
<div class="yui-b">
|
|
[% INCLUDE 'admin-menu.inc' %]
|
|
</div>
|
|
</div>
|
|
[% INCLUDE 'intranet-bottom.inc' %]
|