Merge remote-tracking branch 'origin/new/bug_6199'
[koha.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 class="tools_viewlog" class="tools">
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                                 [% UNLESS ( loop.odd ) %]<tr class="highlight">[% ELSE %]<tr>[% END %]
152                                 <tr>
153                                     <td>[% loopro.timestamp %]</td>
154                                     <td>
155                                        [% IF ( module == 'CIRCULATION' ) %]
156                                         <a href="/cgi-bin/koha/members/moremember.pl?borrowernumber=[% loopro.user %]" title="display detail for this user."> [% loopro.user %] </a>
157                                         [% ELSE %]
158                                         <a href="/cgi-bin/koha/members/moremember.pl?borrowernumber=[% loopro.user %]" title="display detail for this librarian."> [% loopro.user %] </a>
159                                         [% END %]
160                                     </td>
161                                     <td>[% loopro.module %]</td>
162                                     <td>[% loopro.action %]</td>
163                                     <td>
164                                         [% IF ( module == 'MEMBERS' ) %]
165                                             <a href="/cgi-bin/koha/members/moremember.pl?borrowernumber=[% loopro.object %]" title="Display member details."> member [% loopro.object %] </a>
166                                         [% ELSE %]
167                                             [% IF ( module == 'CIRCULATION' ) %]
168                                             <a href="/cgi-bin/koha/members/moremember.pl?borrowernumber=[% loopro.object %]" title="Display member details.">
169                                                 [% IF ( loopro.object ) %]
170                                                     member [% loopro.object %]
171                                                 [% END %]
172                                             </a>
173                                             [% ELSE %]
174                                                 [% IF ( module == 'CATALOGUING' ) %]
175                                                     [% IF ( info == 'item' ) %]
176                                                         <a href="/cgi-bin/koha/catalogue/moredetail.pl?item=[% loopro.object %]&biblionumber=[% loopro.biblionumber %]&bi=[% loopro.biblioitemnumber %]#item[% loopro.object %]">Item [% loopro.object %]</a>
177                                                     [% ELSE %]
178                                                         <a href="/cgi-bin/koha/catalogue/detail.pl?biblionumber=[% loopro.object %]" title="Display detail for this biblio">biblio [% loopro.object %]</a>
179                                                     [% END %]
180                                                 [% ELSE %]
181                                                     [% IF ( module == 'SERIAL' ) %]
182                                                         <a href="/cgi-bin/koha/serials/subscription-detail.pl?subscriptionid=[% loopro.object %]"> [% loopro.object %] </a>
183                                                     [% ELSE %]
184                                                         [% IF ( module == 'AUTHORITIES' ) %]
185                                                             <a href="/cgi-bin/koha/authorities/detail.pl?authid=[% loopro.object %]" title="Display detail for this authority">auth [% loopro.object %]</a>
186                                                         [% ELSE %]
187                                                             [% loopro.object %]
188                                                         [% END %]
189                                                     [% END %]
190                                                 [% END %]
191                                             [% END %]
192                                         [% END %]
193                                     </td>
194                                     <td>
195                                         [% IF ( loopro.CIRCULATION ) %]
196                                             <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>
197                                         [% ELSE %]
198                                             [% loopro.info |html %]
199                                         [% END %]
200                                     </td>
201                                 </tr>
202                             [% END %]
203                         </table>
204                     [% ELSE %]
205                         <div class="dialog alert">
206                             No log found
207                             [% IF ( CATALOGUING ) %]
208                                 for <a href="/cgi-bin/koha/catalogue/detail.pl?biblionumber=[% object %]">Bibliographic Record [% object %]</a>
209                             [% END %]
210                             [% IF ( MEMBERS ) %]
211                                 for <a href="/cgi-bin/koha/members/moremember.pl?borrowernumber=[% object %]">[% INCLUDE 'patron-title.inc' %]</a>
212                             [% END %]
213                             .
214                         </div>
215                     [% END %]
216                 [% END %]
217                         </div>
218                 </div>
219                 <div class="yui-b noprint">
220                         [% IF ( menu ) %]
221                                 [% INCLUDE 'circ-menu.inc' %]
222                         [% ELSE %]
223                                 [% IF ( CATALOGUING ) %]
224                                         [% INCLUDE 'biblio-view-menu.inc' %]
225                                 [% ELSE %]
226                                         [% INCLUDE 'tools-menu.inc' %]
227                                 [% END %]
228                         [% END %]
229                 </div>
230         </div>
231 [% INCLUDE 'intranet-bottom.inc' %]