Bug 20538: Remove the need of writing [% KOHA_VERSION %] everywhere
[koha.git] / koha-tmpl / intranet-tmpl / prog / en / modules / tools / viewlog.tt
1 [% USE Asset %]
2 [% USE Koha %]
3 [% USE AuthorisedValues %]
4 [% USE Branches %]
5 [% SET footerjs = 1 %]
6 [% INCLUDE 'doc-head-open.inc' %]
7 <title>
8         Koha &rsaquo; Tools &rsaquo;
9         [% IF ( do_it ) %]
10                 Logs &rsaquo; Results
11         [% ELSE %]
12                 Logs
13         [% END %]
14 </title>
15 [% INCLUDE 'doc-head-close.inc' %]
16 </head>
17
18 <body id="tools_viewlog" class="tools">
19 [% INCLUDE 'header.inc' %]
20 [% INCLUDE 'cat-search.inc' %]
21
22 [% BLOCK translate_log_module %]
23 [%    SWITCH module %]
24 [%        CASE 'CATALOGUING'  %]Catalog
25 [%        CASE 'AUTHORITIES'  %]Authorities
26 [%        CASE 'MEMBERS'      %]Patrons
27 [%        CASE 'ACQUISITIONS' %]Acquisitions
28 [%        CASE 'SERIAL'       %]Serials
29 [%        CASE 'HOLDS'        %]Holds
30 [%        CASE 'CIRCULATION'  %]Circulation
31 [%        CASE 'LETTER'       %]Letter
32 [%        CASE 'FINES'        %]Fines
33 [%        CASE 'SYSTEMPREFERENCE' %]System prefs
34 [%        CASE 'CRONJOBS' %]Cron jobs
35 [%        CASE 'REPORTS'      %]Reports
36 [%        CASE %][% module %]
37 [%    END %]
38 [% END %]
39
40 [% BLOCK translate_log_action %]
41 [%    SWITCH action %]
42 [%        CASE 'ADD'    %]Add
43 [%        CASE 'DELETE' %]Delete
44 [%        CASE 'MODIFY' %]Modify
45 [%        CASE 'ISSUE'  %]Checkout
46 [%        CASE 'RETURN' %]Return
47 [%        CASE 'CREATE' %]Create
48 [%        CASE 'CANCEL' %]Cancel
49 [%        CASE 'RESUME' %]Resume
50 [%        CASE 'SUSPEND' %]Suspend
51 [%        CASE 'RENEW'  %]Renew
52 [%        CASE 'CHANGE PASS' %]Change password
53 [%        CASE 'ADDCIRCMESSAGE' %]Add circulation message
54 [%        CASE 'DELCIRCMESSAGE' %]Delete circulation message
55 [%        CASE 'Run'    %]Run
56 [%        CASE %][% action %]
57 [%    END %]
58 [% END %]
59
60 [% BLOCK translate_log_interface %]
61 [%    SWITCH log_interface %]
62 [%        CASE 'INTRANET'    %]Intranet
63 [%        CASE 'OPAC'        %]OPAC
64 [%        CASE 'SIP'         %]SIP
65 [%        CASE 'COMMANDLINE' %]Command-line
66 [%        CASE %][% log_interface %]
67 [%    END %]
68 [% END %]
69
70 <div id="breadcrumbs">
71         <a href="/cgi-bin/koha/mainpage.pl">Home</a> &rsaquo; <a href="/cgi-bin/koha/tools/tools-home.pl">Tools</a> &rsaquo;
72         [% IF ( do_it ) %]
73                 <a href="/cgi-bin/koha/tools/viewlog.pl">Logs</a> &rsaquo; Results
74         [% ELSE %]
75                 Logs
76         [% END %]
77 </div>
78
79 <div id="doc3" class="yui-t2">
80         <div id="bd">
81                 <div id="yui-main">
82                         <div class="yui-b">
83                 [% IF ( CAN_user_reports ) %]
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 %]" />
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 %]" selected="selected">[% PROCESS translate_log_module module=modx %]</option>
107                                         [% ELSE %]
108                                             <option value="[% modx %]">[% 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 %]" selected="selected">[% PROCESS translate_log_action action=actx %]</option>
125                                         [% ELSE %]
126                                                 <option value="[% actx %]">[% 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 %]" selected="selected">[% PROCESS translate_log_interface log_interface=interf %]</option>
151                                         [% ELSE %]
152                                             <option value="[% interf %]">[% 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 %]
181                                                                         [% CGIsepChoice %]
182                                                                 -->
183                                                                 <input type="hidden" name="report_name" value="[% report_name %]" />
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                 [% END %]
193                 [% IF ( do_it ) %]
194                     [% IF ( total ) %]
195                         <h4>[% total %] lines found.</h4>
196                         <table>
197                             <thead>
198                                 <tr>
199                                     <th>Date</th>
200                                     <th>Librarian</th>
201                                     <th>Module</th>
202                                     <th>Action</th>
203                                     <th>Object</th>
204                                     <th>Info</th>
205                                     <th>Interface</th>
206                                 </tr>
207                             </thead>
208                             <tbody>
209                             [% FOREACH loopro IN looprow %]
210                                 <tr>
211                                     <td>[% loopro.timestamp %]</td>
212                                     <td>
213                                         [% IF loopro.librarian %]
214                                             <a href="/cgi-bin/koha/members/moremember.pl?borrowernumber=[% loopro.librarian.borrowernumber %]" title="display detail for this librarian."> [% IF ( loopro.librarian.firstname ) || ( loopro.librarian.surname ) %][% loopro.librarian.firstname %] [% loopro.librarian.surname %] ([% loopro.librarian.borrowernumber %]) [% ELSE %][% loopro.librarian.borrowernumber %][% END %]</a>
215                                         [% ELSE %]
216                                             [% loopro.user %]
217                                         [% END %]
218                                     </td>
219                                     <td>[% PROCESS translate_log_module module=loopro.module %]</td>
220                                     <td>[% PROCESS translate_log_action action=loopro.action %]</td>
221                                     <td>
222                                         [% IF ( loopro.module == 'MEMBERS' ) || ( loopro.module == 'CIRCULATION' ) || ( loopro.module == 'FINES' ) %]
223                                             [% IF loopro.patron %]
224                                                 <a href="/cgi-bin/koha/members/moremember.pl?borrowernumber=[% loopro.object %]" title="Display member details."> [% IF ( loopro.object ) %][% IF ( loopro.patron.firstname ) || ( loopro.patron.surname ) %][% loopro.patron.firstname %] [% loopro.patron.surname %] ([% loopro.object %]) [% ELSE %]Member [% loopro.object %][% END %][% END %] </a>
225                                             [% ELSE %]
226                                                 [% loopro.object %]
227                                             [% END %]
228                                         [% ELSE %]
229                                                 [% IF ( loopro.module == 'CATALOGUING' ) %]
230                                                     [% IF ( loopro.info.substr(0, 4) == 'item' ) %]
231                                                         <a href="/cgi-bin/koha/catalogue/moredetail.pl?item=[% loopro.object %]&amp;biblionumber=[% loopro.biblionumber %]&amp;bi=[% loopro.biblioitemnumber %]#item[% loopro.object %]">Item [% loopro.object %]</a>
232                                                     [% ELSIF ( loopro.info.substr(0, 6) == 'biblio' ) %]
233                                                         <a href="/cgi-bin/koha/catalogue/detail.pl?biblionumber=[% loopro.object %]" title="Display detail for this biblio">Biblio [% loopro.object %]</a>
234                                                     [% ELSE %]
235                                                         [% loopro.object %]
236                                                     [% END %]
237                                                 [% ELSE %]
238                                                     [% IF ( loopro.module == 'SERIAL' ) %]
239                                                         <a href="/cgi-bin/koha/serials/subscription-detail.pl?subscriptionid=[% loopro.object %]">Subscription [% loopro.object %] </a>
240                                                     [% ELSE %]
241                                                         [% IF ( loopro.module == 'AUTHORITIES' ) %]
242                                                             <a href="/cgi-bin/koha/authorities/detail.pl?authid=[% loopro.object %]" title="Display detail for this authority">Authority [% loopro.object %]</a>
243                                                         [% ELSE %]
244                                                             [% loopro.object %]
245                                                         [% END %]
246                                                     [% END %]
247                                                 [% END %]
248                                         [% END %]
249                                     </td>
250                                     <td>
251                                         [% IF ( loopro.module == 'CIRCULATION' ) %]
252                                             <a href="/cgi-bin/koha/catalogue/moredetail.pl?itemnumber=[% loopro.info %]&amp;biblionumber=[% loopro.biblionumber %]&amp;bi=[% loopro.biblioitemnumber %]#item[% loopro.info %]" title="Display detail for this item">Item [% loopro.barcode |html %]</a>
253                                         [% ELSE %]
254                                             [% loopro.info |html %]
255                                         [% END %]
256                                     </td>
257                                     <td>[% PROCESS translate_log_interface log_interface=loopro.interface %]</td>
258                                 </tr>
259                             [% END %]
260                             </tbody>
261                         </table>
262                     [% ELSE %]
263                         <div class="dialog alert">
264                             No log found
265                             [% IF ( CATALOGUING ) %]
266                                 for <a href="/cgi-bin/koha/catalogue/detail.pl?biblionumber=[% object | url %]">Bibliographic record [% object | html %]</a>
267                             [% END %]
268                             [% IF ( MEMBERS ) %]
269                                 for <a href="/cgi-bin/koha/members/moremember.pl?borrowernumber=[% object | url %]">[% INCLUDE 'patron-title.inc' %]</a>
270                             [% END %]
271                             .
272                         </div>
273                     [% END %]
274                 [% END %]
275                         </div>
276                 </div>
277                 <div class="yui-b noprint">
278         [% IF ( circulation ) %]
279                                 [% INCLUDE 'circ-menu.inc' %]
280                         [% ELSE %]
281                                 [% IF ( CATALOGUING ) %]
282                                         [% INCLUDE 'biblio-view-menu.inc' %]
283                                 [% ELSE %]
284                                         [% INCLUDE 'tools-menu.inc' %]
285                                 [% END %]
286                         [% END %]
287                 </div>
288         </div>
289
290 [% MACRO jsinclude BLOCK %]
291     [% INCLUDE 'calendar.inc' %]
292     [% Asset.js("js/tools-menu.js") %]
293 [% END %]
294
295 [% INCLUDE 'intranet-bottom.inc' %]