|
Lines 6-12
Link Here
|
| 6 |
|
6 |
|
| 7 |
[% IF in_lists %] |
7 |
[% IF in_lists %] |
| 8 |
<div class="patroninfo-section"> |
8 |
<div class="patroninfo-section"> |
| 9 |
<h4>Patron Lists currently in</h4> |
9 |
<h4>Patron lists currently in</h4> |
| 10 |
|
10 |
|
| 11 |
<table id="table_inlists"> |
11 |
<table id="table_inlists"> |
| 12 |
<thead> |
12 |
<thead> |
|
Lines 15-21
Link Here
|
| 15 |
<th>Patrons in list</th> |
15 |
<th>Patrons in list</th> |
| 16 |
<th>Shared</th> |
16 |
<th>Shared</th> |
| 17 |
[% IF CAN_user_tools_manage_patron_lists %] |
17 |
[% IF CAN_user_tools_manage_patron_lists %] |
| 18 |
<th class="NoSort">Actions</th> |
18 |
<th class="NoSort">Actions</th> |
| 19 |
[% END %] |
19 |
[% END %] |
| 20 |
</tr> |
20 |
</tr> |
| 21 |
</thead> |
21 |
</thead> |
|
Lines 26-34
Link Here
|
| 26 |
<tr> |
26 |
<tr> |
| 27 |
<td> |
27 |
<td> |
| 28 |
[% IF CAN_user_tools_manage_patron_lists %] |
28 |
[% IF CAN_user_tools_manage_patron_lists %] |
| 29 |
<a href="/cgi-bin/koha/patron_lists/list.pl?patron_list_id=[% l.patron_list_id | uri %]">[% l.name | html %]</a> |
29 |
<a href="/cgi-bin/koha/patron_lists/list.pl?patron_list_id=[% l.patron_list_id | uri %]">[% l.name | html %]</a> |
| 30 |
[% ELSE %] |
30 |
[% ELSE %] |
| 31 |
[% l.name | html %] |
31 |
[% l.name | html %] |
| 32 |
[% END %] |
32 |
[% END %] |
| 33 |
</td> |
33 |
</td> |
| 34 |
<td>[% l.patron_list_patrons_rs.count || 0 | html %]</td> |
34 |
<td>[% l.patron_list_patrons_rs.count || 0 | html %]</td> |
|
Lines 42-83
Link Here
|
| 42 |
[% END %] |
42 |
[% END %] |
| 43 |
</td> |
43 |
</td> |
| 44 |
[% IF CAN_user_tools_manage_patron_lists %] |
44 |
[% IF CAN_user_tools_manage_patron_lists %] |
| 45 |
<td> |
45 |
<td> |
| 46 |
<div class="btn-group dropup"> |
46 |
<div class="btn-group dropup"> |
| 47 |
<a class="btn btn-default btn-xs dropdown-toggle" id="listactions[% l.patron_list_id | html %]" role="button" data-toggle="dropdown" href="#"> |
47 |
<a class="btn btn-default btn-xs dropdown-toggle" id="listactions[% l.patron_list_id | html %]" role="button" data-toggle="dropdown" href="#"> |
| 48 |
Actions <b class="caret"></b> |
48 |
Actions <b class="caret"></b> |
| 49 |
</a> |
49 |
</a> |
| 50 |
<ul class="dropdown-menu pull-right" role="menu" aria-labelledby="listactions[% l.patron_list_id | html %]"> |
50 |
<ul class="dropdown-menu pull-right" role="menu" aria-labelledby="listactions[% l.patron_list_id | html %]"> |
| 51 |
<li><a onclick="removeFromList('[% l.patron_list_id | html %]','[% list_id_lookup.${l.patron_list_id} | html %]')"><i class="fa fa-remove"></i> Remove patron from list</a></li> |
51 |
<li><a onclick="removeFromList('[% l.patron_list_id | html %]','[% list_id_lookup.${l.patron_list_id} | html %]')"><i class="fa fa-remove"></i> Remove patron from list</a></li> |
| 52 |
<li class="divider"></li> |
|
|
| 53 |
<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> |
| 54 |
[% UNLESS shared_by_other %] |
| 55 |
<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> |
| 56 |
<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> |
| 57 |
[% END %] |
| 58 |
[% IF ( l.patron_list_patrons_rs.count ) %] |
| 59 |
<li class="divider"></li> |
52 |
<li class="divider"></li> |
| 60 |
<li> |
53 |
<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> |
| 61 |
<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> |
54 |
[% UNLESS shared_by_other %] |
| 62 |
</li> |
55 |
<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> |
| 63 |
[% IF CAN_user_tools_edit_patrons %] |
56 |
<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> |
| 64 |
<li> |
|
|
| 65 |
<a href="/cgi-bin/koha/tools/modborrowers.pl?patron_list_id=[% l.patron_list_id | uri %]&op=show"> |
| 66 |
<i class="fa fa-pencil"></i> Batch edit patrons |
| 67 |
</a> |
| 68 |
</li> |
| 69 |
[% END %] |
57 |
[% END %] |
| 70 |
[% IF CAN_user_tools_delete_anonymize_patrons %] |
58 |
[% IF ( l.patron_list_patrons_rs.count ) %] |
|
|
59 |
<li class="divider"></li> |
| 71 |
<li> |
60 |
<li> |
| 72 |
<a href="/cgi-bin/koha/tools/cleanborrowers.pl?step=2&patron_list_id=[% l.patron_list_id | uri %]&checkbox=borrower"> |
61 |
<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> |
| 73 |
<i class="fa fa-trash"></i> Batch delete patrons |
|
|
| 74 |
</a> |
| 75 |
</li> |
62 |
</li> |
|
|
63 |
[% IF CAN_user_tools_edit_patrons %] |
| 64 |
<li> |
| 65 |
<a href="/cgi-bin/koha/tools/modborrowers.pl?patron_list_id=[% l.patron_list_id | uri %]&op=show"> |
| 66 |
<i class="fa fa-pencil"></i> Batch edit patrons |
| 67 |
</a> |
| 68 |
</li> |
| 69 |
[% END %] |
| 70 |
[% IF CAN_user_tools_delete_anonymize_patrons %] |
| 71 |
<li> |
| 72 |
<a href="/cgi-bin/koha/tools/cleanborrowers.pl?step=2&patron_list_id=[% l.patron_list_id | uri %]&checkbox=borrower"> |
| 73 |
<i class="fa fa-trash"></i> Batch delete patrons |
| 74 |
</a> |
| 75 |
</li> |
| 76 |
[% END %] |
| 76 |
[% END %] |
77 |
[% END %] |
| 77 |
[% END %] |
78 |
</ul> |
| 78 |
</ul> |
79 |
</div> |
| 79 |
</div> |
80 |
</td> |
| 80 |
</td> |
|
|
| 81 |
[% END %] |
81 |
[% END %] |
| 82 |
</tr> |
82 |
</tr> |
| 83 |
[% END %] |
83 |
[% END %] |
|
Lines 101-107
Link Here
|
| 101 |
<th>Patrons in list</th> |
101 |
<th>Patrons in list</th> |
| 102 |
<th>Shared</th> |
102 |
<th>Shared</th> |
| 103 |
[% IF CAN_user_tools_manage_patron_lists %] |
103 |
[% IF CAN_user_tools_manage_patron_lists %] |
| 104 |
<th class="NoSort">Actions</th> |
104 |
<th class="NoSort">Actions</th> |
| 105 |
[% END %] |
105 |
[% END %] |
| 106 |
</tr> |
106 |
</tr> |
| 107 |
</thead> |
107 |
</thead> |
|
Lines 112-120
Link Here
|
| 112 |
<tr> |
112 |
<tr> |
| 113 |
<td> |
113 |
<td> |
| 114 |
[% IF CAN_user_tools_manage_patron_lists %] |
114 |
[% IF CAN_user_tools_manage_patron_lists %] |
| 115 |
<a href="/cgi-bin/koha/patron_lists/list.pl?patron_list_id=[% l.patron_list_id | uri %]">[% l.name | html %]</a> |
115 |
<a href="/cgi-bin/koha/patron_lists/list.pl?patron_list_id=[% l.patron_list_id | uri %]">[% l.name | html %]</a> |
| 116 |
[% ELSE %] |
116 |
[% ELSE %] |
| 117 |
[% l.name | html %] |
117 |
[% l.name | html %] |
| 118 |
[% END %] |
118 |
[% END %] |
| 119 |
</td> |
119 |
</td> |
| 120 |
<td>[% l.patron_list_patrons_rs.count || 0 | html %]</td> |
120 |
<td>[% l.patron_list_patrons_rs.count || 0 | html %]</td> |
|
Lines 128-169
Link Here
|
| 128 |
[% END %] |
128 |
[% END %] |
| 129 |
</td> |
129 |
</td> |
| 130 |
[% IF CAN_user_tools_manage_patron_lists %] |
130 |
[% IF CAN_user_tools_manage_patron_lists %] |
| 131 |
<td> |
131 |
<td> |
| 132 |
<div class="btn-group dropup"> |
132 |
<div class="btn-group dropup"> |
| 133 |
<a class="btn btn-default btn-xs dropdown-toggle" id="listactions[% l.patron_list_id | html %]" role="button" data-toggle="dropdown" href="#"> |
133 |
<a class="btn btn-default btn-xs dropdown-toggle" id="listactions[% l.patron_list_id | html %]" role="button" data-toggle="dropdown" href="#"> |
| 134 |
Actions <b class="caret"></b> |
134 |
Actions <b class="caret"></b> |
| 135 |
</a> |
135 |
</a> |
| 136 |
<ul class="dropdown-menu pull-right" role="menu" aria-labelledby="listactions[% l.patron_list_id | html %]"> |
136 |
<ul class="dropdown-menu pull-right" role="menu" aria-labelledby="listactions[% l.patron_list_id | html %]"> |
| 137 |
<li><a onclick="addToList('[% l.patron_list_id | html %]','[% cardnumber | html %]')"><i class="fa fa-plus"></i> Add patron to list</a></li> |
137 |
<li><a onclick="addToList('[% l.patron_list_id | html %]','[% cardnumber | html %]')"><i class="fa fa-plus"></i> Add patron to list</a></li> |
| 138 |
<li class="divider"></li> |
|
|
| 139 |
<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> |
| 140 |
[% UNLESS shared_by_other %] |
| 141 |
<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> |
| 142 |
<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> |
| 143 |
[% END %] |
| 144 |
[% IF ( l.patron_list_patrons_rs.count ) %] |
| 145 |
<li class="divider"></li> |
138 |
<li class="divider"></li> |
| 146 |
<li> |
139 |
<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> |
| 147 |
<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> |
140 |
[% UNLESS shared_by_other %] |
| 148 |
</li> |
141 |
<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> |
| 149 |
[% IF CAN_user_tools_edit_patrons %] |
142 |
<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> |
| 150 |
<li> |
|
|
| 151 |
<a href="/cgi-bin/koha/tools/modborrowers.pl?patron_list_id=[% l.patron_list_id | uri %]&op=show"> |
| 152 |
<i class="fa fa-pencil"></i> Batch edit patrons |
| 153 |
</a> |
| 154 |
</li> |
| 155 |
[% END %] |
143 |
[% END %] |
| 156 |
[% IF CAN_user_tools_delete_anonymize_patrons %] |
144 |
[% IF ( l.patron_list_patrons_rs.count ) %] |
|
|
145 |
<li class="divider"></li> |
| 157 |
<li> |
146 |
<li> |
| 158 |
<a href="/cgi-bin/koha/tools/cleanborrowers.pl?step=2&patron_list_id=[% l.patron_list_id | uri %]&checkbox=borrower"> |
147 |
<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> |
| 159 |
<i class="fa fa-trash"></i> Batch delete patrons |
|
|
| 160 |
</a> |
| 161 |
</li> |
148 |
</li> |
|
|
149 |
[% IF CAN_user_tools_edit_patrons %] |
| 150 |
<li> |
| 151 |
<a href="/cgi-bin/koha/tools/modborrowers.pl?patron_list_id=[% l.patron_list_id | uri %]&op=show"> |
| 152 |
<i class="fa fa-pencil"></i> Batch edit patrons |
| 153 |
</a> |
| 154 |
</li> |
| 155 |
[% END %] |
| 156 |
[% IF CAN_user_tools_delete_anonymize_patrons %] |
| 157 |
<li> |
| 158 |
<a href="/cgi-bin/koha/tools/cleanborrowers.pl?step=2&patron_list_id=[% l.patron_list_id | uri %]&checkbox=borrower"> |
| 159 |
<i class="fa fa-trash"></i> Batch delete patrons |
| 160 |
</a> |
| 161 |
</li> |
| 162 |
[% END %] |
| 162 |
[% END %] |
163 |
[% END %] |
| 163 |
[% END %] |
164 |
</ul> |
| 164 |
</ul> |
165 |
</div> |
| 165 |
</div> |
166 |
</td> |
| 166 |
</td> |
|
|
| 167 |
[% END %] |
167 |
[% END %] |
| 168 |
</tr> |
168 |
</tr> |
| 169 |
[% END %] |
169 |
[% END %] |
|
Lines 173-204
Link Here
|
| 173 |
[% END %] |
173 |
[% END %] |
| 174 |
|
174 |
|
| 175 |
<script> |
175 |
<script> |
| 176 |
$("#table_listnopatron, #table_inlists").dataTable($.extend(true, {}, dataTablesDefaults, { |
176 |
$("#table_listnopatron, #table_inlists").dataTable($.extend(true, {}, dataTablesDefaults, { |
| 177 |
"columnDefs": [ |
177 |
"columnDefs": [ |
| 178 |
{ 'sortable': false, 'targets': [ 'NoSort' ] } |
178 |
{ 'sortable': false, 'targets': [ 'NoSort' ] } |
| 179 |
], |
179 |
], |
| 180 |
paginate: true |
180 |
paginate: true |
| 181 |
})); |
181 |
})); |
| 182 |
|
182 |
|
| 183 |
[% IF CAN_user_tools_manage_patron_lists %] |
183 |
[% IF CAN_user_tools_manage_patron_lists %] |
| 184 |
function addToList( list_id, cardnumber ) { |
184 |
function addToList( list_id, cardnumber ) { |
| 185 |
$('#pat_lists-tab').text(_("Loading...")); |
185 |
$('#pat_lists-tab').text(_("Loading...")); |
| 186 |
$("body").css("cursor", "progress"); |
186 |
$("body").css("cursor", "progress"); |
| 187 |
$('#pat_lists-tab').load('/cgi-bin/koha/patron_lists/patron-lists-tab.pl?borrowernumber=[% borrowernumber | html %]&patron_list_id=' + list_id + '&patrons_to_add=' + cardnumber, function() { |
187 |
$('#pat_lists-tab').load('/cgi-bin/koha/patron_lists/patron-lists-tab.pl?borrowernumber=[% borrowernumber | html %]&patron_list_id=' + list_id + '&patrons_to_add=' + cardnumber, function() { |
| 188 |
$("body").css("cursor", "default"); |
188 |
$("body").css("cursor", "default"); |
| 189 |
}); |
189 |
}); |
| 190 |
|
190 |
|
| 191 |
return false; |
191 |
return false; |
| 192 |
} |
192 |
} |
| 193 |
|
193 |
|
| 194 |
function removeFromList( list_id, patron_list_patron_id ) { |
194 |
function removeFromList( list_id, patron_list_patron_id ) { |
| 195 |
$('#pat_lists-tab').text(_("Loading...")); |
195 |
$('#pat_lists-tab').text(_("Loading...")); |
| 196 |
$("body").css("cursor", "progress"); |
196 |
$("body").css("cursor", "progress"); |
| 197 |
$('#pat_lists-tab').load('/cgi-bin/koha/patron_lists/patron-lists-tab.pl?borrowernumber=[% borrowernumber | html %]&patron_list_id=' + list_id + '&patrons_to_remove=' + patron_list_patron_id, function() { |
197 |
$('#pat_lists-tab').load('/cgi-bin/koha/patron_lists/patron-lists-tab.pl?borrowernumber=[% borrowernumber | html %]&patron_list_id=' + list_id + '&patrons_to_remove=' + patron_list_patron_id, function() { |
| 198 |
$("body").css("cursor", "default"); |
198 |
$("body").css("cursor", "default"); |
| 199 |
}); |
199 |
}); |
| 200 |
|
200 |
|
| 201 |
return false; |
201 |
return false; |
| 202 |
} |
202 |
} |
| 203 |
[% END %] |
203 |
[% END %] |
| 204 |
</script> |
204 |
</script> |
| 205 |
- |
|
|