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