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