Main Koha release repository https://koha-community.org
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 
 
 
 

164 lines
6.6 KiB

[% USE KohaDates %]
[% INCLUDE 'doc-head-open.inc' %]
<title>Koha &rsaquo; Tools &rsaquo; Patron lists &rsaquo; [% list.name %] &rsaquo; Add patrons</title>
[% INCLUDE 'doc-head-close.inc' %]
<link rel="stylesheet" type="text/css" href="[% interface %]/[% theme %]/css/datatables.css" />
[% INCLUDE 'datatables.inc' %]
<script type="text/javascript" src="[% interface %]/js/autocomplete/patrons.js"></script>
<script type="text/javascript">
//<![CDATA[
var MSG_REMOVE_PATRON = _("Remove");
$(document).ready(function() {
$('#patrons_to_add_fieldset').hide();
$('#patron-list-table').dataTable($.extend(true, {}, dataTablesDefaults, {
"order": [[ 3, "asc" ]],
"aoColumns": [
null,null,null,null,null,null,null,{ "sType": "title-string" },null
],
"aoColumnDefs": [
{ "aTargets": [ 0 ], "bSortable": false, "bSearchable": false },
],
"sPaginationType": "four_button"
} ));
patron_autocomplete({
patron_container: $("#patrons_to_add"),
input_autocomplete: $("#find_patron"),
patron_input_name: 'patrons_to_add'
});
var checkBoxes = $("input[type='checkbox']","#patron-list-table");
$("#CheckAll").click(function(e){
e.preventDefault();
checkBoxes.each(function(){
$(this).prop("checked",1);
});
});
$("#CheckNone").click(function(e){
e.preventDefault();
checkBoxes.each(function(){
$(this).prop("checked",0);
});
});
$("#remove_patrons").submit(function(){
var checkedItems = $("input:checked");
if ($(checkedItems).size() == 0) {
alert(_("You must select one or more patrons to remove"));
return false;
}
$(checkedItems).parents('tr').addClass("warn");
if( confirm(_("Are you sure you want to remove the selected patrons?")) ) {
return true;
} else {
$(checkedItems).parents('tr').removeClass("warn");
return false;
}
});
});
//]]>
</script>
</head>
<body id="patlist_list" class="pat patlist">
[% INCLUDE 'header.inc' %]
[% INCLUDE 'cat-search.inc' %]
<div id="breadcrumbs"><a href="/cgi-bin/koha/mainpage.pl">Home</a> &rsaquo; <a href="/cgi-bin/koha/tools/tools-home.pl">Tools</a> &rsaquo; <a href="lists.pl">Patron lists</a> &rsaquo; <a href="/cgi-bin/koha/patron_lists/list.pl?patron_list_id=[% list.id %]">[% list.name %]</a> &rsaquo; Add patrons</div>
<div id="doc3" class="yui-t2">
<div id="bd">
<div id="yui-main">
<div class="yui-b">
<h1>[% list.name %]</h1>
<form action="list.pl" id="add_patrons" method="post">
<fieldset>
<legend>Add patrons</legend>
<label for="find_patron">Patron search: </label>
<input autocomplete="off" id="find_patron" type="text" style="width:150px" class="noEnterSubmit" />
<div id="find_patron_container"></div>
<fieldset id="patrons_to_add_fieldset">
<legend>Patrons to be added</legend>
<div id="patrons_to_add"></div>
<fieldset class="action">
<input type="hidden" name="patron_list_id" value="[% list.patron_list_id %]" />
<input type="submit" value="Add patrons" />
<a href="lists.pl" class="cancel">Cancel</a>
</fieldset>
</fieldset>
</fieldset>
</form>
<form action="list.pl" id="remove_patrons" method="post">
<div id="searchheader">
<span class="checkall"><a id="CheckAll" href="#"><i class="fa fa-check"></i> Select all</a></span> |
<span class="clearall"><a id="CheckNone" href="#"><i class="fa fa-remove"></i> Clear all</a></span> |
<div class="btn-group">
<button class="btn btn-default btn-xs list-remove" type="submit"><i class="fa fa-trash"></i> Remove selected</button>
</div>
</div>
<table id="patron-list-table">
<thead>
<tr>
<th>&nbsp;</th>
<th>Card</th>
<th>First name</th>
<th>Surname</th>
<th>Address</th>
<th>Category</th>
<th>Library</th>
<th>Expires on</th>
<th>Circ notes</th>
</tr>
</thead>
<tbody>
[% FOREACH p IN list.patron_list_patrons %]
<tr>
<td><input type="checkbox" name="patrons_to_remove" value="[% p.patron_list_patron_id %]" /></td>
<td>
<a href="/cgi-bin/koha/members/moremember.pl?borrowernumber=[% p.borrowernumber.borrowernumber %]">
[% p.borrowernumber.cardnumber %]
</a>
</td>
<td>[% p.borrowernumber.firstname %]</td>
<td>[% p.borrowernumber.surname %]</td>
<td>
[% p.borrowernumber.address %]
[% p.borrowernumber.address2 %]
[% p.borrowernumber.city %]
[% p.borrowernumber.state %]
[% p.borrowernumber.country %]
</td>
<td>[% p.borrowernumber.categorycode.description %] ([% p.borrowernumber.categorycode.categorycode %])</td>
<td>[% p.borrowernumber.branchcode.branchname %]</td>
<td><span title="[% p.borrowernumber.dateexpiry %]">[% p.borrowernumber.dateexpiry | $KohaDates %]</span></td>
<td>[% p.borrowernumber.borrowernotes %]</td>
</tr>
[% END %]
</tbody>
</table>
<input type="hidden" name="patron_list_id" value="[% list.patron_list_id %]" />
<button type="submit" class="btn btn-default btn-sm"><i class="fa fa-trash" aria-hidden="true"></i> Remove selected patrons</button>
</form>
</div>
</div>
<div class="yui-b noprint">
[% INCLUDE 'tools-menu.inc' %]
</div>
</div>
[% INCLUDE 'intranet-bottom.inc' %]