Koha/koha-tmpl/intranet-tmpl/prog/en/includes/mana/mana-report-search-result.inc
Owen Leonard 247dca3064
Bug 23013: Upgrade DataTables in the staff client
This patch upgrades DataTables and makes some style changes to the
default DataTables toolbar style. DataTables assets are now combined and
minified using their download customizer, bundling together these
elements:

 - JSZip 2.5.0
 - pdfmake 0.1.36
 - DataTables 1.10.18
 - Buttons 1.5.6
 - Column visibility 1.5.6
 - HTML5 export 1.5.6
 - Print view 1.5.6
 - FixedHeader 3.1.4

DataTables assets have been moved from lib/jquery/plugins to
lib/datatables. The global header and footer include files are updated
correspondingly.

This patch removes the custom "four_button" pagination configuration and
updates pages which used it to use the built-in "full" type instead.
This is done for the sake of consistency and upgradability. This change
touches a lot of files.

Table-specific CSS has been moved from staff-global.scss to a new
include, _tables.scss. A second common include, _mixins.scss has some
variable definitions used in both files.

Many images have been made obsolete by this change and have been
removed.

To test, apply the patch and regenerate the staff client CSS. View
various pages in the staff client with tables:

 - Not formatted by DataTables:
   - Reports -> Most circulated items
   - Catalog -> Search results
 - Formatted by DataTables without column configuration
   - Acquisitions -> Vendor search
   - Lists
 - Formatted by DataTables with column configuration
   - Administration -> Libraries
   - Administration -> Item types
   - Reports -> Saved SQL reports
 - Non-standard DataTables configurations:
   - Circulation -> Checkouts
   - Administration -> System preferences
   - Reports -> Lost items

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
2019-08-22 15:23:19 +01:00

127 lines
No EOL
6.5 KiB
HTML

[% USE Asset %]
[% USE KohaDates %]
[% USE Koha %]
[% USE AuthorisedValues %]
[% USE Branches %]
[% USE raw %]
[% INCLUDE 'doc-head-open.inc' %]
<title>Koha &rsaquo; Reports &rsaquo; Mana Knowledge Base reports search</title>
[% INCLUDE 'doc-head-close.inc' %]
[% Asset.css("css/reports.css") | $raw %]
</head>
<body id="rep_mana_search" class="rep">
[% INCLUDE 'header.inc' %]
[% INCLUDE 'circ-search.inc' %]
<div id="breadcrumbs">
<a href="/cgi-bin/koha/mainpage.pl">Home</a>
&rsaquo; <a href="/cgi-bin/koha/reports/reports-home.pl">Reports</a>
&rsaquo; <a href="/cgi-bin/koha/reports/guided_reports.pl">Guided reports wizard</a>
&rsaquo; Mana Knowledge Base report search results
</div>
<div class="main container-fluid">
<div class="row">
<div class="col-sm-10 col-sm-push-2">
<main>
<h2>Mana Knowledge Base report search results</h2>
<div id="mana_results">
[% IF statuscode == "200" AND reports %]
<table id="mana_results_datatable">
<thead>
<tr>
<th>Report name</th>
<th class="anti-the">Notes</th>
<th>Type</th>
<th title="Number of libraries using this pattern"># of users</th>
<th class="title-string" title="Last time a library used this pattern">Last import</th>
<th> Comments </th>
[% UNLESS search_only %]
<th class="NoSort">Actions</th>
[% END %]
</tr>
</thead>
<tbody>
[% FOREACH report IN reports %]
[% UNLESS report.cannotdisplay %]
[% IF report.nbofcomment > highWarned %]
<tr id="row[% report.id | html %]" class="high-warned-row">
[% ELSIF report.nbofcomment > warned %]
<tr id="row[% report.id | html %]" class="warned-row">
[% ELSIF report.nbofcomment > lowWarned %]
<tr id="row[% report.id | html %]" class="highlighted-row">
[% ELSE %]
<tr id="row[% report.id | html %]">
[% END %]
<td>
<input type="hidden" class="rowid" value="[% report.id | $raw %]" />
[% IF ( report.report_name ) %]
[% report.report_name | html %]
[% END %]
</td>
<td title="[% report.savedsql | html %]">
[% IF report.notes.length > 200 %]
<div>
[% report.notes.substr(0,200) | html %]... <a href="#" class="btn btn-link btn-sm showbutton"><i class="fa fa-plus-square-o"></i> Show more</a>
</div>
<div style="display:none">
[% report.notes | html %]
<a href="#" class="btn btn-link btn-sm hidebutton"><i class="fa fa-minus-square-o"></i> Show less</a>
</div>
[% ELSE %]
[% report.notes | html %]
[% END %]
</td>
<td> [% report.type | html %] </td>
<td>
[% IF ( report.nbofusers ) %]
[% report.nbofusers | html %]
[% END %]
</td>
<td>
<span title="[% report.lastimport | html %]">
[% report.lastimport | $KohaDates %]
</span>
</td>
<td>
[% FOREACH comment IN report.comments %]
[% comment.message | html %] ([% comment.nb | html %])<br>
[% END %]
</td>
[% UNLESS search_only %]
<td>
<button type="button" class="btn btn-default btn-xs mana-use" id="mana-use-[% report.id | html %]" data-report_id="[% report.id | html %]"><i class="fa fa-download"></i> Import</button>
</td>
[% END %]
</tr>
[% END %]
[% END %]
</tbody>
</table>
[% ELSE %]
<h4>
[% IF ( msg ) %]
[% msg | html %] (Statuscode: [% statuscode | html %])
[% ELSE %]
No results found
[% END %]
</h4>
[% END %]
</div>
</main>
</div> <!-- /.col-sm-10.col-sm-push-2 -->
<div class="col-sm-2 col-sm-pull-10">
<aside>
[% INCLUDE 'guided-reports-view.inc' %]
</aside>
</div> <!-- /.col-sm-2.col-sm-pull-10 -->
</div> <!-- /.row -->
[% INCLUDE 'intranet-bottom.inc' %]