Bug 7304: More permissions for budgets
[koha.git] / koha-tmpl / intranet-tmpl / prog / en / modules / admin / aqbudget_user_search.tt
1 [% INCLUDE 'doc-head-open.inc' %]
2 <title>Koha &rsaquo; Budget
3     [% IF (type == 'owner') %]
4         owner
5     [% ELSE %]
6         user
7     [% END %]
8     search
9 </title>
10 [% INCLUDE 'doc-head-close.inc' %]
11     <style type="text/css">
12     #custom-doc {
13         width:44.46em;
14         *width:43.39em;
15         min-width:578px;
16         margin:auto;
17         text-align:left;
18     }
19     </style>
20
21     <script type="text/javascript">
22     //<![CDATA[
23
24     // modify parent window owner element
25     function add_user(borrowernumber, surname, firstname) {
26         [% IF (type == 'owner') %]
27             top.opener.edit_owner(borrowernumber, surname, firstname);
28             window.close();
29         [% ELSE %]
30             var ret = top.opener.add_user(borrowernumber, surname, firstname);
31             if (ret != 0) {
32                 alert(_("This user is already in the list."));
33             }
34         [% END %]
35     }
36
37     //]]>
38     </script>
39 </head>
40
41 <body id="admin_aqbudget_owner_search" class="admin">
42 <div id="custom-doc" class="yui-t7">
43 <div id="bd">
44 <div class="yui-g">
45
46 <h3>Search for budget
47     [% IF (type == 'owner') %]
48         owner
49     [% ELSE %]
50         user
51     [% END %]
52 </h3>
53 <form action="/cgi-bin/koha/admin/aqbudget_user_search.pl" method="post">
54     <fieldset>
55         <input type="text" name="member" id="member" value="[% member %]"
56             class="focus" />
57
58         <input type="hidden" name="type" value="[% type %]" />
59         <input type="submit" class="button" value="Search" />
60     </fieldset>
61
62     <div class="hint">
63         Only staff with superlibrarian or acquisitions permissions are returned
64         in the search results.
65     </div>
66 </form>
67
68
69 [% IF ( results ) %]
70     <p>Searched for <span class="ex">[% member %]</span>,
71     [% resultsloop.size || 0 %] patron(s) found:</p>
72
73     <table>
74         <thead>
75             <tr>
76                 <th>Cardnumber</th>
77                 <th>Name</th>
78                 <th>Library</th>
79                 <th>Categorycode</th>
80                 <th>Select?</th>
81             </tr>
82         </thead>
83
84         <tbody>
85             [% FOREACH result IN resultsloop %]
86                 <tr>
87                     <td>[% result.cardnumber %]</td>
88                     <td>[% result.surname %], [% result.firstname %]</td>
89                     <td>[% result.branchcode %]</td>
90                     <td>[% result.categorycode %]</td>
91                     <td>
92                     <a style="cursor:pointer"
93                         onclick="add_user(
94                             '[% result.borrowernumber %]',
95                             '[% result.surname %]',
96                             '[% result.firstname %]'
97                         );"
98                     />Select</a>
99                     </td>
100                 </tr>
101             [% END %]
102         </tbody>
103     </table>
104 [% END %]
105
106 <div id="closewindow">
107     <a href="#" class="close">Close</a>
108 </div>
109 </div>
110 </div>
111 [% INCLUDE 'intranet-bottom.inc' %]