Bug 13889: Add information about cron jobs to system log
[koha.git] / koha-tmpl / intranet-tmpl / prog / en / modules / tools / viewlog.tt
blob41414a2c6f1e92cfde5d972be9fabc1703bcde64
1 [% USE Koha %]
2 [% INCLUDE 'doc-head-open.inc' %]
3 <title>
4         Koha &rsaquo; Tools &rsaquo;
5         [% IF ( do_it ) %]
6                 Logs &rsaquo; Results
7         [% ELSE %]
8                 Logs
9         [% END %]
10 </title>
11 [% INCLUDE 'doc-head-close.inc' %]
12 [% INCLUDE 'calendar.inc' %]
13 </head>
14 <body id="tools_viewlog" class="tools">
15 [% INCLUDE 'header.inc' %]
16 [% INCLUDE 'cat-search.inc' %]
18 [% BLOCK translate_log_module %]
19 [%    SWITCH module %]
20 [%        CASE 'CATALOGUING'  %]Catalog
21 [%        CASE 'AUTHORITIES'  %]Authorities
22 [%        CASE 'MEMBERS'      %]Patrons
23 [%        CASE 'ACQUISITIONS' %]Acquisitions
24 [%        CASE 'SERIAL'       %]Serials
25 [%        CASE 'CIRCULATION'  %]Circulation
26 [%        CASE 'LETTER'       %]Letter
27 [%        CASE 'FINES'        %]Fines
28 [%        CASE 'SYSTEMPREFERENCE' %]System prefs
29 [%        CASE 'CRONJOBS' %]Cron jobs
30 [%        CASE %][% module %]
31 [%    END %]
32 [% END %]
34 [% BLOCK translate_log_action %]
35 [%    SWITCH action %]
36 [%        CASE 'ADD'    %]Add
37 [%        CASE 'DELETE' %]Delete
38 [%        CASE 'MODIFY' %]Modify
39 [%        CASE 'ISSUE'  %]Checkout
40 [%        CASE 'RETURN' %]Return
41 [%        CASE 'CREATE' %]Create
42 [%        CASE %][% action %]
43 [%    END %]
44 [% END %]
46 <div id="breadcrumbs">
47         <a href="/cgi-bin/koha/mainpage.pl">Home</a> &rsaquo; <a href="/cgi-bin/koha/tools/tools-home.pl">Tools</a> &rsaquo;
48         [% IF ( do_it ) %]
49                 <a href="/cgi-bin/koha/tools/viewlog.pl">Logs</a> &rsaquo; Results
50         [% ELSE %]
51                 Logs
52         [% END %]
53 </div>
55 <div id="doc3" class="yui-t2">
56         <div id="bd">
57                 <div id="yui-main">
58                         <div class="yui-b">
59                 [% IF ( CAN_user_reports ) %]
60                                 <h1>Browse system logs</h1>
61                                 <form method="post" action="/cgi-bin/koha/tools/viewlog.pl">
62                                         [% IF ( do_it ) %]
63                                                 <input type="hidden" name="do_it" value="[% do_it %]" />
64                                         [% END %]
65                                         <input type="hidden" name="src" value="[% src %]" />
66                                         <fieldset class="rows">
67                                                 <ol>
68                                                         <li>
69                                                                 <label for="user">Librarian:</label>
70                                                                 <input type="text" name="user" id="user" value="[% user %]" />
71                                                         </li>
72                         <li>
73                                 <label for="modules">Modules:</label>
74                                 <select name="modules" id="modules" multiple="multiple">
75                                     [% UNLESS modules %]
76                                         <option value="" selected="selected">All</option>
77                                     [% ELSE %]
78                                         <option value="">All</option>
79                                     [% END %]
80                                     [% FOREACH modx IN [ 'CATALOGUING' 'AUTHORITIES' 'MEMBERS' 'ACQUISITIONS' 'SERIAL' 'CIRCULATION' 'LETTER' 'FINES' 'SYSTEMPREFERENCE' 'CRONJOBS' ] %]
81                                         [% IF modules.grep(modx).size %]
82                                             <option value="[% modx %]" selected="selected">[% PROCESS translate_log_module module=modx %]</option>
83                                         [% ELSE %]
84                                             <option value="[% modx %]">[% PROCESS translate_log_module module=modx %]</option>
85                                         [% END %]
86                                     [% END %]
87                                 </select>
88                             </li>
89                             <li>
90                                 <label for="actions">Actions:</label>
91                                 <select name="actions" id="actions" multiple="multiple">
92                                     [% UNLESS actions %]
93                                         <option value="" selected="selected">All</option>
94                                     [% ELSE %]
95                                         <option value="">All</option>
96                                     [% END %]
98                                     [% FOREACH actx IN [ 'ADD' 'DELETE' 'MODIFY' 'ISSUE' 'RETURN' 'CREATE' ] %]
99                                         [% IF actions.grep(actx).size %]
100                                             <option value="[% actx %]" selected="selected">[% PROCESS translate_log_action action=actx %]</option>
101                                         [% ELSE %]
102                                                 <option value="[% actx %]">[% PROCESS translate_log_action action=actx %]</option>
103                                         [% END %]
104                                     [% END %]
105                                 </select>
106                             </li>
107                                                         <li>
108                                                                 <label for="object">Object: </label>
109                                                                 <input type="text" id="object" name="object" value="[% object %]" />
110                                                         </li>
111                                                         <li>
112                                                                 <label for="info">Info:</label>
113                                                                 <input type="text" id="info" name="info" value="[% info %]" />
114                                                         </li>
115                                                         <li>
116                                 <label for="from"> Display from: </label> <input type="text" size="10" id="from" name="from" value="[% datefrom %]" class="datepickerfrom" />
117                                 <div class="hint">[% INCLUDE 'date-format.inc' %]</div>
118                                                         </li>
119                                                         <li>
120                                 <label for="to">Display to: </label> <input size="10" id="to" name="to" type="text" value="[% dateto %]" class="datepickerto" />
121                                 <div class="hint">[% INCLUDE 'date-format.inc' %]</div>
122                                                         </li>
123                                                 </ol>
124                                         </fieldset>
125                                         <fieldset class="rows">
126                                                 <legend>Output</legend>
127                                                 <ol>
128                                                         <li>
129                                                                 <label for="screen" >To screen in the browser:</label> <input id="screen" type="radio" checked="checked" name="output" value="screen" />
130                                                         </li>
131                                                         <li>
132                                                                 <label for="file">To a file:</label>
133                                                                 <input id="file" type="radio" name="output" value="file" />
134                                                                 <label class="inline" for="basename">Named:</label>
135                                                                 <input type="text" name="basename" id="basename" value="Export" />
136                                                                 <!--
137                                                                         <label for="MIME" class="inline">Into an application:</label>
138                                                                         [% CGIextChoice %]
139                                                                         [% CGIsepChoice %]
140                                                                 -->
141                                                                 <input type="hidden" name="report_name" value="[% report_name %]" />
142                                                         </li>
143                                                 </ol>
144                                         </fieldset>
145                                         <fieldset class="action">
146                                                 <input type="submit" value="Submit" />
147                                                 <input type="hidden" name="do_it" value="1" />
148                                         </fieldset>
149                         </form>
150                 [% END %]
151                 [% IF ( do_it ) %]
152                     [% IF ( total ) %]
153                         <h4>[% total %] lines found.</h4>
154                         <table>
155                             <thead>
156                                 <tr>
157                                     <th>Date</th>
158                                     <th>Librarian</th>
159                                     <th>Module</th>
160                                     <th>Action</th>
161                                     <th>Object</th>
162                                     <th>Info</th>
163                                 </tr>
164                             </thead>
165                             <tbody>
166                             [% FOREACH loopro IN looprow %]
167                                 [% UNLESS ( loop.odd ) %]<tr class="highlight">[% ELSE %]<tr>[% END %]
168                                     <td>[% loopro.timestamp %]</td>
169                                     <td>
170                                         <a href="/cgi-bin/koha/members/moremember.pl?borrowernumber=[% loopro.user %]" title="display detail for this librarian."> [% IF ( loopro.userfirstname ) || ( loopro.usersurname ) %][% loopro.userfirstname %] [% loopro.usersurname %] ([% loopro.user %]) [% ELSE %][% loopro.user %][% END %]</a>
171                                     </td>
172                                     <td>[% PROCESS translate_log_module module=loopro.module %]</td>
173                                     <td>[% PROCESS translate_log_action action=loopro.action %]</td>
174                                     <td>
175                                         [% IF ( loopro.module == 'MEMBERS' ) || ( loopro.module == 'CIRCULATION' ) || ( loopro.module == 'FINES' ) %]
176                                              <a href="/cgi-bin/koha/members/moremember.pl?borrowernumber=[% loopro.object %]" title="Display member details."> [% IF ( loopro.object ) %][% IF ( loopro.borrowerfirstname ) || ( loopro.borrowersurname ) %][% loopro.borrowerfirstname %] [% loopro.borrowersurname %] ([% loopro.object %]) [% ELSE %]Member [% loopro.object %][% END %][% END %] </a>
177                                         [% ELSE %]
178                                                 [% IF ( loopro.module == 'CATALOGUING' ) %]
179                                                     [% IF ( loopro.info.substr(0, 4) == 'item' ) %]
180                                                         <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>
181                                                     [% ELSIF ( loopro.info.substr(0, 6) == 'biblio' ) %]
182                                                         <a href="/cgi-bin/koha/catalogue/detail.pl?biblionumber=[% loopro.object %]" title="Display detail for this biblio">Biblio [% loopro.object %]</a>
183                                                     [% ELSE %]
184                                                         [% loopro.object %]
185                                                     [% END %]
186                                                 [% ELSE %]
187                                                     [% IF ( loopro.module == 'SERIAL' ) %]
188                                                         <a href="/cgi-bin/koha/serials/subscription-detail.pl?subscriptionid=[% loopro.object %]">Subscription [% loopro.object %] </a>
189                                                     [% ELSE %]
190                                                         [% IF ( loopro.module == 'AUTHORITIES' ) %]
191                                                             <a href="/cgi-bin/koha/authorities/detail.pl?authid=[% loopro.object %]" title="Display detail for this authority">Authority [% loopro.object %]</a>
192                                                         [% ELSE %]
193                                                             [% loopro.object %]
194                                                         [% END %]
195                                                     [% END %]
196                                                 [% END %]
197                                         [% END %]
198                                     </td>
199                                     <td>
200                                         [% IF ( loopro.module == 'CIRCULATION' ) %]
201                                             <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>
202                                         [% ELSE %]
203                                             [% loopro.info |html %]
204                                         [% END %]
205                                     </td>
206                                 </tr>
207                             [% END %]
208                             </tbody>
209                         </table>
210                     [% ELSE %]
211                         <div class="dialog alert">
212                             No log found
213                             [% IF ( CATALOGUING ) %]
214                                 for <a href="/cgi-bin/koha/catalogue/detail.pl?biblionumber=[% object %]">Bibliographic record [% object %]</a>
215                             [% END %]
216                             [% IF ( MEMBERS ) %]
217                                 for <a href="/cgi-bin/koha/members/moremember.pl?borrowernumber=[% object %]">[% INCLUDE 'patron-title.inc' %]</a>
218                             [% END %]
219                             .
220                         </div>
221                     [% END %]
222                 [% END %]
223                         </div>
224                 </div>
225                 <div class="yui-b noprint">
226                         [% IF ( menu ) %]
227                                 [% INCLUDE 'circ-menu.inc' %]
228                         [% ELSE %]
229                                 [% IF ( CATALOGUING ) %]
230                                         [% INCLUDE 'biblio-view-menu.inc' %]
231                                 [% ELSE %]
232                                         [% INCLUDE 'tools-menu.inc' %]
233                                 [% END %]
234                         [% END %]
235                 </div>
236         </div>
237 [% INCLUDE 'intranet-bottom.inc' %]