Bug 16241 - Move staff client CSS out of language directory
[koha.git] / koha-tmpl / intranet-tmpl / prog / en / modules / patron_lists / list.tt
1 [% USE KohaDates %]
2 [% INCLUDE 'doc-head-open.inc' %]
3 <title>Koha &rsaquo; Tools &rsaquo; Patron lists &rsaquo; [% list.name %] &rsaquo; Add patrons</title>
4 [% INCLUDE 'doc-head-close.inc' %]
5
6 <link rel="stylesheet" type="text/css" href="[% interface %]/[% theme %]/css/datatables.css" />
7 [% INCLUDE 'datatables.inc' %]
8
9 <script type="text/javascript" src="[% interface %]/js/autocomplete/patrons.js"></script>
10 <script type="text/javascript">
11 //<![CDATA[
12 var MSG_REMOVE_PATRON = _("Remove");
13 $(document).ready(function() {
14     $('#patrons_to_add_fieldset').hide();
15
16         $('#patron-list-table').dataTable($.extend(true, {}, dataTablesDefaults, {
17             "order": [[ 3, "asc" ]],
18             "aoColumns": [
19                 null,null,null,null,null,null,null,{ "sType": "title-string" },null
20             ],
21             "aoColumnDefs": [
22                 { "aTargets": [ 0 ], "bSortable": false, "bSearchable": false },
23             ],
24             "sPaginationType": "four_button"
25         } ));
26
27     patron_autocomplete({
28         patron_container: $("#patrons_to_add"),
29         input_autocomplete: $("#find_patron"),
30         patron_input_name: 'patrons_to_add'
31     });
32
33     var checkBoxes = $("input[type='checkbox']","#patron-list-table");
34
35     $("#CheckAll").click(function(e){
36         e.preventDefault();
37         checkBoxes.each(function(){
38             $(this).prop("checked",1);
39         });
40     });
41     $("#CheckNone").click(function(e){
42         e.preventDefault();
43         checkBoxes.each(function(){
44             $(this).prop("checked",0);
45         });
46     });
47
48     $("#remove_patrons").submit(function(){
49         var checkedItems = $("input:checked");
50         if ($(checkedItems).size() == 0) {
51             alert(_("You must select one or more patrons to remove"));
52             return false;
53         }
54         $(checkedItems).parents('tr').addClass("warn");
55         if( confirm(_("Are you sure you want to remove the selected patrons?")) ) {
56             return true;
57         } else {
58             $(checkedItems).parents('tr').removeClass("warn");
59             return false;
60         }
61     });
62 });
63
64 //]]>
65 </script>
66
67 </head>
68
69 <body id="patlist_list" class="pat patlist">
70 [% INCLUDE 'header.inc' %]
71 [% INCLUDE 'cat-search.inc' %]
72 <div id="breadcrumbs"><a href="/cgi-bin/koha/mainpage.pl">Home</a> &rsaquo; <a href="/cgi-bin/koha/tools/tools-home.pl">Tools</a> &rsaquo; <a href="lists.pl">Patron lists</a> &rsaquo; <a href="/cgi-bin/koha/patron_lists/list.pl?patron_list_id=[% list.id %]">[% list.name %]</a> &rsaquo; Add patrons</div>
73
74 <div id="doc3" class="yui-t2">
75    <div id="bd">
76     <div id="yui-main">
77         <div class="yui-b">
78         <h1>[% list.name %]</h1>
79
80         <form action="list.pl" id="add_patrons" method="post">
81             <fieldset>
82                 <legend>Add patrons</legend>
83
84                     <label for="find_patron">Patron search: </label>
85                     <input autocomplete="off" id="find_patron" type="text" style="width:150px" class="noEnterSubmit" />
86                     <div id="find_patron_container"></div>
87
88                 <fieldset id="patrons_to_add_fieldset">
89                     <legend>Patrons to be added</legend>
90                     <div id="patrons_to_add"></div>
91
92                     <fieldset class="action">
93                         <input type="hidden" name="patron_list_id" value="[% list.patron_list_id %]" />
94                         <input type="submit" value="Add patrons" />
95                         <a href="lists.pl" class="cancel">Cancel</a>
96                     </fieldset>
97                 </fieldset>
98
99             </fieldset>
100         </form>
101
102         <form action="list.pl" id="remove_patrons" method="post">
103
104             <div id="searchheader">
105                 <span class="checkall"><a id="CheckAll" href="#">Select all</a></span> |
106                 <span class="clearall"><a id="CheckNone" href="#">Clear all</a></span> |
107                 <div class="btn-group">
108                     <button class="btn btn-mini list-remove" type="submit"><i class="fa fa-times-circle"></i> Remove selected</button>
109                 </div>
110             </div>
111
112             <table id="patron-list-table">
113                 <thead>
114                     <tr>
115                         <th>&nbsp;</th>
116                         <th>Card</th>
117                         <th>First name</th>
118                         <th>Surname</th>
119                         <th>Address</th>
120                         <th>Category</th>
121                         <th>Library</th>
122                         <th>Expires on</th>
123                         <th>Circ notes</th>
124                     </tr>
125                 </thead>
126
127                 <tbody>
128                     [% FOREACH p IN list.patron_list_patrons %]
129                         <tr>
130                             <td><input type="checkbox" name="patrons_to_remove" value="[% p.patron_list_patron_id %]" /></td>
131                             <td>
132                                 <a href="/cgi-bin/koha/members/moremember.pl?borrowernumber=[% p.borrowernumber.borrowernumber %]">
133                                     [% p.borrowernumber.cardnumber %]
134                                 </a>
135                             </td>
136                             <td>[% p.borrowernumber.firstname %]</td>
137                             <td>[% p.borrowernumber.surname %]</td>
138                             <td>
139                                 [% p.borrowernumber.address %]
140                                 [% p.borrowernumber.address2 %]
141                                 [% p.borrowernumber.city %]
142                                 [% p.borrowernumber.state %]
143                                 [% p.borrowernumber.country %]
144                             </td>
145                             <td>[% p.borrowernumber.categorycode.description %] ([% p.borrowernumber.categorycode.categorycode %])</td>
146                             <td>[% p.borrowernumber.branchcode.branchname %]</td>
147                             <td><span title="[% p.borrowernumber.dateexpiry %]">[% p.borrowernumber.dateexpiry | $KohaDates %]</span></td>
148                             <td>[% p.borrowernumber.borrowernotes %]</td>
149                         </tr>
150                     [% END %]
151                 </tbody>
152             </table>
153
154             <input type="hidden" name="patron_list_id" value="[% list.patron_list_id %]" />
155             <input type="submit" value="Remove selected patrons" />
156         </form>
157
158             </div>
159         </div>
160         <div class="yui-b noprint">
161             [% INCLUDE 'tools-menu.inc' %]
162         </div>
163     </div>
164 [% INCLUDE 'intranet-bottom.inc' %]