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