Koha/koha-tmpl/opac-tmpl/bootstrap/en/modules/opac-addbybiblionumber.tt
Owen Leonard 9cb89b4639 Bug 20168: Update of the OPAC bootstrap template to bootstrap v4
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>
2020-09-09 14:13:03 +02:00

116 lines
8.2 KiB
Text

[% INCLUDE 'doc-head-open.inc' %]
<title>[% IF ( LibraryNameTitle ) %][% LibraryNameTitle | html %][% ELSE %]Koha online[% END %] catalog &rsaquo; Add to your list</title>
[% INCLUDE 'doc-head-close.inc' %]
[% BLOCK cssinclude %][% END %]
</head>
[% INCLUDE 'bodytag.inc' bodyid='addtolist' bodyclass='popup' %]
<div class="main">
<div class="container-fluid">
<div class="row">
<div class="col order-first order-md-first order-lg-2">
<div id="useraddbybiblionumber" class="maincontent">
[% IF ( authorized ) %]
[% UNLESS ( newshelf ) %]
[% IF ( multiple ) %]
<h1>Add [% total | html %] items to [% IF ( singleshelf ) %]<em>[% shelfname | html %]</em>: [% ELSE %]a list:[% END %]</h1>
[% ELSE %]
<h1>Add to [% IF ( singleshelf ) %]<em>[% shelfname | html %]</em>[% ELSE %]a list:[% END %]</h1>
[% END %]
<ul>
[% FOREACH biblio IN biblios %]
<li> <span class="title">[% INCLUDE 'biblio-title.inc' %]</span>
[% IF ( biblio.author ) %]<span class="author"> [% biblio.author | html %] </span>[% END %]
</li>
[% END %]
</ul>
[% IF private_shelves.count or public_shelves.count or private_shelves_shared_with_me.count %]
<form name="f1" action="/cgi-bin/koha/opac-addbybiblionumber.pl" method="post">
<fieldset>
<legend>Select a list</legend>
<label for="shelfnumber">Add to list:</label> <select name="shelfnumber" id="shelfnumber">
[% IF private_shelves.count %]<optgroup label="Private lists">
[% FOREACH private_shelf IN private_shelves %]
<option value="[% private_shelf.shelfnumber | html %]">[% private_shelf.shelfname | html %]</option>
[% END %]
</optgroup>[% END %]
[% IF private_shelves_shared_with_me.count %]<optgroup label="Private lists shared with me">
[% FOREACH private_shelf IN private_shelves_shared_with_me %]
<option value="[% private_shelf.shelfnumber | html %]">[% private_shelf.shelfname | html %]</option>
[% END %]
</optgroup>[% END %]
[% IF public_shelves.count %]<optgroup label="Public lists">
[% FOREACH public_shelf IN public_shelves %]
<option value="[% public_shelf.shelfnumber | html %]">[% public_shelf.shelfname | html %]</option>
[% END %]
</optgroup>[% END %]
</select>
[% FOREACH biblio IN biblios %]
<input type="hidden" name="biblionumber" value="[% biblio.biblionumber | html %]" />
[% END %]
<input type="hidden" name="modifyshelfcontents" value="1" />
</fieldset>
<fieldset class="action">
<input type="submit" value="Save" class="btn btn-primary" />
<a class="close cancel" href="#">Cancel</a>
</fieldset>
</form>
<p>...or...</p>
[% ELSE %]
[% IF ( singleshelf ) %]
<form name="f1" action="/cgi-bin/koha/opac-addbybiblionumber.pl" method="post">
[% FOREACH biblio IN biblios %]
<input type="hidden" name="biblionumber" value="[% biblio.biblionumber | html %]">
[% END %]
<input type="hidden" name="shelfnumber" value="[% shelfnumber | html %]" />
<input type="hidden" name="modifyshelfcontents" value="1" /></fieldset>
<fieldset class="action">
<input type="submit" value="Save" class="btn btn-primary" />
<a class="close cancel" href="#">Cancel</a>
</fieldset>
</form>
[% END %]
[% END # IF / existingshelves %]
[% END # / UNLESS newshelf %]
[% UNLESS ( singleshelf ) %]
<form name="f2" method="post" action="/cgi-bin/koha/opac-addbybiblionumber.pl">
<fieldset>
<legend>Add to a new list:</legend>
<label for="newvirtualshelf">List name:</label>
<input type="text" name="newvirtualshelf" id="newvirtualshelf" size="40" />
<label for="category">Category:</label>
<select name="category" id="category">
<option value="1">Private</option>
[% IF (OpacAllowPublicListCreation) %]
<option value="2">Public</option>
[% END %]
</select>
</fieldset>
[% FOREACH biblio IN biblios %]
<input type="hidden" name="biblionumber" value="[% biblio.biblionumber | html %]" />
[% END %]
<fieldset class="action">
<input type="hidden" name="sortfield" value="title" />
<input type="submit" value="Save" class="btn btn-primary" />
<a class="close cancel" href="#">Cancel</a>
</fieldset>
</form>
[% END # / UNLESS singleshelf %]
[% ELSE %]
<p>
[% IF (errcode==1) %]
Could not create new list. Please check if the name is unique.
[% ELSE %]
Sorry, you cannot add items to this list.
[% END %]
</p>
[% END # IF authorized %]
<p><a href="#" class="close">Close this window.</a></p>
</div> <!-- / #useraddbybiblionumber -->
</div> <!-- / .span12 -->
</div> <!-- / .row -->
</div> <!-- / .container-fluid -->
</div> <!-- / .main -->
[% INCLUDE 'opac-bottom.inc' is_popup=1 %]
[% BLOCK jsinclude %][% END %]