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>
138 lines
6.4 KiB
Text
138 lines
6.4 KiB
Text
[% USE Koha %]
|
|
[% INCLUDE 'doc-head-open.inc' %]
|
|
<title>[% IF ( LibraryNameTitle ) %][% LibraryNameTitle | html %][% ELSE %]Koha online[% END %] catalog › Images for: [% INCLUDE 'biblio-title-head.inc' %]</title>
|
|
[% INCLUDE 'doc-head-close.inc' %]
|
|
[% BLOCK cssinclude %]
|
|
<style>
|
|
#largeCoverImg {
|
|
border : 1px solid #CCCCCC;
|
|
display : block;
|
|
margin : auto;
|
|
padding : 1em;
|
|
}
|
|
#thumbnails {
|
|
text-align : center;
|
|
}
|
|
#thumbnails a img {
|
|
border : 2px solid #8EB3E7;
|
|
}
|
|
img.thumbnail {
|
|
display : block;
|
|
float : none;
|
|
margin : .3em 0;
|
|
padding : .5em;
|
|
}
|
|
|
|
#thumbnails a img.selected {
|
|
border-color: black;
|
|
cursor : default;
|
|
opacity:0.4;
|
|
filter:alpha(opacity=40); /* For IE8 and earlier */
|
|
}
|
|
</style>
|
|
[% END %]
|
|
</head>
|
|
[% INCLUDE 'bodytag.inc' bodyid='opac-imageviewer' %]
|
|
[% 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">
|
|
[% IF ( BiblioDefaultViewmarc ) %]
|
|
<a href="/cgi-bin/koha/opac-MARCdetail.pl?biblionumber=[% biblionumber |url %]">
|
|
[% ELSE %]
|
|
[% IF ( BiblioDefaultViewisbd ) %]
|
|
<a href="/cgi-bin/koha/opac-ISBDdetail.pl?biblionumber=[% biblionumber |url %]">
|
|
[% ELSE %]
|
|
<a href="/cgi-bin/koha/opac-detail.pl?biblionumber=[% biblionumber |url %]">
|
|
[% END %]
|
|
[% END %][% INCLUDE 'biblio-title.inc' %]</a>
|
|
</li>
|
|
<li class="breadcrumb-item active" aria-current="page">
|
|
<a href="#">Images</a>
|
|
</li>
|
|
</ul>
|
|
</nav>
|
|
|
|
<div class="container-fluid">
|
|
<div class="row">
|
|
[% IF ( OpacNav || OpacNavBottom ) %]
|
|
<div class="col-lg-2">
|
|
<div id="navigation">
|
|
[% INCLUDE 'navigation.inc' %]
|
|
</div>
|
|
</div>
|
|
<div class="col-10 order-first order-md-first order-lg-2">
|
|
[% ELSE %]
|
|
<div class="col order-first order-md-first order-lg-2">
|
|
[% END %]
|
|
|
|
<div class="row">
|
|
<div class="col-lg-9 maincontent">
|
|
<h1 class="title">Images for
|
|
[% IF ( BiblioDefaultViewmarc ) %]
|
|
<a class="title" href="/cgi-bin/koha/opac-MARCdetail.pl?biblionumber=[% biblionumber |url %]" title="View details for this title">
|
|
[% ELSE %]
|
|
[% IF ( BiblioDefaultViewisbd ) %]
|
|
<a class="title" href="/cgi-bin/koha/opac-ISBDdetail.pl?biblionumber=[% biblionumber |url %]" title="View details for this title">
|
|
[% ELSE %]
|
|
<a class="title" href="/cgi-bin/koha/opac-detail.pl?biblionumber=[% biblionumber |url %]" title="View details for this title">
|
|
[% END %]
|
|
[% END %][% INCLUDE 'biblio-title.inc' %]</a> [% biblio.author | html %]
|
|
</h1>
|
|
</div> <!-- / col-lg-9 -->
|
|
</div> <!-- / .row -->
|
|
|
|
<div class="row">
|
|
<div class="col-lg-9">
|
|
<div id="imageviewer">
|
|
<div id="largeCover">
|
|
<img id="largeCoverImg" alt="" src="/cgi-bin/koha/opac-image.pl?imagenumber=[% imagenumber | url %]" />
|
|
</div>
|
|
</div> <!-- / #imageviewer -->
|
|
</div> <!-- / .span12 -->
|
|
|
|
[% IF OPACLocalCoverImages == 1 %]
|
|
<div class="col-lg-3">
|
|
<div id="thumbnails">
|
|
[% FOREACH img IN images %]
|
|
[% IF img %]
|
|
<a href="/cgi-bin/koha/opac-imageviewer.pl?biblionumber=[% biblionumber | url %]&imagenumber=[% img | uri %]" onclick="showCover([% img | html %]); return false;">
|
|
[% IF ( imagenumber == img ) %]
|
|
<img class="thumbnail selected" id="[% img | html %]" src="/cgi-bin/koha/opac-image.pl?imagenumber=[% img | html %]&thumbnail=1" alt="Thumbnail"/>
|
|
[% ELSE %]
|
|
<img class="thumbnail" id="[% img | html %]" src="/cgi-bin/koha/opac-image.pl?imagenumber=[% img | html %]&thumbnail=1" alt="Thumbnail"/>
|
|
[% END %]
|
|
</a>
|
|
[% END %]
|
|
[% END %]
|
|
</div> <!-- /#thumbnails -->
|
|
</div> <!-- /.col-lg-3 -->
|
|
[% ELSE %]
|
|
Unfortunately, images are not enabled for this catalog at this time.
|
|
[% END %]
|
|
</div> <!-- / .row -->
|
|
</div> <!-- / .col-lg-10/12 -->
|
|
</div> <!-- / .row -->
|
|
</div> <!-- / .container-fluid -->
|
|
</div> <!-- / .main -->
|
|
|
|
[% INCLUDE 'opac-bottom.inc' %]
|
|
[% BLOCK jsinclude %]
|
|
<script>
|
|
$(document).ready(function(){
|
|
$("#largeCoverImg").attr("src","[% interface | html %]/[% theme | html %]/images/loading.gif");
|
|
showCover([% imagenumber | html %]);
|
|
});
|
|
|
|
function showCover(img) {
|
|
$('.thumbnail').attr('class', 'thumbnail');
|
|
$('#largeCoverImg').attr('src', '/cgi-bin/koha/opac-image.pl?imagenumber=' + img);
|
|
$('#' + img + '.thumbnail').attr('class', 'thumbnail selected');
|
|
}
|
|
</script>
|
|
[% END %]
|