3 [% INCLUDE 'doc-head-open.inc' %]
4 <title>Koha › Tools › Patron lists</title>
5 [% INCLUDE 'doc-head-close.inc' %]
6 [% INCLUDE 'greybox.inc' %]
7 [% Asset.css("css/datatables.css") %]
10 <body id="patlist_lists" class="pat patlist">
11 [% INCLUDE 'header.inc' %]
12 [% INCLUDE 'cat-search.inc' %]
13 <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>
15 <div id="doc3" class="yui-t2">
20 <div id="toolbar" class="btn-toolbar">
21 <div class="btn-group">
22 <a class="btn btn-default btn-sm" href="add-modify.pl"><i class="fa fa-plus"></i> New patron list</a>
26 <h1>Your patron lists</h1>
30 <table id="patron-lists-table">
34 <th>Patrons in list</th>
35 <th class="NoSort"> </th>
40 [% FOREACH l IN lists %]
42 <td><a href="/cgi-bin/koha/patron_lists/list.pl?patron_list_id=[% l.patron_list_id %]">[% l.name |html%]</a></td>
43 <td>[% l.patron_list_patrons_rs.count || 0 %]</td>
45 <div class="dropdown">
46 <a class="btn btn-default btn-xs dropdown-toggle" id="listactions[% l.patron_list_id %]" role="button" data-toggle="dropdown" href="#">
47 Actions <b class="caret"></b>
49 <ul class="dropdown-menu pull-right" role="menu" aria-labelledby="listactions[% l.patron_list_id %]">
50 <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>
51 <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>
52 <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>
53 [% IF ( l.patron_list_patrons_rs.count ) %]
54 <li class="divider"></li>
56 <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>
58 [% IF CAN_user_tools_edit_patrons %]
60 <a href="/cgi-bin/koha/tools/modborrowers.pl?patron_list_id=[% l.patron_list_id %]&op=show">
61 <i class="fa fa-pencil"></i> Batch edit patrons
65 [% IF CAN_user_tools_delete_anonymize_patrons %]
67 <a href="/cgi-bin/koha/tools/cleanborrowers.pl?step=2&patron_list_id=[% l.patron_list_id %]&checkbox=borrower">
68 <i class="fa fa-trash"></i> Batch delete patrons
81 <!-- Modal to print patron cards -->
82 <div class="modal" id="patronExportModal" tabindex="-1" role="dialog" aria-labelledby="patronExportModal_label" aria-hidden="true">
83 <div class="modal-dialog">
84 <div class="modal-content">
85 <div class="modal-header">
86 <button type="button" class="closebtn" data-dismiss="modal" aria-hidden="true">×</button>
87 <h3 id="patronExportModal_label">Print patron cards</h3>
89 <div class="modal-body">
90 <div id="loading"> <img src="[% interface %]/[% theme %]/img/spinner-small.gif" alt="" /> Loading </div>
97 <div class="dialog message">There are no patron lists.</div>
102 <div class="yui-b noprint">
103 [% INCLUDE 'tools-menu.inc' %]
107 [% MACRO jsinclude BLOCK %]
108 [% Asset.js("js/tools-menu.js") %]
109 [% INCLUDE 'datatables.inc' %]
111 <script type="text/javascript">
112 $(document).ready(function() {
113 var patronExportModal = $("#patronExportModal");
114 var patronExportModalBody = $("#patronExportModal .modal-body")
116 $('#patron-lists-table').dataTable($.extend(true, {}, dataTablesDefaults, {
119 { "bSortable": false, "bSearchable": false, 'aTargets': [ 'NoSort' ] }
121 "sPaginationType": "four_button"
123 $(".delete_patron").on("click", function(){
124 $(".dropdown").removeClass("open");
125 var list = $(this).data("list-name");
126 return confirmDelete( _("Are you sure you want to delete the list %s?").format(list) );
129 $(".print_cards").on("click", function(e){
131 var page = $(this).attr("href");
132 patronExportModalBody.load(page + " #exportingf");
133 patronExportModal.modal("show");
136 patronExportModal.on("hidden", function(){
137 patronExportModalBody.html("<div id=\"loading\"><img src=\"[% interface %]/[% theme %]/img/spinner-small.gif\" alt=\"\" /> "+_("Loading")+"</div>");
140 patronExportModal.on("submit", "#exportingf", function(e){
142 modal_body = patronExportModalBody;
143 modal_body.html("<div id=\"loading\"><img src=\"[% interface %]/[% theme %]/img/spinner-small.gif\" alt=\"\" /> "+_("Loading")+"</div>");
144 target_url = $(this).attr("action");
145 params = $( this ).serialize();
146 modal_body.load( target_url + "?" + params + " #custom-doc");
149 patronExportModal.on("click",".closebtn,.gb-close",function(e){
151 patronExportModal.modal("hide");
158 [% INCLUDE 'intranet-bottom.inc' %]