Owen Leonard
9cb89b4639
This patch updates the version of Bootstrap in the OPAC from 2.3.1 to 4.5.0. The Bootstrap JavaScript files have been replaced with custom builds of the 4.5.0 JavaScript source files. The Bootstrap CSS is now built into the OPAC CSS by loading the required Bootstrap 4.5.0 SCSS files in node_modules. OPAC SCSS now starts with Bootstrap customizations: /* Bootstrap variable customizations */ $headings-color: #727272; ... Followed by loading the necessary Bootstrap SCSS files: /* Bootstrap imports */ @import "../../../../../node_modules/bootstrap/scss/functions"; @import "../../../../../node_modules/bootstrap/scss/variables"; ... Followed by our CSS. The build process for generating compiled CSS now creates a file which bundles Bootstrap CSS and ours. Removed from the Koha source: Bootstrap CSS files, Bootstrap "glyphicons" images. The upgrade to Bootstrap 4 involved a lot of markup changes to conform with new Bootstrap classes, especially in classes related to the grid. Besides duplicating the grid we used before, this upgrade adds some new features made possible by Bootstrap 4.5's use of flexbox as a layout tool. This includes custom ordering of columns based on class names: https://getbootstrap.com/docs/4.5/layout/grid/#order-classes. Other areas where the most changes have been made: Navigation menus, breadcrumb menus, buttons, dropdowns. Bootstrap's JavaScript file is now "bootstrap.bundle.min.js" to reflect the fact that a required JavaScript asset is now distributed separately in Bootstrap 4. The "bundle" version includes Popper.js. Unrelated changes: Indentation corrections, removal of invalid "//<![CDATA[" markers, removal of invalid script type attributes. To test, apply the patch and run 'yarn install' to install Bootstrap as an npm module. Run 'yarn build --view opac' to regenerate the OPAC CSS. Test as many aspect of the OPAC as possible, viewing pages at various browser widths to confirm that everything adjusts well. Test with various OPAC interface system preferences enabled and disabled. Test self checkout and self checkin. Known issues: RTL support has not been updated. Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com> Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
160 lines
8 KiB
Text
160 lines
8 KiB
Text
[% USE Koha %]
|
|
[% USE Branches %]
|
|
[% USE AuthorisedValues %]
|
|
[% USE ItemTypes %]
|
|
[% INCLUDE 'doc-head-open.inc' %]
|
|
<title>[% IF ( LibraryNameTitle ) %][% LibraryNameTitle | html %][% ELSE %]Koha online[% END %] catalog › Most popular titles</title>
|
|
[% INCLUDE 'doc-head-close.inc' %]
|
|
[% BLOCK cssinclude %]
|
|
<style>
|
|
#search-facets fieldset {
|
|
border: 0;
|
|
margin: 0;
|
|
padding: .3em;
|
|
}
|
|
#search-facets ol{
|
|
padding: .3em;
|
|
}
|
|
#search-facets li {
|
|
list-style-type: none;
|
|
padding: 4px 4px;
|
|
}
|
|
#search-facets label{
|
|
font-weight: bold;
|
|
display: block;
|
|
margin: .2em 0;
|
|
}
|
|
#search-facets fieldset.action {
|
|
padding-left: 4px;
|
|
margin: .3em;
|
|
}
|
|
#search-facets select {
|
|
max-width: 100%;
|
|
}
|
|
</style>
|
|
[% END %]
|
|
</head>
|
|
[% INCLUDE 'bodytag.inc' bodyid='opac-topissues' bodyclass='scrollto' %]
|
|
[% INCLUDE 'masthead.inc' %]
|
|
|
|
<div class="main">
|
|
<nav aria-label="breadcrumb">
|
|
<ul class="breadcrumb">
|
|
<li class="breadcrumb-item">
|
|
<a href="/cgi-bin/koha/opac-main.pl">Home</a>
|
|
</li>
|
|
<li class="breadcrumb-item active" aria-current="page">
|
|
<a href="#">Most popular titles</a>
|
|
</li>
|
|
</ul>
|
|
</nav>
|
|
|
|
<div class="container-fluid">
|
|
<div class="row">
|
|
<div class="col-lg-2">
|
|
<div id="usertopissues">
|
|
[% INCLUDE 'opac-topissues.inc' %]
|
|
[% IF ( OpacNav || OpacNavBottom ) %]
|
|
[% INCLUDE 'navigation.inc' %]
|
|
[% END %]
|
|
</div>
|
|
</div>
|
|
<div class="col-10 order-first order-md-first order-lg-2">
|
|
<div id="topissues" class="maincontent">
|
|
|
|
[% IF ( results ) %]
|
|
<table id="topissuest" class="table table-bordered table-striped">
|
|
<caption>
|
|
The [% limit | html %] most checked-out
|
|
[% IF selected_itemtype %]
|
|
[% ItemTypes.GetDescription(selected_itemtype) | html %]
|
|
[% END %]
|
|
[% IF ( branch ) %]
|
|
at
|
|
[% Branches.GetName( branch ) | html %]
|
|
[% END %]
|
|
[% IF ( timeLimit != 999 ) %]
|
|
in the past [% timeLimitFinite | html %] months
|
|
[% ELSE %]
|
|
of all time
|
|
[% END %]
|
|
</caption>
|
|
<thead>
|
|
<tr>
|
|
<th class="anti-the">Title</th>
|
|
<th>[% IF ( ccodesearch ) %]Collection[% ELSE %]Item type[% END %]</th>
|
|
<th class="title-num">Checkouts</th>
|
|
[% IF Koha.Preference( 'opacuserlogin' ) == 1 %]
|
|
<th class="NoSort"> </th>
|
|
[% END %]
|
|
</tr>
|
|
</thead>
|
|
<tbody>
|
|
[% FOREACH result IN results %]
|
|
<tr>
|
|
<td>
|
|
<a class="title" href="/cgi-bin/koha/opac-detail.pl?biblionumber=[% result.biblionumber | html %]">[% result.title | html %]</a><p>[% result.author | html %]
|
|
[% IF ( result.publishercode ) %]- [% result.publishercode | html %][% END %]
|
|
[% IF ( result.place ) %][% result.place | html %][% END %]
|
|
[% IF ( result.publicationyear ) %]
|
|
[% result.publicationyear | html %]
|
|
[% ELSIF ( result.copyrightdate ) %]
|
|
[% result.copyrightdate | html %]
|
|
[% END %]
|
|
[% IF ( result.pages ) %] - [% result.pages | html %][% END %]
|
|
[% IF ( result.item('size') ) %][% result.item('size') | html %][% END %]</p>
|
|
</td>
|
|
<td>
|
|
[% IF Koha.Preference('AdvancedSearchTypes') == 'ccode' %]
|
|
<span class="tdlabel">Collection</span>
|
|
[% AuthorisedValues.GetByCode('ccode', result.ccode, 1) | html %]
|
|
[% ELSE %]
|
|
<span class="tdlabel">Item type</span>
|
|
[% ItemTypes.GetDescription(result.itemtype) | html %]
|
|
[% END %]
|
|
</td>
|
|
<td>
|
|
<span class="tdlabel">Checkouts: </span>
|
|
<span title="[% result.count | html %]">[% result.count | html %]</span>
|
|
</td>
|
|
[% IF Koha.Preference( 'opacuserlogin' ) == 1 %]
|
|
<td>
|
|
[% IF Koha.Preference( 'RequestOnOpac' ) == 1 %]
|
|
[% UNLESS ( result.norequests ) %]
|
|
<a class="btn btn-link btn-sm hold" href="/cgi-bin/koha/opac-reserve.pl?biblionumber=[% result.biblionumber | uri %]"><i class="fa fa-fw fa-bookmark" aria-hidden="true"></i> Place hold</a>
|
|
[% END %]
|
|
[% END %]
|
|
</td>
|
|
[% END %]
|
|
</tr>
|
|
[% END %]
|
|
</tbody>
|
|
</table>
|
|
[% ELSE %]
|
|
No results, try to change filters.
|
|
[% END # / IF results %]
|
|
</div> <!-- / #topissues -->
|
|
</div> <!-- / .col-lg-10 -->
|
|
</div> <!-- / .row -->
|
|
</div> <!-- / .container-fluid -->
|
|
</div> <!-- / .main -->
|
|
|
|
[% INCLUDE 'opac-bottom.inc' %]
|
|
[% BLOCK jsinclude %]
|
|
[% INCLUDE 'datatables.inc' %]
|
|
<script>
|
|
$(function() {
|
|
$("#topissuest").dataTable($.extend(true, {}, dataTablesDefaults, {
|
|
"sorting": [ [2, "desc"], [0, "asc"] ],
|
|
"columnDefs": [
|
|
{ "sortable": false, "searchable": false, 'targets': [ 'NoSort' ] },
|
|
{ "type": "anti-the", "targets" : [ "anti-the" ] },
|
|
{ "type": "title-numeric", "targets" : [ "title-num"] },
|
|
]
|
|
}));
|
|
});
|
|
function Dopop(link) {
|
|
newin=window.open(link,'width=500,height=400,toolbar=false,scrollbars=yes');
|
|
}
|
|
</script>
|
|
[% END %]
|