4 [% INCLUDE 'doc-head-open.inc' %]
5 <title>Koha › Tools › Patron lists</title>
6 [% INCLUDE 'doc-head-close.inc' %]
7 [% INCLUDE 'greybox.inc' %]
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 class="main container-fluid">
17 <div class="col-sm-10 col-sm-push-2">
20 <div id="toolbar" class="btn-toolbar">
21 <div class="btn-group">
22 <a class="btn btn-default" 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>
36 <th class="NoSort"> </th>
41 [% FOREACH l IN lists %]
42 [% SET shared_by_other = l.owner.id != logged_in_user.id %]
44 <td><a href="/cgi-bin/koha/patron_lists/list.pl?patron_list_id=[% l.patron_list_id | uri %]">[% l.name | html %]</a></td>
45 <td>[% l.patron_list_patrons_rs.count || 0 | html %]</td>
48 [% IF shared_by_other %]
49 by <a href=/cgi-bin/koha/members/moremember.pl?borrowernumber=[% l.owner.id | html %]">[% INCLUDE 'patron-title.inc' patron=l.owner %]</a>
56 <div class="dropdown">
57 <a class="btn btn-default btn-xs dropdown-toggle" id="listactions[% l.patron_list_id | html %]" role="button" data-toggle="dropdown" href="#">
58 Actions <b class="caret"></b>
60 <ul class="dropdown-menu pull-right" role="menu" aria-labelledby="listactions[% l.patron_list_id | html %]">
61 <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>
62 [% UNLESS shared_by_other %]
63 <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>
64 <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>
66 [% IF ( l.patron_list_patrons_rs.count ) %]
67 <li class="divider"></li>
69 <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>
71 [% IF CAN_user_tools_edit_patrons %]
73 <a href="/cgi-bin/koha/tools/modborrowers.pl?patron_list_id=[% l.patron_list_id | uri %]&op=show">
74 <i class="fa fa-pencil"></i> Batch edit patrons
78 [% IF CAN_user_tools_delete_anonymize_patrons %]
80 <a href="/cgi-bin/koha/tools/cleanborrowers.pl?step=2&patron_list_id=[% l.patron_list_id | uri %]&checkbox=borrower">
81 <i class="fa fa-trash"></i> Batch delete patrons
94 <!-- Modal to print patron cards -->
95 <div class="modal" id="patronExportModal" tabindex="-1" role="dialog" aria-labelledby="patronExportModal_label" aria-hidden="true">
96 <div class="modal-dialog">
97 <div class="modal-content">
98 <div class="modal-header">
99 <button type="button" class="closebtn" data-dismiss="modal" aria-hidden="true">×</button>
100 <h3 id="patronExportModal_label">Print patron cards</h3>
102 <div class="modal-body">
103 <div id="loading"> <img src="[% interface | html %]/[% theme | html %]/img/spinner-small.gif" alt="" /> Loading </div>
110 <div class="dialog message">There are no patron lists.</div>
114 </div> <!-- /.col-sm-10.col-sm-push-2 -->
116 <div class="col-sm-2 col-sm-pull-10">
118 [% INCLUDE 'tools-menu.inc' %]
120 </div> <!-- /.col-sm-2.col-sm-pull-10 -->
121 </div> <!-- /.row -->
123 [% MACRO jsinclude BLOCK %]
124 [% Asset.js("js/tools-menu.js") | $raw %]
125 [% INCLUDE 'datatables.inc' %]
128 $(document).ready(function() {
129 var patronExportModal = $("#patronExportModal");
130 var patronExportModalBody = $("#patronExportModal .modal-body")
132 $('#patron-lists-table').dataTable($.extend(true, {}, dataTablesDefaults, {
135 { "bSortable": false, "bSearchable": false, 'aTargets': [ 'NoSort' ] }
137 "sPaginationType": "four_button"
139 $(".delete_patron").on("click", function(){
140 $(".dropdown").removeClass("open");
141 var list = $(this).data("list-name");
142 return confirmDelete( _("Are you sure you want to delete the list %s?").format(list) );
145 $(".print_cards").on("click", function(e){
147 var page = $(this).attr("href");
148 patronExportModalBody.load(page + " #exportingf");
149 patronExportModal.modal("show");
152 patronExportModal.on("hidden.bs.modal", function(){
153 patronExportModalBody.html("<div id=\"loading\"><img src=\"[% interface | html %]/[% theme | html %]/img/spinner-small.gif\" alt=\"\" /> "+_("Loading")+"</div>");
156 patronExportModal.on("submit", "#exportingf", function(e){
158 modal_body = patronExportModalBody;
159 modal_body.html("<div id=\"loading\"><img src=\"[% interface | html %]/[% theme | html %]/img/spinner-small.gif\" alt=\"\" /> "+_("Loading")+"</div>");
160 target_url = $(this).attr("action");
161 params = $( this ).serialize();
162 modal_body.load( target_url + "?" + params + " #custom-doc");
165 patronExportModal.on("click",".closebtn,.gb-close",function(e){
167 patronExportModal.modal("hide");
174 [% INCLUDE 'intranet-bottom.inc' %]