Bug 7996: (QA follow-up) Remove unnecessary permission check view logs template
[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                                 <h1>Browse system logs</h1>
85                                 <form method="post" action="/cgi-bin/koha/tools/viewlog.pl">
86                                         [% IF ( do_it ) %]
87                                                 <input type="hidden" name="do_it" value="[% do_it | html %]" />
88                                         [% END %]
89                     <input type="hidden" name="src" value="[% src | html %]" />
90                                         <fieldset class="rows">
91                                                 <ol>
92                                                         <li>
93                                                                 <label for="user">Librarian:</label>
94                                 <input type="text" name="user" id="user" value="[% user | html %]" />
95                                                         </li>
96                         <li>
97                                 <label for="modules">Modules:</label>
98                                 <select name="modules" id="modules" multiple="multiple">
99                                     [% UNLESS modules %]
100                                         <option value="" selected="selected">All</option>
101                                     [% ELSE %]
102                                         <option value="">All</option>
103                                     [% END %]
104                                     [% FOREACH modx IN [ 'CATALOGUING' 'AUTHORITIES' 'MEMBERS' 'ACQUISITIONS' 'SERIAL' 'HOLDS' 'CIRCULATION' 'LETTER' 'FINES' 'SYSTEMPREFERENCE' 'CRONJOBS', 'REPORTS' ] %]
105                                         [% IF modules.grep(modx).size %]
106                                             <option value="[% modx | html %]" selected="selected">[% PROCESS translate_log_module module=modx %]</option>
107                                         [% ELSE %]
108                                             <option value="[% modx | html %]">[% PROCESS translate_log_module module=modx %]</option>
109                                         [% END %]
110                                     [% END %]
111                                 </select>
112                             </li>
113                             <li>
114                                 <label for="actions">Actions:</label>
115                                 <select name="actions" id="actions" multiple="multiple">
116                                     [% UNLESS actions %]
117                                         <option value="" selected="selected">All</option>
118                                     [% ELSE %]
119                                         <option value="">All</option>
120                                     [% END %]
121
122                                     [% FOREACH actx IN [ 'ADD' 'DELETE' 'MODIFY' 'ISSUE' 'RETURN' 'RENEW' 'CREATE' 'CANCEL' 'SUSPEND' 'RESUME' 'ADDCIRCMESSAGE' 'DELCIRCMESSAGE' 'CHANGE PASS' 'Run' ] %]
123                                         [% IF actions.grep(actx).size %]
124                                             <option value="[% actx | html %]" selected="selected">[% PROCESS translate_log_action action=actx %]</option>
125                                         [% ELSE %]
126                                                 <option value="[% actx | html %]">[% PROCESS translate_log_action action=actx %]</option>
127                                         [% END %]
128                                     [% END %]
129                                 </select>
130                             </li>
131                                                         <li>
132                                                                 <label for="object">Object: </label>
133                                 <input type="text" id="object" name="object" value="[% object | html %]" />
134                                                         </li>
135                                                         <li>
136                                                                 <label for="info">Info:</label>
137                                 <input type="text" id="info" name="info" value="[% info | html %]" />
138                                                         </li>
139                             <li>
140                                 <label for="interfaces">Interface:</label>
141                                 <select name="interfaces" id="interfaces" multiple="multiple">
142                                     [% UNLESS interfaces %]
143                                         <option value="" selected="selected">All</option>
144                                     [% ELSE %]
145                                         <option value="">All</option>
146                                     [% END %]
147
148                                     [% FOREACH interf IN [ 'INTRANET' 'OPAC' 'SIP' 'COMMANDLINE' ] %]
149                                         [% IF interfaces.grep(interf).size %]
150                                             <option value="[% interf | html %]" selected="selected">[% PROCESS translate_log_interface log_interface=interf %]</option>
151                                         [% ELSE %]
152                                             <option value="[% interf | html %]">[% PROCESS translate_log_interface log_interface=interf %]</option>
153                                         [% END %]
154                                     [% END %]
155                                 </select>
156                             </li>
157                                                         <li>
158                                 <label for="from"> Display from: </label> <input type="text" size="10" id="from" name="from" value="[% datefrom | html %]" class="datepickerfrom" />
159                                 <div class="hint">[% INCLUDE 'date-format.inc' %]</div>
160                                                         </li>
161                                                         <li>
162                                 <label for="to">Display to: </label> <input size="10" id="to" name="to" type="text" value="[% dateto | html %]" class="datepickerto" />
163                                 <div class="hint">[% INCLUDE 'date-format.inc' %]</div>
164                                                         </li>
165                                                 </ol>
166                                         </fieldset>
167                                         <fieldset class="rows">
168                                                 <legend>Output</legend>
169                                                 <ol>
170                                                         <li>
171                                                                 <label for="screen" >To screen in the browser:</label> <input id="screen" type="radio" checked="checked" name="output" value="screen" />
172                                                         </li>
173                                                         <li>
174                                                                 <label for="file">To a file:</label>
175                                                                 <input id="file" type="radio" name="output" value="file" />
176                                                                 <label class="inline" for="basename">Named:</label>
177                                                                 <input type="text" name="basename" id="basename" value="Export" />
178                                                                 <!--
179                                                                         <label for="MIME" class="inline">Into an application:</label>
180                                                                         [% CGIextChoice | html %]
181                                                                         [% CGIsepChoice | html %]
182                                                                 -->
183                                                                 <input type="hidden" name="report_name" value="[% report_name | html %]" />
184                                                         </li>
185                                                 </ol>
186                                         </fieldset>
187                                         <fieldset class="action">
188                                                 <input type="submit" value="Submit" />
189                                                 <input type="hidden" name="do_it" value="1" />
190                                         </fieldset>
191                         </form>
192                 [% IF ( do_it ) %]
193                     [% IF ( total ) %]
194                         <h4>[% total | html %] lines found.</h4>
195                         <table>
196                             <thead>
197                                 <tr>
198                                     <th>Date</th>
199                                     <th>Librarian</th>
200                                     <th>Module</th>
201                                     <th>Action</th>
202                                     <th>Object</th>
203                                     <th>Info</th>
204                                     <th>Interface</th>
205                                 </tr>
206                             </thead>
207                             <tbody>
208                             [% FOREACH loopro IN looprow %]
209                                 <tr>
210                                     <td>[% loopro.timestamp | html %]</td>
211                                     <td>
212                                         [% IF loopro.librarian %]
213                                             <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>
214                                         [% ELSE %]
215                                             [% loopro.user | html %]
216                                         [% END %]
217                                     </td>
218                                     <td>[% PROCESS translate_log_module module=loopro.module %]</td>
219                                     <td>[% PROCESS translate_log_action action=loopro.action %]</td>
220                                     <td>
221                                         [% IF ( loopro.module == 'MEMBERS' ) || ( loopro.module == 'CIRCULATION' ) || ( loopro.module == 'FINES' ) %]
222                                             [% IF loopro.patron %]
223                                                 <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>
224                                             [% ELSE %]
225                                                 [% loopro.object | html %]
226                                             [% END %]
227                                         [% ELSE %]
228                                                 [% IF ( loopro.module == 'CATALOGUING' ) %]
229                                                     [% IF ( loopro.info.substr(0, 4) == 'item' ) %]
230                                                         <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>
231                                                     [% ELSIF ( loopro.info.substr(0, 6) == 'biblio' ) %]
232                                                         <a href="/cgi-bin/koha/catalogue/detail.pl?biblionumber=[% loopro.object | html %]" title="Display detail for this biblio">Biblio [% loopro.object | html %]</a>
233                                                     [% ELSE %]
234                                                         [% loopro.object | html %]
235                                                     [% END %]
236                                                 [% ELSE %]
237                                                     [% IF ( loopro.module == 'SERIAL' ) %]
238                                                         <a href="/cgi-bin/koha/serials/subscription-detail.pl?subscriptionid=[% loopro.object | html %]">Subscription [% loopro.object | html %] </a>
239                                                     [% ELSE %]
240                                                         [% IF ( loopro.module == 'AUTHORITIES' ) %]
241                                                             <a href="/cgi-bin/koha/authorities/detail.pl?authid=[% loopro.object | html %]" title="Display detail for this authority">Authority [% loopro.object | html %]</a>
242                                                         [% ELSE %]
243                                                             [% loopro.object | html %]
244                                                         [% END %]
245                                                     [% END %]
246                                                 [% END %]
247                                         [% END %]
248                                     </td>
249                                     <td>
250                                         [% IF ( loopro.module == 'CIRCULATION' ) %]
251                                             <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>
252                                         [% ELSE %]
253                                             [% loopro.info | html %]
254                                         [% END %]
255                                     </td>
256                                     <td>[% PROCESS translate_log_interface log_interface=loopro.interface %]</td>
257                                 </tr>
258                             [% END %]
259                             </tbody>
260                         </table>
261                     [% ELSE %]
262                         <div class="dialog alert">
263                             No log found
264                             [% IF ( CATALOGUING ) %]
265                                 for <a href="/cgi-bin/koha/catalogue/detail.pl?biblionumber=[% object | url %]">Bibliographic record [% object | html %]</a>
266                             [% END %]
267                             [% IF ( MEMBERS ) %]
268                                 for <a href="/cgi-bin/koha/members/moremember.pl?borrowernumber=[% object | url %]">[% INCLUDE 'patron-title.inc' %]</a>
269                             [% END %]
270                             .
271                         </div>
272                     [% END %]
273                 [% END %]
274                         </div>
275                 </div>
276                 <div class="yui-b noprint">
277         [% IF ( circulation ) %]
278                                 [% INCLUDE 'circ-menu.inc' %]
279                         [% ELSE %]
280                                 [% IF ( CATALOGUING ) %]
281                                         [% INCLUDE 'biblio-view-menu.inc' %]
282                                 [% ELSE %]
283                                         [% INCLUDE 'tools-menu.inc' %]
284                                 [% END %]
285                         [% END %]
286                 </div>
287         </div>
288
289 [% MACRO jsinclude BLOCK %]
290     [% INCLUDE 'calendar.inc' %]
291     [% Asset.js("js/tools-menu.js") | $raw %]
292 [% END %]
293
294 [% INCLUDE 'intranet-bottom.inc' %]