Bug 6460: alternative fix, updating template and script instead of C4::Log
[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 ="DELETE">Delete</option>
64                                                                         <option value ="MODIFY">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                                 </form>
137                 [% END %]
138                 [% IF ( do_it ) %]
139                     [% IF ( total ) %]
140                         <h4>[% total %] lines found.</h4>
141                         <table>
142                             <tr>
143                                 <th>Date</th>
144                                 <th>Librarian</th>
145                                 <th>Module</th>
146                                 <th>Action</th>
147                                 <th>Object</th>
148                                 <th>Info</th>
149                             </tr>
150                             [% FOREACH loopro IN looprow %]
151                                 <tr>
152                                     <td>[% loopro.timestamp %]</td>
153                                     <td>
154                                        [% IF ( module == 'CIRCULATION' ) %]
155                                         <a href="/cgi-bin/koha/members/moremember.pl?borrowernumber=[% loopro.user %]" title="display detail for this user."> [% loopro.user %] </a>
156                                         [% ELSE %]
157                                         <a href="/cgi-bin/koha/members/moremember.pl?borrowernumber=[% loopro.user %]" title="display detail for this librarian."> [% loopro.user %] </a>
158                                         [% END %]
159                                     </td>
160                                     <td>[% loopro.module %]</td>
161                                     <td>[% loopro.action %]</td>
162                                     <td>
163                                         [% IF ( module == 'MEMBERS' ) %]
164                                             <a href="/cgi-bin/koha/members/moremember.pl?borrowernumber=[% loopro.object %]" title="Display member details."> member [% loopro.object %] </a>
165                                         [% ELSE %]
166                                             [% IF ( module == 'CIRCULATION' ) %]
167                                             <a href="/cgi-bin/koha/members/moremember.pl?borrowernumber=[% loopro.object %]" title="Display member details."> member [% loopro.object %] </a>
168                                             [% ELSE %]
169                                                 [% IF ( module == 'CATALOGUING' ) %]
170                                                     [% IF ( info == 'item' ) %]
171                                                         <a href="/cgi-bin/koha/catalogue/moredetail.pl?item=[% loopro.object %]&biblionumber=[% loopro.biblionumber %]&bi=[% loopro.biblioitemnumber %]#item[% loopro.object %]">Item [% loopro.object %]</a>
172                                                     [% ELSE %]
173                                                         <a href="/cgi-bin/koha/catalogue/detail.pl?biblionumber=[% loopro.object %]" title="Display detail for this biblio">biblio [% loopro.object %]</a>
174                                                     [% END %]
175                                                 [% ELSE %]
176                                                     [% IF ( module == 'SERIAL' ) %]
177                                                         <a href="/cgi-bin/koha/serials/subscription-detail.pl?subscriptionid=[% loopro.object %]"> [% loopro.object %] </a>
178                                                     [% ELSE %]
179                                                         [% loopro.object %]
180                                                     [% END %]
181                                                 [% END %]
182                                             [% END %]
183                                         [% END %]
184                                     </td>
185                                     <td>
186                                         [% IF ( loopro.CIRCULATION ) %]
187                                             <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>
188                                         [% ELSE %]
189                                             [% loopro.info |html %]
190                                         [% END %]
191                                     </td>
192                                 </tr>
193                             [% END %]
194                         </table>
195                     [% ELSE %]
196                         <div class="dialog alert">
197                             No log found
198                             [% IF ( CATALOGUING ) %]
199                                 for <a href="/cgi-bin/koha/catalogue/detail.pl?biblionumber=[% object %]">Bibliographic Record [% object %]</a>
200                             [% END %]
201                             [% IF ( MEMBERS ) %]
202                                 for <a href="/cgi-bin/koha/members/moremember.pl?borrowernumber=[% object %]">[% firstname %] [% surname %] ([% cardnumber %])</a>
203                             [% END %]
204                             .
205                         </div>
206                     [% END %]
207                 [% END %]
208                         </div>
209                 </div>
210                 <div class="yui-b noprint">
211                         [% IF ( menu ) %]
212                                 [% INCLUDE 'circ-menu.inc' %]
213                         [% ELSE %]
214                                 [% IF ( CATALOGUING ) %]
215                                         [% INCLUDE 'biblio-view-menu.inc' %]
216                                 [% ELSE %]
217                                         [% INCLUDE 'tools-menu.inc' %]
218                                 [% END %]
219                         [% END %]
220                 </div>
221         </div>
222 [% INCLUDE 'intranet-bottom.inc' %]