4 [% INCLUDE 'doc-head-open.inc' %]
5 <title>Koha › Tools › Patron lists</title>
6 [% INCLUDE 'doc-head-close.inc' %]
7 [% INCLUDE 'greybox.inc' %]
8 [% Asset.css("css/datatables.css") | $raw %]
11 <body id="patlist_lists" class="pat patlist">
12 [% INCLUDE 'header.inc' %]
13 [% INCLUDE 'cat-search.inc' %]
14 <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>
16 <div class="main container-fluid">
18 <div class="col-sm-10 col-sm-push-2">
21 <div id="toolbar" class="btn-toolbar">
22 <div class="btn-group">
23 <a class="btn btn-default btn-sm" href="add-modify.pl"><i class="fa fa-plus"></i> New patron list</a>
27 <h1>Your patron lists</h1>
31 <table id="patron-lists-table">
35 <th>Patrons in list</th>
37 <th class="NoSort"> </th>
42 [% FOREACH l IN lists %]
43 [% SET shared_by_other = l.owner.id != logged_in_user.id %]
45 <td><a href="/cgi-bin/koha/patron_lists/list.pl?patron_list_id=[% l.patron_list_id | uri %]">[% l.name | html %]</a></td>
46 <td>[% l.patron_list_patrons_rs.count || 0 | html %]</td>
49 [% IF shared_by_other %]
50 by <a href=/cgi-bin/koha/members/moremember.pl?borrowernumber=[% l.owner.id | html %]">[% INCLUDE 'patron-title.inc' patron=l.owner %]</a>
57 <div class="dropdown">
58 <a class="btn btn-default btn-xs dropdown-toggle" id="listactions[% l.patron_list_id | html %]" role="button" data-toggle="dropdown" href="#">
59 Actions <b class="caret"></b>
61 <ul class="dropdown-menu pull-right" role="menu" aria-labelledby="listactions[% l.patron_list_id | html %]">
62 <li><a href="/cgi-bin/koha/patron_lists/list.pl?patron_list_id=[% l.patron_list_id | uri %]"><i class="fa fa-user"></i> Add patrons</a></li>
63 [% UNLESS shared_by_other %]
64 <li><a href="/cgi-bin/koha/patron_lists/add-modify.pl?patron_list_id=[% l.patron_list_id | uri %]"><i class="fa fa-pencil"></i> Edit list</a></li>
65 <li><a class="delete_patron" href="/cgi-bin/koha/patron_lists/delete.pl?patron_list_id=[% l.patron_list_id | html %]" data-list-name="[% l.name | html %]"><i class="fa fa-trash"></i> Delete list</a></li>
67 [% IF ( l.patron_list_patrons_rs.count ) %]
68 <li class="divider"></li>
70 <a class="print_cards" href="/cgi-bin/koha/patroncards/print.pl?patronlist_id=[% l.patron_list_id | html %]" data-patron_list_id="[% l.patron_list_id | html %]"><i class="fa fa-print"></i> Print patron cards</a>
72 [% IF CAN_user_tools_edit_patrons %]
74 <a href="/cgi-bin/koha/tools/modborrowers.pl?patron_list_id=[% l.patron_list_id | uri %]&op=show">
75 <i class="fa fa-pencil"></i> Batch edit patrons
79 [% IF CAN_user_tools_delete_anonymize_patrons %]
81 <a href="/cgi-bin/koha/tools/cleanborrowers.pl?step=2&patron_list_id=[% l.patron_list_id | uri %]&checkbox=borrower">
82 <i class="fa fa-trash"></i> Batch delete patrons
95 <!-- Modal to print patron cards -->
96 <div class="modal" id="patronExportModal" tabindex="-1" role="dialog" aria-labelledby="patronExportModal_label" aria-hidden="true">
97 <div class="modal-dialog">
98 <div class="modal-content">
99 <div class="modal-header">
100 <button type="button" class="closebtn" data-dismiss="modal" aria-hidden="true">×</button>
101 <h3 id="patronExportModal_label">Print patron cards</h3>
103 <div class="modal-body">
104 <div id="loading"> <img src="[% interface | html %]/[% theme | html %]/img/spinner-small.gif" alt="" /> Loading </div>
111 <div class="dialog message">There are no patron lists.</div>
115 </div> <!-- /.col-sm-10.col-sm-push-2 -->
117 <div class="col-sm-2 col-sm-pull-10">
119 [% INCLUDE 'tools-menu.inc' %]
121 </div> <!-- /.col-sm-2.col-sm-pull-10 -->
122 </div> <!-- /.row -->
124 [% MACRO jsinclude BLOCK %]
125 [% Asset.js("js/tools-menu.js") | $raw %]
126 [% INCLUDE 'datatables.inc' %]
129 $(document).ready(function() {
130 var patronExportModal = $("#patronExportModal");
131 var patronExportModalBody = $("#patronExportModal .modal-body")
133 $('#patron-lists-table').dataTable($.extend(true, {}, dataTablesDefaults, {
136 { "bSortable": false, "bSearchable": false, 'aTargets': [ 'NoSort' ] }
138 "sPaginationType": "four_button"
140 $(".delete_patron").on("click", function(){
141 $(".dropdown").removeClass("open");
142 var list = $(this).data("list-name");
143 return confirmDelete( _("Are you sure you want to delete the list %s?").format(list) );
146 $(".print_cards").on("click", function(e){
148 var page = $(this).attr("href");
149 patronExportModalBody.load(page + " #exportingf");
150 patronExportModal.modal("show");
153 patronExportModal.on("hidden.bs.modal", function(){
154 patronExportModalBody.html("<div id=\"loading\"><img src=\"[% interface | html %]/[% theme | html %]/img/spinner-small.gif\" alt=\"\" /> "+_("Loading")+"</div>");
157 patronExportModal.on("submit", "#exportingf", function(e){
159 modal_body = patronExportModalBody;
160 modal_body.html("<div id=\"loading\"><img src=\"[% interface | html %]/[% theme | html %]/img/spinner-small.gif\" alt=\"\" /> "+_("Loading")+"</div>");
161 target_url = $(this).attr("action");
162 params = $( this ).serialize();
163 modal_body.load( target_url + "?" + params + " #custom-doc");
166 patronExportModal.on("click",".closebtn,.gb-close",function(e){
168 patronExportModal.modal("hide");
175 [% INCLUDE 'intranet-bottom.inc' %]