Bug 13618: Add html filters to all the variables
[koha.git] / koha-tmpl / intranet-tmpl / prog / en / modules / tools / viewlog.tt
1 [% USE raw %]
2 [% USE Asset %]
3 [% USE Koha %]
4 [% USE AuthorisedValues %]
5 [% USE Branches %]
6 [% SET footerjs = 1 %]
7 [% INCLUDE 'doc-head-open.inc' %]
8 <title>
9         Koha &rsaquo; Tools &rsaquo;
10         [% IF ( do_it ) %]
11                 Logs &rsaquo; Results
12         [% ELSE %]
13                 Logs
14         [% END %]
15 </title>
16 [% INCLUDE 'doc-head-close.inc' %]
17 </head>
18
19 <body id="tools_viewlog" class="tools">
20 [% INCLUDE 'header.inc' %]
21 [% INCLUDE 'cat-search.inc' %]
22
23 [% BLOCK translate_log_module %]
24 [%    SWITCH module %]
25 [%        CASE 'CATALOGUING'  %]Catalog
26 [%        CASE 'AUTHORITIES'  %]Authorities
27 [%        CASE 'MEMBERS'      %]Patrons
28 [%        CASE 'ACQUISITIONS' %]Acquisitions
29 [%        CASE 'SERIAL'       %]Serials
30 [%        CASE 'HOLDS'        %]Holds
31 [%        CASE 'CIRCULATION'  %]Circulation
32 [%        CASE 'LETTER'       %]Letter
33 [%        CASE 'FINES'        %]Fines
34 [%        CASE 'SYSTEMPREFERENCE' %]System prefs
35 [%        CASE 'CRONJOBS' %]Cron jobs
36 [%        CASE 'REPORTS'      %]Reports
37 [%        CASE %][% module | html %]
38 [%    END %]
39 [% END %]
40
41 [% BLOCK translate_log_action %]
42 [%    SWITCH action %]
43 [%        CASE 'ADD'    %]Add
44 [%        CASE 'DELETE' %]Delete
45 [%        CASE 'MODIFY' %]Modify
46 [%        CASE 'ISSUE'  %]Checkout
47 [%        CASE 'RETURN' %]Return
48 [%        CASE 'CREATE' %]Create
49 [%        CASE 'CANCEL' %]Cancel
50 [%        CASE 'RESUME' %]Resume
51 [%        CASE 'SUSPEND' %]Suspend
52 [%        CASE 'RENEW'  %]Renew
53 [%        CASE 'CHANGE PASS' %]Change password
54 [%        CASE 'ADDCIRCMESSAGE' %]Add circulation message
55 [%        CASE 'DELCIRCMESSAGE' %]Delete circulation message
56 [%        CASE 'Run'    %]Run
57 [%        CASE %][% action | html %]
58 [%    END %]
59 [% END %]
60
61 [% BLOCK translate_log_interface %]
62 [%    SWITCH log_interface %]
63 [%        CASE 'INTRANET'    %]Intranet
64 [%        CASE 'OPAC'        %]OPAC
65 [%        CASE 'SIP'         %]SIP
66 [%        CASE 'COMMANDLINE' %]Command-line
67 [%        CASE %][% log_interface | html %]
68 [%    END %]
69 [% END %]
70
71 <div id="breadcrumbs">
72         <a href="/cgi-bin/koha/mainpage.pl">Home</a> &rsaquo; <a href="/cgi-bin/koha/tools/tools-home.pl">Tools</a> &rsaquo;
73         [% IF ( do_it ) %]
74                 <a href="/cgi-bin/koha/tools/viewlog.pl">Logs</a> &rsaquo; Results
75         [% ELSE %]
76                 Logs
77         [% END %]
78 </div>
79
80 <div id="doc3" class="yui-t2">
81         <div id="bd">
82                 <div id="yui-main">
83                         <div class="yui-b">
84                 [% IF ( CAN_user_reports ) %]
85                                 <h1>Browse system logs</h1>
86                                 <form method="post" action="/cgi-bin/koha/tools/viewlog.pl">
87                                         [% IF ( do_it ) %]
88                                                 <input type="hidden" name="do_it" value="[% do_it | html %]" />
89                                         [% END %]
90                     <input type="hidden" name="src" value="[% src | html %]" />
91                                         <fieldset class="rows">
92                                                 <ol>
93                                                         <li>
94                                                                 <label for="user">Librarian:</label>
95                                 <input type="text" name="user" id="user" value="[% user | html %]" />
96                                                         </li>
97                         <li>
98                                 <label for="modules">Modules:</label>
99                                 <select name="modules" id="modules" multiple="multiple">
100                                     [% UNLESS modules %]
101                                         <option value="" selected="selected">All</option>
102                                     [% ELSE %]
103                                         <option value="">All</option>
104                                     [% END %]
105                                     [% FOREACH modx IN [ 'CATALOGUING' 'AUTHORITIES' 'MEMBERS' 'ACQUISITIONS' 'SERIAL' 'HOLDS' 'CIRCULATION' 'LETTER' 'FINES' 'SYSTEMPREFERENCE' 'CRONJOBS', 'REPORTS' ] %]
106                                         [% IF modules.grep(modx).size %]
107                                             <option value="[% modx | html %]" selected="selected">[% PROCESS translate_log_module module=modx %]</option>
108                                         [% ELSE %]
109                                             <option value="[% modx | html %]">[% PROCESS translate_log_module module=modx %]</option>
110                                         [% END %]
111                                     [% END %]
112                                 </select>
113                             </li>
114                             <li>
115                                 <label for="actions">Actions:</label>
116                                 <select name="actions" id="actions" multiple="multiple">
117                                     [% UNLESS actions %]
118                                         <option value="" selected="selected">All</option>
119                                     [% ELSE %]
120                                         <option value="">All</option>
121                                     [% END %]
122
123                                     [% FOREACH actx IN [ 'ADD' 'DELETE' 'MODIFY' 'ISSUE' 'RETURN' 'RENEW' 'CREATE' 'CANCEL' 'SUSPEND' 'RESUME' 'ADDCIRCMESSAGE' 'DELCIRCMESSAGE' 'CHANGE PASS' 'Run' ] %]
124                                         [% IF actions.grep(actx).size %]
125                                             <option value="[% actx | html %]" selected="selected">[% PROCESS translate_log_action action=actx %]</option>
126                                         [% ELSE %]
127                                                 <option value="[% actx | html %]">[% PROCESS translate_log_action action=actx %]</option>
128                                         [% END %]
129                                     [% END %]
130                                 </select>
131                             </li>
132                                                         <li>
133                                                                 <label for="object">Object: </label>
134                                 <input type="text" id="object" name="object" value="[% object | html %]" />
135                                                         </li>
136                                                         <li>
137                                                                 <label for="info">Info:</label>
138                                 <input type="text" id="info" name="info" value="[% info | html %]" />
139                                                         </li>
140                             <li>
141                                 <label for="interfaces">Interface:</label>
142                                 <select name="interfaces" id="interfaces" multiple="multiple">
143                                     [% UNLESS interfaces %]
144                                         <option value="" selected="selected">All</option>
145                                     [% ELSE %]
146                                         <option value="">All</option>
147                                     [% END %]
148
149                                     [% FOREACH interf IN [ 'INTRANET' 'OPAC' 'SIP' 'COMMANDLINE' ] %]
150                                         [% IF interfaces.grep(interf).size %]
151                                             <option value="[% interf | html %]" selected="selected">[% PROCESS translate_log_interface log_interface=interf %]</option>
152                                         [% ELSE %]
153                                             <option value="[% interf | html %]">[% PROCESS translate_log_interface log_interface=interf %]</option>
154                                         [% END %]
155                                     [% END %]
156                                 </select>
157                             </li>
158                                                         <li>
159                                 <label for="from"> Display from: </label> <input type="text" size="10" id="from" name="from" value="[% datefrom | html %]" class="datepickerfrom" />
160                                 <div class="hint">[% INCLUDE 'date-format.inc' %]</div>
161                                                         </li>
162                                                         <li>
163                                 <label for="to">Display to: </label> <input size="10" id="to" name="to" type="text" value="[% dateto | html %]" class="datepickerto" />
164                                 <div class="hint">[% INCLUDE 'date-format.inc' %]</div>
165                                                         </li>
166                                                 </ol>
167                                         </fieldset>
168                                         <fieldset class="rows">
169                                                 <legend>Output</legend>
170                                                 <ol>
171                                                         <li>
172                                                                 <label for="screen" >To screen in the browser:</label> <input id="screen" type="radio" checked="checked" name="output" value="screen" />
173                                                         </li>
174                                                         <li>
175                                                                 <label for="file">To a file:</label>
176                                                                 <input id="file" type="radio" name="output" value="file" />
177                                                                 <label class="inline" for="basename">Named:</label>
178                                                                 <input type="text" name="basename" id="basename" value="Export" />
179                                                                 <!--
180                                                                         <label for="MIME" class="inline">Into an application:</label>
181                                                                         [% CGIextChoice | html %]
182                                                                         [% CGIsepChoice | html %]
183                                                                 -->
184                                                                 <input type="hidden" name="report_name" value="[% report_name | html %]" />
185                                                         </li>
186                                                 </ol>
187                                         </fieldset>
188                                         <fieldset class="action">
189                                                 <input type="submit" value="Submit" />
190                                                 <input type="hidden" name="do_it" value="1" />
191                                         </fieldset>
192                         </form>
193                 [% END %]
194                 [% IF ( do_it ) %]
195                     [% IF ( total ) %]
196                         <h4>[% total | html %] lines found.</h4>
197                         <table>
198                             <thead>
199                                 <tr>
200                                     <th>Date</th>
201                                     <th>Librarian</th>
202                                     <th>Module</th>
203                                     <th>Action</th>
204                                     <th>Object</th>
205                                     <th>Info</th>
206                                     <th>Interface</th>
207                                 </tr>
208                             </thead>
209                             <tbody>
210                             [% FOREACH loopro IN looprow %]
211                                 <tr>
212                                     <td>[% loopro.timestamp | html %]</td>
213                                     <td>
214                                         [% IF loopro.librarian %]
215                                             <a href="/cgi-bin/koha/members/moremember.pl?borrowernumber=[% loopro.librarian.borrowernumber | html %]" title="display detail for this librarian."> [% IF ( loopro.librarian.firstname ) || ( loopro.librarian.surname ) %][% loopro.librarian.firstname | html %] [% loopro.librarian.surname | html %] ([% loopro.librarian.borrowernumber | html %]) [% ELSE %][% loopro.librarian.borrowernumber | html %][% END %]</a>
216                                         [% ELSE %]
217                                             [% loopro.user | html %]
218                                         [% END %]
219                                     </td>
220                                     <td>[% PROCESS translate_log_module module=loopro.module %]</td>
221                                     <td>[% PROCESS translate_log_action action=loopro.action %]</td>
222                                     <td>
223                                         [% IF ( loopro.module == 'MEMBERS' ) || ( loopro.module == 'CIRCULATION' ) || ( loopro.module == 'FINES' ) %]
224                                             [% IF loopro.patron %]
225                                                 <a href="/cgi-bin/koha/members/moremember.pl?borrowernumber=[% loopro.object | html %]" title="Display member details."> [% IF ( loopro.object ) %][% IF ( loopro.patron.firstname ) || ( loopro.patron.surname ) %][% loopro.patron.firstname | html %] [% loopro.patron.surname | html %] ([% loopro.object | html %]) [% ELSE %]Member [% loopro.object | html %][% END %][% END %] </a>
226                                             [% ELSE %]
227                                                 [% loopro.object | html %]
228                                             [% END %]
229                                         [% ELSE %]
230                                                 [% IF ( loopro.module == 'CATALOGUING' ) %]
231                                                     [% IF ( loopro.info.substr(0, 4) == 'item' ) %]
232                                                         <a href="/cgi-bin/koha/catalogue/moredetail.pl?item=[% loopro.object | html %]&amp;biblionumber=[% loopro.biblionumber | html %]&amp;bi=[% loopro.biblioitemnumber | html %]#item[% loopro.object | html %]">Item [% loopro.object | html %]</a>
233                                                     [% ELSIF ( loopro.info.substr(0, 6) == 'biblio' ) %]
234                                                         <a href="/cgi-bin/koha/catalogue/detail.pl?biblionumber=[% loopro.object | html %]" title="Display detail for this biblio">Biblio [% loopro.object | html %]</a>
235                                                     [% ELSE %]
236                                                         [% loopro.object | html %]
237                                                     [% END %]
238                                                 [% ELSE %]
239                                                     [% IF ( loopro.module == 'SERIAL' ) %]
240                                                         <a href="/cgi-bin/koha/serials/subscription-detail.pl?subscriptionid=[% loopro.object | html %]">Subscription [% loopro.object | html %] </a>
241                                                     [% ELSE %]
242                                                         [% IF ( loopro.module == 'AUTHORITIES' ) %]
243                                                             <a href="/cgi-bin/koha/authorities/detail.pl?authid=[% loopro.object | html %]" title="Display detail for this authority">Authority [% loopro.object | html %]</a>
244                                                         [% ELSE %]
245                                                             [% loopro.object | html %]
246                                                         [% END %]
247                                                     [% END %]
248                                                 [% END %]
249                                         [% END %]
250                                     </td>
251                                     <td>
252                                         [% IF ( loopro.module == 'CIRCULATION' ) %]
253                                             <a href="/cgi-bin/koha/catalogue/moredetail.pl?itemnumber=[% loopro.info | html %]&amp;biblionumber=[% loopro.biblionumber | html %]&amp;bi=[% loopro.biblioitemnumber | html %]#item[% loopro.info | html %]" title="Display detail for this item">Item [% loopro.barcode | html %]</a>
254                                         [% ELSE %]
255                                             [% loopro.info | html %]
256                                         [% END %]
257                                     </td>
258                                     <td>[% PROCESS translate_log_interface log_interface=loopro.interface %]</td>
259                                 </tr>
260                             [% END %]
261                             </tbody>
262                         </table>
263                     [% ELSE %]
264                         <div class="dialog alert">
265                             No log found
266                             [% IF ( CATALOGUING ) %]
267                                 for <a href="/cgi-bin/koha/catalogue/detail.pl?biblionumber=[% object | url %]">Bibliographic record [% object | html %]</a>
268                             [% END %]
269                             [% IF ( MEMBERS ) %]
270                                 for <a href="/cgi-bin/koha/members/moremember.pl?borrowernumber=[% object | url %]">[% INCLUDE 'patron-title.inc' %]</a>
271                             [% END %]
272                             .
273                         </div>
274                     [% END %]
275                 [% END %]
276                         </div>
277                 </div>
278                 <div class="yui-b noprint">
279         [% IF ( circulation ) %]
280                                 [% INCLUDE 'circ-menu.inc' %]
281                         [% ELSE %]
282                                 [% IF ( CATALOGUING ) %]
283                                         [% INCLUDE 'biblio-view-menu.inc' %]
284                                 [% ELSE %]
285                                         [% INCLUDE 'tools-menu.inc' %]
286                                 [% END %]
287                         [% END %]
288                 </div>
289         </div>
290
291 [% MACRO jsinclude BLOCK %]
292     [% INCLUDE 'calendar.inc' %]
293     [% Asset.js("js/tools-menu.js") | $raw %]
294 [% END %]
295
296 [% INCLUDE 'intranet-bottom.inc' %]