1 [% INCLUDE 'doc-head-open.inc' %]
2 <title>Koha › Tools › Patron lists</title>
3 [% INCLUDE 'doc-head-close.inc' %]
4 [% INCLUDE 'greybox.inc' %]
5 <link rel="stylesheet" type="text/css" href="[% interface %]/[% theme %]/css/datatables.css" />
6 [% INCLUDE 'datatables.inc' %]
8 <script type="text/javascript">
10 $(document).ready(function() {
11 var patronExportModal = $("#patronExportModal");
12 var patronExportModalBody = $("#patronExportModal .modal-body")
14 $('#patron-lists-table').dataTable($.extend(true, {}, dataTablesDefaults, {
17 { "bSortable": false, "bSearchable": false, 'aTargets': [ 'NoSort' ] }
19 "sPaginationType": "four_button"
21 $(".delete_patron").on("click", function(){
22 $(".dropdown").removeClass("open");
23 var list = $(this).data("list-name");
24 return confirmDelete( _("Are you sure you want to delete the list %s?").format(list) );
27 $(".print_cards").on("click", function(e){
29 var page = $(this).attr("href");
30 patronExportModalBody.load(page + " #exportingf");
31 patronExportModal.modal("show");
34 patronExportModal.on("hidden", function(){
35 patronExportModalBody.html("<div id=\"loading\"><img src=\"[% interface %]/[% theme %]/img/spinner-small.gif\" alt=\"\" /> "+_("Loading")+"</div>");
38 patronExportModal.on("submit", "#exportingf", function(e){
40 modal_body = patronExportModalBody;
41 modal_body.html("<div id=\"loading\"><img src=\"[% interface %]/[% theme %]/img/spinner-small.gif\" alt=\"\" /> "+_("Loading")+"</div>");
42 target_url = $(this).attr("action");
43 params = $( this ).serialize();
44 modal_body.load( target_url + "?" + params + " #custom-doc");
47 patronExportModal.on("click",".closebtn,.gb-close",function(e){
49 patronExportModal.modal("hide");
58 <body id="patlist_lists" class="pat patlist">
59 [% INCLUDE 'header.inc' %]
60 [% INCLUDE 'cat-search.inc' %]
61 <div id="breadcrumbs"><a href="/cgi-bin/koha/mainpage.pl">Home</a> › <a href="/cgi-bin/koha/tools/tools-home.pl">Tools</a> › Patron lists</div>
63 <div id="doc3" class="yui-t2">
68 <div id="toolbar" class="btn-toolbar">
69 <div class="btn-group">
70 <a class="btn btn-default btn-sm" href="add-modify.pl"><i class="fa fa-plus"></i> New patron list</a>
74 <h1>Your patron lists</h1>
78 <table id="patron-lists-table">
82 <th>Patrons in list</th>
83 <th class="NoSort"> </th>
88 [% FOREACH l IN lists %]
91 <td>[% l.patron_list_patrons_rs.count || 0 %]</td>
93 <div class="dropdown">
94 <a class="btn btn-default btn-xs dropdown-toggle" id="listactions[% l.patron_list_id %]" role="button" data-toggle="dropdown" href="#">
95 Actions <b class="caret"></b>
97 <ul class="dropdown-menu pull-right" role="menu" aria-labelledby="listactions[% l.patron_list_id %]">
98 <li><a href="/cgi-bin/koha/patron_lists/list.pl?patron_list_id=[% l.patron_list_id %]"><i class="fa fa-user"></i> Add patrons</a></li>
99 <li><a href="/cgi-bin/koha/patron_lists/add-modify.pl?patron_list_id=[% l.patron_list_id %]"><i class="fa fa-pencil"></i> Edit list</a></li>
100 <li><a class="delete_patron" href="/cgi-bin/koha/patron_lists/delete.pl?patron_list_id=[% l.patron_list_id %]" data-list-name="[% l.name %]"><i class="fa fa-trash"></i> Delete list</a></li>
101 [% IF ( l.patron_list_patrons_rs.count ) %]
102 <li class="divider"></li>
104 <a class="print_cards" href="/cgi-bin/koha/patroncards/print.pl?patronlist_id=[% l.patron_list_id %]" data-patron_list_id="[% l.patron_list_id %]"><i class="fa fa-print"></i> Print patron cards</a>
106 [% IF CAN_user_tools_edit_patrons %]
108 <a href="/cgi-bin/koha/tools/modborrowers.pl?patron_list_id=[% l.patron_list_id %]&op=show">
109 <i class="fa fa-pencil"></i> Batch edit patrons
113 [% IF CAN_user_tools_delete_anonymize_patrons %]
115 <a href="/cgi-bin/koha/tools/cleanborrowers.pl?step=2&patron_list_id=[% l.patron_list_id %]&checkbox=borrower">
116 <i class="fa fa-trash"></i> Batch delete patrons
129 <!-- Modal to print patron cards -->
130 <div class="modal" id="patronExportModal" tabindex="-1" role="dialog" aria-labelledby="patronExportModal_label" aria-hidden="true">
131 <div class="modal-dialog">
132 <div class="modal-content">
133 <div class="modal-header">
134 <button type="button" class="closebtn" data-dismiss="modal" aria-hidden="true">×</button>
135 <h3 id="patronExportModal_label">Print patron cards</h3>
137 <div class="modal-body">
138 <div id="loading"> <img src="[% interface %]/[% theme %]/img/spinner-small.gif" alt="" /> Loading </div>
145 <div class="dialog message">There are no patron lists.</div>
150 <div class="yui-b noprint">
151 [% INCLUDE 'tools-menu.inc' %]
154 [% INCLUDE 'intranet-bottom.inc' %]