Browse Source

Bug 21672: Switch templates to Bootstrap grid: Various

This patch modifies various templates to add or improve coverage of the
Bootstrap grid.

To test, apply the patch and view the following pages, confirming that
they look correct at various browser widths:

 - Administration -> Item circulation alerts
 - Authorities -> Authorities search -> Merge records
 - Catalog -> Bibliographic details -> Rota (StockRotation must be
   enabled)
 - Tools -> News: Main and add/edit view

Signed-off-by: Claire Gravely <claire.gravely@bsz-bw.de>

Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>

Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
19.05.x
Owen Leonard 4 years ago
committed by Nick Clemens
parent
commit
9a9557a1b9
  1. 2
      koha-tmpl/intranet-tmpl/prog/en/includes/merge-record-strings.inc
  2. 11
      koha-tmpl/intranet-tmpl/prog/en/modules/admin/item_circulation_alerts.tt
  3. 26
      koha-tmpl/intranet-tmpl/prog/en/modules/authorities/merge.tt
  4. 25
      koha-tmpl/intranet-tmpl/prog/en/modules/catalogue/stockrotation.tt
  5. 33
      koha-tmpl/intranet-tmpl/prog/en/modules/tools/koha-news.tt

2
koha-tmpl/intranet-tmpl/prog/en/includes/merge-record-strings.inc

@ -1,5 +1,5 @@
[%# transletable strings for merge-record.js %]
<script type="text/javascript">
<script>
var MSG_MERGEREC_ALREADY_EXISTS = _("The field is non-repeatable and already exists in the destination record. Therefore, you cannot add it.");
var MSG_MERGEREC_SUBFIELD_ALREADY_EXISTS = _("The subfield is non-repeatable and already exists in the destination record. Therefore, you cannot add it.");
</script>

11
koha-tmpl/intranet-tmpl/prog/en/modules/admin/item_circulation_alerts.tt

@ -51,9 +51,8 @@ table.grid td.default {
<div class="row">
<div class="col-sm-10 col-sm-push-2">
<main>
<div class="yui-g">
<div class="yui-u first">
<div class="row">
<div class="col-sm-6">
<h1>Item circulation alerts</h1>
<h2>Select a library:</h2>
<form id="branch_selector" method="get" action="/cgi-bin/koha/admin/item_circulation_alerts.pl">
@ -64,7 +63,7 @@ table.grid td.default {
<input type="submit" name="pick" value="Pick" />
</form>
</div>
<div class="yui-u">
<div class="col-sm-6">
<table class="grid">
<caption>Legend</caption>
<thead>
@ -88,8 +87,8 @@ table.grid td.default {
</tr>
</tbody>
</table>
</div>
</div>
</div> <!-- /.col-sm-6 -->
</div> <!-- /.row -->
<h2>Circulation alerts for [% Branches.GetName( branch ) || 'Default' | html %]</h2>
<p>Click on the grid to toggle the settings.</p>

26
koha-tmpl/intranet-tmpl/prog/en/modules/authorities/merge.tt

@ -5,7 +5,7 @@
[% INCLUDE 'doc-head-open.inc' %]
<title>Koha &rsaquo; Cataloging &rsaquo; Merging records</title>
[% INCLUDE 'doc-head-close.inc' %]
<style type="text/css">
<style>
div.record ul, div.record li { float:none; display:block; }
div#result { margin-top: 1em; }
/* We use this style "against" the li ui-tabs-nav style automatically applied */
@ -20,6 +20,7 @@ div#result { margin-top: 1em; }
<div class="main container-fluid">
<div class="row">
<div class="col-md-8 col-md-offset-2">
<main>
<h1>Merging records</h1>
@ -45,8 +46,8 @@ div#result { margin-top: 1em; }
[% ELSIF ( result ) %]
<script type="text/javascript">window.location.href="/cgi-bin/koha/authorities/detail.pl?authid=[% recordid1 | html %]"</script>
<p>The merging was successful. <a href="/cgi-bin/koha/authorities/detail.pl?authid=[% recordid1 | uri %]">Click here to see the merged record.</a></p>
<script>window.location.href="/cgi-bin/koha/authorities/detail.pl?authid=[% recordid1 | html %]";</script>
<p>The merging was successful. <a href="/cgi-bin/koha/authorities/detail.pl?authid=[% recordid1 | uri %]">Click here to see the merged record.</a></p>
[% ELSIF ( choosereference ) %]
@ -84,13 +85,14 @@ div#result { margin-top: 1em; }
<form id="mergeform" action="/cgi-bin/koha/authorities/merge.pl" method="post" onsubmit="return mergeformsubmit()">
<div class="yui-g">
<div class="yui-u first">
<div class="row">
<div class="col-sm-6">
[% PROCESS mergesource sourcerecords=records %]
</div>
<div class="yui-u">
<div class="col-sm-6">
[% PROCESS mergetarget %]
</div> <!-- .yui-u -->
</div>
</div>
<input type="hidden" name="recordid1" value="[% recordid1 | html %]" />
<input type="hidden" name="recordid2" value="[% recordid2 | html %]" />
@ -98,20 +100,19 @@ div#result { margin-top: 1em; }
<input type="hidden" name="frameworkcode" value="[% framework | html %]" />
<fieldset class="action"><input type="submit" name="merge" value="Merge" /></fieldset>
</div>
</form>
[% END %]
</div>
</main>
</div> <!-- /.col-md-8 col-md-offset-2 -->
</div> <!-- /.row -->
[% MACRO jsinclude BLOCK %]
[% INCLUDE 'merge-record-strings.inc' %]
[% INCLUDE 'authorities_js.inc' %]
[% Asset.js("js/merge-record.js") | $raw %]
[% INCLUDE 'merge-record-strings.inc' %]
<script type="text/javascript">
//<![CDATA[
<script>
// When submiting the form
function mergeformsubmit() {
@ -140,7 +141,6 @@ div#result { margin-top: 1em; }
$("#Frameworks").val(fw);
}
//]]>
</script>
[% END %]

25
koha-tmpl/intranet-tmpl/prog/en/modules/catalogue/stockrotation.tt

@ -14,11 +14,10 @@
<div id="breadcrumbs"><a href="/cgi-bin/koha/mainpage.pl">Home</a> &rsaquo; <a href="/cgi-bin/koha/catalogue/search.pl">Catalog</a> &rsaquo; Stock rotation details for <i>[% biblio.title | html %][% FOREACH subtitle IN biblio.subtitles %][% subtitle.subfield | html %][% END %]</i></div>
<div id="doc3" class="yui-t2">
<div id="bd">
<div id="yui-main">
<div class="yui-b">
<div class="main container-fluid">
<div class="row">
<div class="col-sm-10 col-sm-push-2">
<main>
<div id="catalogue_detail_biblio">
@ -157,12 +156,16 @@
</div>
</div>
</div>
<div class="yui-b">
[% INCLUDE 'biblio-view-menu.inc' %]
</div>
</div>
</main>
</div> <!-- /.col-sm-10.col-sm-push-2 -->
<div class="col-sm-2 col-sm-pull-10">
<aside>
[% INCLUDE 'biblio-view-menu.inc' %]
</aside>
</div> <!-- /.col-sm-2.col-sm-pull-10 -->
</div> <!-- /.row -->
[% MACRO jsinclude BLOCK %]
[% INCLUDE 'browser-strings.inc' %]

33
koha-tmpl/intranet-tmpl/prog/en/modules/tools/koha-news.tt

@ -23,16 +23,17 @@ Edit news item[% ELSE %]Add news item[% END %][% ELSE %]News[% END %]</div>
<div class="row">
<div class="col-md-10 col-md-offset-1 col-lg-8 col-lg-offset-2">
[% ELSE %]
<div id="doc3" class="yui-t2">
<div id="bd">
<div id="yui-main">
<div class="yui-b">
<div class="main container-fluid">
<div class="row">
<div class="col-sm-10 col-sm-push-2">
[% END %]
<main>
[% UNLESS ( add_form ) %]
[% IF error_message == 'title_missing' %]
<div class="dialog alert">Error: Required news title missing!</div>
[% END %]
<h2>News</h2>
<div id="toolbar" class="btn-toolbar">
<a class="btn btn-default btn-sm" id="newentry" href="/cgi-bin/koha/tools/koha-news.pl?op=add_form&amp;lang=[% lang | html %]"><i class="fa fa-plus"></i> New entry</a>
</div>
@ -216,21 +217,25 @@ Edit news item[% ELSE %]Add news item[% END %][% ELSE %]News[% END %]</div>
<div class="dialog message">There are no news items.</div>
[% END %]
[% END %]
</div>
</div>
[% UNLESS ( add_form ) %]
<div class="yui-b noprint">
[% INCLUDE 'tools-menu.inc' %]
</div>
[% END %]
</div>
</main>
[% UNLESS ( add_form ) %]
</div> <!-- /.col-sm-10.col-sm-push-2 -->
<div class="col-sm-2 col-sm-pull-10">
<aside>
[% INCLUDE 'tools-menu.inc' %]
</aside>
</div> <!-- /.col-sm-2.col-sm-pull-10 -->
[% END %]
</div> <!-- /.row -->
[% MACRO jsinclude BLOCK %]
[% INCLUDE 'calendar.inc' %]
[% Asset.js("js/tools-menu.js") | $raw %]
[% IF ( opac_news_count ) %]
[% INCLUDE 'datatables.inc' %]
<script type="text/javascript">
<script>
$(document).ready(function() {
$("#newst").dataTable($.extend(true, {}, dataTablesDefaults, {
"aoColumnDefs": [
@ -268,7 +273,7 @@ Edit news item[% ELSE %]Add news item[% END %][% ELSE %]News[% END %]</div>
</script>
[% END %]
[% Asset.js("lib/tiny_mce/tiny_mce.js") | $raw %]
<script type="text/javascript">
<script>
tinyMCE.baseURL = "[% interface | html %]/lib/tiny_mce";
tinyMCE.init({
mode : "textareas",

Loading…
Cancel
Save