+[% USE raw %]
+[% USE Asset %]
+[% USE Koha %]
+[% USE AuthorisedValues %]
+[% USE Branches %]
+[% USE KohaDates %]
+[% SET footerjs = 1 %]
[% INCLUDE 'doc-head-open.inc' %]
<title>
Koha › Tools ›
[% END %]
</title>
[% INCLUDE 'doc-head-close.inc' %]
-[% INCLUDE 'calendar.inc' %]
</head>
-<body class="tools_viewlog" class="tools">
+
+<body id="tools_viewlog" class="tools">
[% INCLUDE 'header.inc' %]
[% INCLUDE 'cat-search.inc' %]
+[% BLOCK translate_log_module %]
+[% SWITCH module %]
+[% CASE 'CATALOGUING' %]Catalog
+[% CASE 'AUTHORITIES' %]Authorities
+[% CASE 'MEMBERS' %]Patrons
+[% CASE 'ACQUISITIONS' %]Acquisitions
+[% CASE 'SERIAL' %]Serials
+[% CASE 'HOLDS' %]Holds
+[% CASE 'CIRCULATION' %]Circulation
+[% CASE 'LETTER' %]Letter
+[% CASE 'FINES' %]Fines
+[% CASE 'SYSTEMPREFERENCE' %]System prefs
+[% CASE 'CRONJOBS' %]Cron jobs
+[% CASE 'REPORTS' %]Reports
+[% CASE %][% module | html %]
+[% END %]
+[% END %]
+
+[% BLOCK translate_log_action %]
+[% SWITCH action %]
+[% CASE 'ADD' %]Add
+[% CASE 'DELETE' %]Delete
+[% CASE 'MODIFY' %]Modify
+[% CASE 'ISSUE' %]Checkout
+[% CASE 'RETURN' %]Return
+[% CASE 'CREATE' %]Create
+[% CASE 'CANCEL' %]Cancel
+[% CASE 'RESUME' %]Resume
+[% CASE 'SUSPEND' %]Suspend
+[% CASE 'RENEW' %]Renew
+[% CASE 'CHANGE PASS' %]Change password
+[% CASE 'ADDCIRCMESSAGE' %]Add circulation message
+[% CASE 'DELCIRCMESSAGE' %]Delete circulation message
+[% CASE 'Run' %]Run
+[% CASE %][% action | html %]
+[% END %]
+[% END %]
+
+[% BLOCK translate_log_interface %]
+[% SWITCH log_interface %]
+[% CASE 'INTRANET' %]Intranet
+[% CASE 'OPAC' %]OPAC
+[% CASE 'SIP' %]SIP
+[% CASE 'COMMANDLINE' %]Command-line
+[% CASE %][% log_interface | html %]
+[% END %]
+[% END %]
+
<div id="breadcrumbs">
<a href="/cgi-bin/koha/mainpage.pl">Home</a> › <a href="/cgi-bin/koha/tools/tools-home.pl">Tools</a> ›
[% IF ( do_it ) %]
[% END %]
</div>
-<div id="doc3" class="yui-t2">
- <div id="bd">
- <div id="yui-main">
- <div class="yui-b">
- [% IF ( CAN_user_reports ) %]
+<div class="main container-fluid">
+ <div class="row">
+ <div class="col-sm-10 col-sm-push-2">
+ <main>
+
<h1>Browse system logs</h1>
<form method="post" action="/cgi-bin/koha/tools/viewlog.pl">
[% IF ( do_it ) %]
- <input type="hidden" name="do_it" value="[% do_it %]" />
+ <input type="hidden" name="do_it" value="[% do_it | html %]" />
[% END %]
- <input type="hidden" name="src" value="[% src %]" />
+ <input type="hidden" name="src" value="[% src | html %]" />
<fieldset class="rows">
<ol>
<li>
<label for="user">Librarian:</label>
- <input type="text" name="user" id="user" value="[% user %]" />
- </li>
- <li>
- <label for="modules">Module:</label>
- <select name="modules" id="modules" multiple="multiple">
- <option value="" selected="selected">All</option>
- <option value ="CATALOGUING">Catalog</option>
- <option value ="AUTHORITIES">Authorities</option>
- <option value ="MEMBERS">Patrons</option>
- <option value ="ACQUISITION">Acquisitions</option>
- <option value ="SERIAL">Serials</option>
- <option value="CIRCULATION">Circulation</option>
- <option value="LETTER">Letter</option>
- <option value="FINES">Fines</option>
- <option value="SYSTEMPREFERENCE">System prefs</option>
- </select>
- </li>
- <li>
- <label for="action">Action:</label>
- <select name="action" id="action">
- <option value ="">All</option>
- <option value ="ADD">Add</option>
- <option value ="DELETE">Delete</option>
- <option value ="MODIFY">Modify</option>
- <option value="ISSUE">Checkout</option>
- <option value="RETURN">Return</option>
- </select>
+ <input type="text" name="user" id="user" value="[% user | html %]" />
</li>
+ <li>
+ <label for="modules">Modules:</label>
+ <select name="modules" id="modules" multiple="multiple">
+ [% UNLESS modules %]
+ <option value="" selected="selected">All</option>
+ [% ELSE %]
+ <option value="">All</option>
+ [% END %]
+ [% FOREACH modx IN [ 'CATALOGUING' 'AUTHORITIES' 'MEMBERS' 'ACQUISITIONS' 'SERIAL' 'HOLDS' 'CIRCULATION' 'LETTER' 'FINES' 'SYSTEMPREFERENCE' 'CRONJOBS', 'REPORTS' ] %]
+ [% IF modules.grep(modx).size %]
+ <option value="[% modx | html %]" selected="selected">[% PROCESS translate_log_module module=modx %]</option>
+ [% ELSE %]
+ <option value="[% modx | html %]">[% PROCESS translate_log_module module=modx %]</option>
+ [% END %]
+ [% END %]
+ </select>
+ </li>
+ <li>
+ <label for="actions">Actions:</label>
+ <select name="actions" id="actions" multiple="multiple">
+ [% UNLESS actions %]
+ <option value="" selected="selected">All</option>
+ [% ELSE %]
+ <option value="">All</option>
+ [% END %]
+
+ [% FOREACH actx IN [ 'ADD' 'DELETE' 'MODIFY' 'ISSUE' 'RETURN' 'RENEW' 'CREATE' 'CANCEL' 'SUSPEND' 'RESUME' 'ADDCIRCMESSAGE' 'DELCIRCMESSAGE' 'CHANGE PASS' 'Run' ] %]
+ [% IF actions.grep(actx).size %]
+ <option value="[% actx | html %]" selected="selected">[% PROCESS translate_log_action action=actx %]</option>
+ [% ELSE %]
+ <option value="[% actx | html %]">[% PROCESS translate_log_action action=actx %]</option>
+ [% END %]
+ [% END %]
+ </select>
+ </li>
<li>
<label for="object">Object: </label>
- <input type="text" id="object" name="object" value="[% object %]" />
+ <input type="text" id="object" name="object" value="[% object | html %]" />
</li>
<li>
<label for="info">Info:</label>
- <input type="text" id="info" name="info" value="[% info %]" />
+ <input type="text" id="info" name="info" value="[% info | html %]" />
</li>
+ <li>
+ <label for="interfaces">Interface:</label>
+ <select name="interfaces" id="interfaces" multiple="multiple">
+ [% UNLESS interfaces %]
+ <option value="" selected="selected">All</option>
+ [% ELSE %]
+ <option value="">All</option>
+ [% END %]
+
+ [% FOREACH interf IN [ 'INTRANET' 'OPAC' 'SIP' 'COMMANDLINE' ] %]
+ [% IF interfaces.grep(interf).size %]
+ <option value="[% interf | html %]" selected="selected">[% PROCESS translate_log_interface log_interface=interf %]</option>
+ [% ELSE %]
+ <option value="[% interf | html %]">[% PROCESS translate_log_interface log_interface=interf %]</option>
+ [% END %]
+ [% END %]
+ </select>
+ </li>
<li>
- <label for="from"> Display from: </label> <input type="text" size="10" id="from" name="from" value="[% datefrom %]" />
- <img src="[% themelang %]/lib/calendar/cal.gif" border="0" alt="Show calendar" id="openCalendarFrom" style="cursor: pointer;" />
+ <label for="from"> Display from: </label> <input type="text" size="10" id="from" name="from" value="[% datefrom | html %]" class="datepickerfrom" />
<div class="hint">[% INCLUDE 'date-format.inc' %]</div>
</li>
<li>
- <label for="to">Display to: </label> <input size="10" id="to" name="to" type="text" value="[% dateto %]" />
- <img src="[% themelang %]/lib/calendar/cal.gif" id="openCalendarTo" alt="Show calendar" style="cursor: pointer;" border="0" />
- <script type="text/javascript">
- //<![CDATA[
-
- // return true if the date is blocked.
- function disable_from(date) {var limit = get_Calendar_limit(date,'to' ); return (limit && limit < date);}
- function disable_to (date) {var limit = get_Calendar_limit(date,'from'); return (limit && limit > date);}
-
- Calendar.setup({
- inputField : "from",
- ifFormat : "[% DHTMLcalendar_dateformat %]",
- button : "openCalendarFrom",
- disableFunc : disable_from,
- dateStatusFunc : disable_from
- });
- Calendar.setup({
- inputField : "to",
- ifFormat : "[% DHTMLcalendar_dateformat %]",
- button : "openCalendarTo",
- disableFunc : disable_to,
- dateStatusFunc : disable_to
- });
- //]]>
- </script>
+ <label for="to">Display to: </label> <input size="10" id="to" name="to" type="text" value="[% dateto | html %]" class="datepickerto" />
<div class="hint">[% INCLUDE 'date-format.inc' %]</div>
</li>
</ol>
<input type="text" name="basename" id="basename" value="Export" />
<!--
<label for="MIME" class="inline">Into an application:</label>
- [% CGIextChoice %]
- [% CGIsepChoice %]
+ [% CGIextChoice | html %]
+ [% CGIsepChoice | html %]
-->
- <input type="hidden" name="report_name" value="[% report_name %]" />
+ <input type="hidden" name="report_name" value="[% report_name | html %]" />
</li>
</ol>
</fieldset>
<input type="hidden" name="do_it" value="1" />
</fieldset>
</form>
- [% END %]
[% IF ( do_it ) %]
[% IF ( total ) %]
- <h4>[% total %] lines found.</h4>
+ <h4>[% total | html %] lines found.</h4>
<table>
- <tr>
- <th>Date</th>
- <th>Librarian</th>
- <th>Module</th>
- <th>Action</th>
- <th>Object</th>
- <th>Info</th>
- </tr>
+ <thead>
+ <tr>
+ <th>Date</th>
+ <th>Librarian</th>
+ <th>Module</th>
+ <th>Action</th>
+ <th>Object</th>
+ <th>Info</th>
+ <th>Interface</th>
+ </tr>
+ </thead>
+ <tbody>
[% FOREACH loopro IN looprow %]
- [% UNLESS ( loop.odd ) %]<tr class="highlight">[% ELSE %]<tr>[% END %]
<tr>
- <td>[% loopro.timestamp %]</td>
+ <td>[% loopro.timestamp | $KohaDates with_hours=1 %]</td>
<td>
- [% IF ( module == 'CIRCULATION' ) %]
- <a href="/cgi-bin/koha/members/moremember.pl?borrowernumber=[% loopro.user %]" title="display detail for this user."> [% loopro.user %] </a>
+ [% IF loopro.librarian %]
+ <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>
[% ELSE %]
- <a href="/cgi-bin/koha/members/moremember.pl?borrowernumber=[% loopro.user %]" title="display detail for this librarian."> [% loopro.user %] </a>
+ [% loopro.user | html %]
[% END %]
</td>
- <td>[% loopro.module %]</td>
- <td>[% loopro.action %]</td>
+ <td>[% PROCESS translate_log_module module=loopro.module %]</td>
+ <td>[% PROCESS translate_log_action action=loopro.action %]</td>
<td>
- [% IF ( module == 'MEMBERS' ) %]
- <a href="/cgi-bin/koha/members/moremember.pl?borrowernumber=[% loopro.object %]" title="Display member details."> member [% loopro.object %] </a>
- [% ELSE %]
- [% IF ( module == 'CIRCULATION' ) %]
- <a href="/cgi-bin/koha/members/moremember.pl?borrowernumber=[% loopro.object %]" title="Display member details.">
- [% IF ( loopro.object ) %]
- member [% loopro.object %]
- [% END %]
- </a>
+ [% IF ( loopro.module == 'MEMBERS' ) || ( loopro.module == 'CIRCULATION' ) || ( loopro.module == 'FINES' ) %]
+ [% IF loopro.patron %]
+ <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>
[% ELSE %]
- [% IF ( module == 'CATALOGUING' ) %]
- [% IF ( info == 'item' ) %]
- <a href="/cgi-bin/koha/catalogue/moredetail.pl?item=[% loopro.object %]&biblionumber=[% loopro.biblionumber %]&bi=[% loopro.biblioitemnumber %]#item[% loopro.object %]">Item [% loopro.object %]</a>
+ [% loopro.object | html %]
+ [% END %]
+ [% ELSE %]
+ [% IF ( loopro.module == 'CATALOGUING' ) %]
+ [% IF ( loopro.info.substr(0, 4) == 'item' ) %]
+ <a href="/cgi-bin/koha/catalogue/moredetail.pl?item=[% loopro.object | uri %]&biblionumber=[% loopro.biblionumber | uri %]&bi=[% loopro.biblioitemnumber | uri %]#item[% loopro.object | uri %]">Item [% loopro.object | html %]</a>
+ [% ELSIF ( loopro.info.substr(0, 6) == 'biblio' ) %]
+ <a href="/cgi-bin/koha/catalogue/detail.pl?biblionumber=[% loopro.object | uri %]" title="Display detail for this biblio">Biblio [% loopro.object | html %]</a>
[% ELSE %]
- <a href="/cgi-bin/koha/catalogue/detail.pl?biblionumber=[% loopro.object %]" title="Display detail for this biblio">biblio [% loopro.object %]</a>
+ [% loopro.object | html %]
[% END %]
[% ELSE %]
- [% IF ( module == 'SERIAL' ) %]
- <a href="/cgi-bin/koha/serials/subscription-detail.pl?subscriptionid=[% loopro.object %]"> [% loopro.object %] </a>
+ [% IF ( loopro.module == 'SERIAL' ) %]
+ <a href="/cgi-bin/koha/serials/subscription-detail.pl?subscriptionid=[% loopro.object | uri %]">Subscription [% loopro.object | html %] </a>
[% ELSE %]
- [% IF ( module == 'AUTHORITIES' ) %]
- <a href="/cgi-bin/koha/authorities/detail.pl?authid=[% loopro.object %]" title="Display detail for this authority">auth [% loopro.object %]</a>
+ [% IF ( loopro.module == 'AUTHORITIES' ) %]
+ <a href="/cgi-bin/koha/authorities/detail.pl?authid=[% loopro.object | uri %]" title="Display detail for this authority">Authority [% loopro.object | html %]</a>
[% ELSE %]
- [% loopro.object %]
+ [% loopro.object | html %]
[% END %]
[% END %]
[% END %]
- [% END %]
[% END %]
</td>
<td>
- [% IF ( loopro.CIRCULATION ) %]
- <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.barcode |html %]</a>
+ [% IF ( loopro.module == 'CIRCULATION' ) %]
+ <a href="/cgi-bin/koha/catalogue/moredetail.pl?itemnumber=[% loopro.info | uri %]&biblionumber=[% loopro.biblionumber | uri %]&bi=[% loopro.biblioitemnumber | uri %]#item[% loopro.info | uri %]" title="Display detail for this item">Item [% loopro.barcode | html %]</a>
[% ELSE %]
- [% loopro.info |html %]
+ [% loopro.info | html %]
[% END %]
</td>
+ <td>[% PROCESS translate_log_interface log_interface=loopro.interface %]</td>
</tr>
[% END %]
+ </tbody>
</table>
[% ELSE %]
<div class="dialog alert">
No log found
[% IF ( CATALOGUING ) %]
- for <a href="/cgi-bin/koha/catalogue/detail.pl?biblionumber=[% object %]">Bibliographic record [% object %]</a>
+ for <a href="/cgi-bin/koha/catalogue/detail.pl?biblionumber=[% object | url %]">Bibliographic record [% object | html %]</a>
[% END %]
[% IF ( MEMBERS ) %]
- for <a href="/cgi-bin/koha/members/moremember.pl?borrowernumber=[% object %]">[% INCLUDE 'patron-title.inc' %]</a>
+ for <a href="/cgi-bin/koha/members/moremember.pl?borrowernumber=[% object | url %]">[% INCLUDE 'patron-title.inc' %]</a>
[% END %]
.
</div>
[% END %]
[% END %]
- </div>
- </div>
- <div class="yui-b noprint">
- [% IF ( menu ) %]
- [% INCLUDE 'circ-menu.inc' %]
- [% ELSE %]
- [% IF ( CATALOGUING ) %]
- [% INCLUDE 'biblio-view-menu.inc' %]
- [% ELSE %]
- [% INCLUDE 'tools-menu.inc' %]
- [% END %]
- [% END %]
- </div>
- </div>
+
+
+ </main>
+ </div> <!-- /.col-sm-10.col-sm-push-2 -->
+
+ <div class="col-sm-2 col-sm-pull-10">
+ <aside>
+ [% IF ( circulation ) %]
+ [% INCLUDE 'circ-menu.inc' %]
+ [% ELSE %]
+ [% IF ( CATALOGUING ) %]
+ [% INCLUDE 'biblio-view-menu.inc' %]
+ [% ELSE %]
+ [% INCLUDE 'tools-menu.inc' %]
+ [% END %]
+ [% END %]
+ </aside>
+ </div> <!-- /.col-sm-2.col-sm-pull-10 -->
+ </div> <!-- /.row -->
+
+[% MACRO jsinclude BLOCK %]
+ [% INCLUDE 'calendar.inc' %]
+ [% Asset.js("js/tools-menu.js") | $raw %]
+ [% IF ( circulation ) %]
+ [% INCLUDE 'str/members-menu.inc' %]
+ [% Asset.js("js/members-menu.js") | $raw %]
+ [% END %]
+[% END %]
+
[% INCLUDE 'intranet-bottom.inc' %]