Merge remote-tracking branch 'kc/new/bug_5868' into kcmaster
[wip/koha-chris_n.git] / koha-tmpl / intranet-tmpl / prog / en / modules / tools / viewlog.tt
1 [% INCLUDE 'doc-head-open.inc' %]
2 <title>
3         Koha &rsaquo; Tools &rsaquo;
4         [% IF ( do_it ) %]
5                 Logs &rsaquo; Results
6         [% ELSE %]
7                 Logs
8         [% END %]
9 </title>
10 [% INCLUDE 'doc-head-close.inc' %]
11 [% INCLUDE 'calendar.inc' %]
12 </head>
13 <body>
14 [% INCLUDE 'header.inc' %]
15 [% INCLUDE 'cat-search.inc' %]
16
17 <div id="breadcrumbs">
18         <a href="/cgi-bin/koha/mainpage.pl">Home</a> &rsaquo; <a href="/cgi-bin/koha/tools/tools-home.pl">Tools</a> &rsaquo;
19         [% IF ( do_it ) %]
20                 <a href="/cgi-bin/koha/tools/viewlog.pl">Logs</a> &rsaquo; Results
21         [% ELSE %]
22                 Logs
23         [% END %]
24 </div>
25
26 <div id="doc3" class="yui-t2">
27         <div id="bd">
28                 <div id="yui-main">
29                         <div class="yui-b">
30                 [% IF ( CAN_user_reports ) %]
31                                 <h1>Browse system logs</h1>
32                                 <form method="post" action="/cgi-bin/koha/tools/viewlog.pl">
33                                         [% IF ( do_it ) %]
34                                                 <input type="hidden" name="do_it" value="[% do_it %]" />
35                                         [% END %]
36                                         <input type="hidden" name="src" value="[% src %]" />
37                                         <fieldset class="rows">
38                                                 <ol>
39                                                         <li>
40                                                                 <label for="user">Librarian:</label>
41                                                                 <input type="text" name="user" id="user" value="[% user %]" />
42                                                         </li>
43                                                         <li>
44                                                                 <label for="modules">Module:</label>
45                                                                 <select name="modules" id="modules" multiple="multiple">
46                                                                         <option value="" selected="selected">All</option>
47                                                                         <option value ="CATALOGUING">Catalog</option>
48                                                                         <option value ="AUTHORITIES">Authorities</option>
49                                                                         <option value ="MEMBERS">Patrons</option>
50                                                                         <option value ="ACQUISITION">Acquisitions</option>
51                                                                         <option value ="SERIAL">Serials</option>
52                                                                         <option value="CIRCULATION">Circulation</option>
53                                                                         <option value="LETTER">Letter</option>
54                                                                         <option value="FINES">Fines</option>
55                                                                         <option value="SYSTEMPREFERENCE">System Prefs</option>
56                                                                 </select>
57                                                         </li>
58                                                         <li>
59                                                                 <label for="action">Action:</label>
60                                                                 <select name="action" id="action">
61                                                                         <option value ="">All</option>
62                                                                         <option value ="add">Add</option>
63                                                                         <option value ="del">Delete</option>
64                                                                         <option value ="mod">Modify</option>
65                                                                         <option value="issue">Checkout</option>
66                                                                         <option value="return">Return</option>
67                                                                 </select>
68                                                         </li>
69                                                         <li>
70                                                                 <label for="object">Object: </label>
71                                                                 <input type="text" id="object" name="object" value="[% object %]" />
72                                                         </li>
73                                                         <li>
74                                                                 <label for="info">Info:</label>
75                                                                 <input type="text" id="info" name="info" value="[% info %]" />
76                                                         </li>
77                                                         <li>
78                                                                 <label for="from"> Display from: </label> <input type="text" size="10" id="from" name="from" value="[% datefrom %]" />
79                                                                 <img src="[% themelang %]/lib/calendar/cal.gif" border="0" alt="Show Calendar" id="openCalendarFrom" style="cursor: pointer;" />
80                                 <div class="hint">[% INCLUDE 'date-format.inc' %]</div>
81                                                         </li>
82                                                         <li>
83                                                                 <label for="to">Display to: </label> <input size="10" id="to" name="to" type="text" value="[% dateto %]" />
84                                                                 <img src="[% themelang %]/lib/calendar/cal.gif" id="openCalendarTo" alt="Show Calendar" style="cursor: pointer;" border="0" />
85                                                                         <script type="text/javascript">
86                                                                         //<![CDATA[
87
88                                                                         // return true if the date is blocked.
89                                                                         function disable_from(date) {var limit = get_Calendar_limit(date,'to'  ); return (limit && limit < date);}
90                                                                         function disable_to  (date) {var limit = get_Calendar_limit(date,'from'); return (limit && limit > date);}
91
92                                                                         Calendar.setup({
93                                                                                 inputField : "from",
94                                                                                 ifFormat : "[% DHTMLcalendar_dateformat %]",
95                                                                                 button : "openCalendarFrom",
96                                                                                 disableFunc : disable_from,
97                                                                                 dateStatusFunc : disable_from
98                                                                         });
99                                                                         Calendar.setup({
100                                                                                 inputField : "to",
101                                                                                 ifFormat : "[% DHTMLcalendar_dateformat %]",
102                                                                                 button : "openCalendarTo",
103                                                                                 disableFunc : disable_to,
104                                                                                 dateStatusFunc : disable_to
105                                                                         });
106                                                                         //]]>
107                                                                         </script>
108                                 <div class="hint">[% INCLUDE 'date-format.inc' %]</div>
109                                                         </li>
110                                                 </ol>
111                                         </fieldset>
112                                         <fieldset class="rows">
113                                                 <legend>Output</legend>
114                                                 <ol>
115                                                         <li>
116                                                                 <label for="screen" >To screen in the browser:</label> <input id="screen" type="radio" checked="checked" name="output" value="screen" />
117                                                         </li>
118                                                         <li>
119                                                                 <label for="file">To a file:</label>
120                                                                 <input id="file" type="radio" name="output" value="file" />
121                                                                 <label class="inline" for="basename">Named:</label>
122                                                                 <input type="text" name="basename" id="basename" value="Export" />
123                                                                 <!--
124                                                                         <label for="MIME" class="inline">Into an application:</label>
125                                                                         [% CGIextChoice %]
126                                                                         [% CGIsepChoice %]
127                                                                 -->
128                                                                 <input type="hidden" name="report_name" value="[% report_name %]" />
129                                                         </li>
130                                                 </ol>
131                                         </fieldset>
132                                         <fieldset class="action">
133                                                 <input type="submit" value="Submit" />
134                                                 <input type="hidden" name="do_it" value="1" />
135                                         </fieldset>
136                                         [% IF ( do_it ) %]
137                                                 [% IF ( total ) %]
138                                                         <h4>[% total %] lines found.</h4>
139                                                         <table>
140                                                                 <tr>
141                                                                         <th>Date</th>
142                                                                         <th>Librarian</th>
143                                                                         <th>Module</th>
144                                                                         <th>Action</th>
145                                                                         <th>Object</th>
146                                                                         <th>Info</th>
147                                                                 </tr>
148                                                                 [% FOREACH loopro IN looprow %]
149                                                                         [% UNLESS ( loop.odd ) %]<tr class="highlight">[% ELSE %]<tr>[% END %]
150                                                                                 <td>[% loopro.timestamp %]</td>
151                                                                                 <td>
152                                                                                         <a href="/cgi-bin/koha/members/moremember.pl?borrowernumber=[% loopro.user %]" title="display detail for this librarian."> [% loopro.user %] </a>
153                                                                                 </td>
154                                                                                 <td>[% loopro.module %]</td>
155                                                                                 <td>[% loopro.action %]</td>
156                                                                                 <td>
157                                                                                         [% IF ( module == 'MEMBERS' ) %]
158                                                                                                 <a href="/cgi-bin/koha/members/moremember.pl?borrowernumber=[% loopro.object %]" title="Display member details."> member [% loopro.object %] </a>
159                                                                                         [% ELSE %]
160                                                                                                 [% IF ( module == 'CIRCULATION' ) %]
161                                                                                                         <a href="/cgi-bin/koha/members/moremember.pl?borrowernumber=[% loopro.object %]" title="Display member details.">
162                                                                                                                 [% IF ( loopro.object ) %]
163                                                                                                                         member [% loopro.object %]
164                                                                                                                 [% END %]
165                                                                                                         </a>
166                                                                                                 [% ELSE %]
167                                                                                                         [% IF ( module == 'CATALOGUING' ) %]
168                                                                                                                 [% IF ( info == 'item' ) %]
169                                                                                                                         <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>
170                                                                                                                 [% ELSE %]
171                                                                                                                         <a href="/cgi-bin/koha/catalogue/detail.pl?biblionumber=[% loopro.object %]" title="Display detail for this biblio">biblio [% loopro.object %]</a>
172                                                                                                                 [% END %]
173                                                                                                         [% ELSE %]
174                                                                                                                 [% IF ( module == 'SERIAL' ) %]
175                                                                                                                         <a href="/cgi-bin/koha/serials/subscription-detail.pl?subscriptionid=[% loopro.object %]"> [% loopro.object %] </a>
176                                                                                                                 [% ELSE %]
177                                                                                                                         [% IF ( module == 'AUTHORITIES' ) %]
178                                                                                                                                 <a href="/cgi-bin/koha/authorities/detail.pl?authid=[% loopro.object %]" title="Display detail for this authority">auth [% loopro.object %]</a>
179                                                                                                                         [% ELSE %]
180                                                                                                                                 [% loopro.object %]
181                                                                                                                         [% END %]
182                                                                                                                 [% END %]
183                                                                                                         [% END %]
184                                                                                                 [% END %]
185                                                                                         [% END %]
186                                                                                 </td>
187                                                                                 <td>
188                                                                                         [% IF ( loopro.CIRCULATION ) %]
189                                                                                                 <a href="/cgi-bin/koha/catalogue/detail.pl?biblionumber=[% loopro.info %]" title="Display detail for this biblio">biblio [% loopro.info |html %]</a>
190                                                                                         [% ELSE %]
191                                                                                                 [% loopro.info |html %]
192                                                                                         [% END %]
193                                                                                 </td>
194                                                                         </tr>
195                                                                 [% END %]
196                                                         </table>
197                                                 [% ELSE %]
198                                                         <div class="dialog alert">
199                                                                 No log found
200                                                                 [% IF ( CATALOGUING ) %]
201                                                                         for <a href="/cgi-bin/koha/catalogue/detail.pl?biblionumber=[% object %]">Bibliographic Record [% object %]</a>
202                                                                 [% END %]
203                                                                 [% IF ( MEMBERS ) %]
204                                                                         for <a href="/cgi-bin/koha/members/moremember.pl?borrowernumber=[% object %]">[% firstname %] [% surname %] ([% cardnumber %])</a>
205                                                                 [% END %]
206                                                                 .
207                                                         </div>
208                                                 [% END %]
209                                         [% END %]
210
211                                 </form>
212                 [% END %]
213                 [% IF ( do_it ) %]
214                     [% IF ( total ) %]
215                         <h4>[% total %] lines found.</h4>
216                         <table>
217                             <tr>
218                                 <th>Date</th>
219                                 <th>Librarian</th>
220                                 <th>Module</th>
221                                 <th>Action</th>
222                                 <th>Object</th>
223                                 <th>Info</th>
224                             </tr>
225                             [% FOREACH loopro IN looprow %]
226                                 <tr>
227                                     <td>[% loopro.timestamp %]</td>
228                                     <td>
229                                        [% IF ( module == 'CIRCULATION' ) %]
230                                         <a href="/cgi-bin/koha/members/moremember.pl?borrowernumber=[% loopro.user %]" title="display detail for this user."> [% loopro.user %] </a>
231                                         [% ELSE %]
232                                         <a href="/cgi-bin/koha/members/moremember.pl?borrowernumber=[% loopro.user %]" title="display detail for this librarian."> [% loopro.user %] </a>
233                                         [% END %]
234                                     </td>
235                                     <td>[% loopro.module %]</td>
236                                     <td>[% loopro.action %]</td>
237                                     <td>
238                                         [% IF ( module == 'MEMBERS' ) %]
239                                             <a href="/cgi-bin/koha/members/moremember.pl?borrowernumber=[% loopro.object %]" title="Display member details."> member [% loopro.object %] </a>
240                                         [% ELSE %]
241                                             [% IF ( module == 'CIRCULATION' ) %]
242                                             <a href="/cgi-bin/koha/members/moremember.pl?borrowernumber=[% loopro.object %]" title="Display member details."> member [% loopro.object %] </a>
243                                             [% ELSE %]
244                                                 [% IF ( module == 'CATALOGUING' ) %]
245                                                     [% IF ( info == 'item' ) %]
246                                                         <a href="/cgi-bin/koha/catalogue/moredetail.pl?item=[% loopro.object %]&biblionumber=[% loopro.biblionumber %]&bi=[% loopro.biblioitemnumber %]#item[% loopro.object %]">Item [% loopro.object %]</a>
247                                                     [% ELSE %]
248                                                         <a href="/cgi-bin/koha/catalogue/detail.pl?biblionumber=[% loopro.object %]" title="Display detail for this biblio">biblio [% loopro.object %]</a>
249                                                     [% END %]
250                                                 [% ELSE %]
251                                                     [% IF ( module == 'SERIAL' ) %]
252                                                         <a href="/cgi-bin/koha/serials/subscription-detail.pl?subscriptionid=[% loopro.object %]"> [% loopro.object %] </a>
253                                                     [% ELSE %]
254                                                         [% loopro.object %]
255                                                     [% END %]
256                                                 [% END %]
257                                             [% END %]
258                                         [% END %]
259                                     </td>
260                                     <td>
261                                         [% IF ( loopro.CIRCULATION ) %]
262                                             <a href="/cgi-bin/koha/catalogue/moredetail.pl?item=[% loopro.info %]&biblionumber=[% loopro.biblionumber %]&bi=[% loopro.biblioitemnumber %]#item[% loopro.object %]" title="Display detail for this biblio">Item [% loopro.info |html %]</a>
263                                         [% ELSE %]
264                                             [% loopro.info |html %]
265                                         [% END %]
266                                     </td>
267                                 </tr>
268                             [% END %]
269                         </table>
270                     [% ELSE %]
271                         <div class="dialog alert">
272                             No log found
273                             [% IF ( CATALOGUING ) %]
274                                 for <a href="/cgi-bin/koha/catalogue/detail.pl?biblionumber=[% object %]">Bibliographic Record [% object %]</a>
275                             [% END %]
276                             [% IF ( MEMBERS ) %]
277                                 for <a href="/cgi-bin/koha/members/moremember.pl?borrowernumber=[% object %]">[% firstname %] [% surname %] ([% cardnumber %])</a>
278                             [% END %]
279                             .
280                         </div>
281                     [% END %]
282                 [% END %]
283                         </div>
284                 </div>
285                 <div class="yui-b noprint">
286                         [% IF ( menu ) %]
287                                 [% INCLUDE 'circ-menu.inc' %]
288                         [% ELSE %]
289                                 [% IF ( CATALOGUING ) %]
290                                         [% INCLUDE 'biblio-view-menu.inc' %]
291                                 [% ELSE %]
292                                         [% INCLUDE 'tools-menu.inc' %]
293                                 [% END %]
294                         [% END %]
295                 </div>
296         </div>
297 [% INCLUDE 'intranet-bottom.inc' %]