Bug 21758: Navigation in Z39.50 result pages not working in Acquisitions
authorOwen Leonard <oleonard@myacpl.org>
Wed, 21 Nov 2018 16:42:03 +0000 (16:42 +0000)
committerNick Clemens <nick@bywatersolutions.com>
Mon, 26 Nov 2018 12:29:32 +0000 (12:29 +0000)
This patch makes markup corrections to the acquisitions Z39.50 search
results template so that the navigation form works correctly.

Also changed: Removed invalid type attributes from style and script
tags.

To test, apply the patch and go to Acquisitions -> Vendor -> Basket.

- Add to basket -> From an external source
- Perform a Z39.50 search which will return multiple pages of results
- On the search results page, use the form at the bottom of the page to
  navigate through results. Confirm that both the "Go" form and the
  next/previous buttons work.

Signed-off-by: David Nind <david@davidnind.com>

Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>

Signed-off-by: Nick Clemens <nick@bywatersolutions.com>

koha-tmpl/intranet-tmpl/prog/en/modules/acqui/z3950_search.tt

index 4e29598..e42087c 100644 (file)
@@ -5,12 +5,11 @@
 <title>Koha &rsaquo; Acquisitions &rsaquo; [% IF ( opsearch ) %]Order from external source[% ELSE %]Order from external source &rsaquo; Search results[% END %]</title>
 [% Asset.css("css/datatables.css") | $raw %]
 [% INCLUDE 'doc-head-close.inc' %]
-[% INCLUDE 'datatables.inc' %]
 [% USE Koha %]
 
-<style type="text/css">
+<style>
 .linktools { background-color:#FFF;border-top:1px solid #DDD; border-left: 1px solid #DDD; border-right: 1px solid #666; border-bottom:1px solid #666;display: none; white-space: nowrap;}
-.linktools a { font-size : 85%; text-decoration:none; padding:.3em;;background-color:#FFF; display:block;float:left;border-right:1px solid #DDD;}
+.linktools a { font-size : 85%; text-decoration:none; padding:.3em;background-color:#FFF; display:block;float:left;border-right:1px solid #DDD;}
 .linktools a:hover { background-color:#EEE;color:#CC3300;border-right:1px solid #CCC;}
 tr.selected { background-color : #FFFFCC; } tr.selected td { background-color : transparent !important; } #dataPreview { width : 80%; } @media (max-width: 767px) { #dataPreview { margin: 0; width : auto; } }
 </style>
@@ -23,9 +22,9 @@ tr.selected { background-color : #FFFFCC; } tr.selected td { background-color :
 <div id="breadcrumbs"><a href="/cgi-bin/koha/mainpage.pl">Home</a> &rsaquo; <a href="/cgi-bin/koha/acqui/acqui-home.pl">Acquisitions</a> &rsaquo; <a href="/cgi-bin/koha/acqui/supplier.pl?booksellerid=[% booksellerid | uri %]">[% name | html %]</a> &rsaquo; <a href="/cgi-bin/koha/acqui/basket.pl?basketno=[% basketno | uri %]">Basket [% basketno | html %]</a> &rsaquo; [% IF ( opsearch ) %]Order from external source[% ELSE %]<a href="/cgi-bin/koha/acqui/z3950_search.pl?booksellerid=[% booksellerid | uri %]&amp;basketno=[% basketno | uri %]">Order from external source</a> &rsaquo; Search results[% END %]</div>
 
 <div class="main container-fluid">
+      [% IF ( opsearch ) %]
     <form method="post" action="z3950_search.pl" name="f" class="checkboxed">
     <div class="row">
-      [% IF ( opsearch ) %]
     <div class="col-sm-6">
     <h2>Order from external source</h2>
     <input type="hidden" name="op" id="op" value="do_search" />
@@ -55,7 +54,7 @@ tr.selected { background-color : #FFFFCC; } tr.selected td { background-color :
     <input type="hidden" name="biblionumber" value="[% biblionumber | html %]" />
     <input type="hidden" name="basketno" value="[% basketno | html %]" />
     <input type="hidden" name="booksellerid" value="[% booksellerid | html %]" />
-           </div>
+    </div> <!-- /.col-sm-6 -->
 <div class="col-sm-6">
 <h2>Search targets</h2>
     <div id="z3950_search_targets_acq">
@@ -71,19 +70,20 @@ tr.selected { background-color : #FFFFCC; } tr.selected td { background-color :
 
         </p>
     [% END %]
-    </div>
-  </div>
-</div>
+    </div> <!-- /#z3950_search-targets_acq -->
+  </div> <!-- /.col-sm-6 -->
+</div> <!-- /.row -->
 
 <div class="row">
     <div class="col-md-12">
     <fieldset class="action"><input type="submit"  class="submit" value="Search" /> <a class="cancel" href="/cgi-bin/koha/acqui/basket.pl?booksellerid=[% booksellerid | uri %]&amp;basketno=[% basketno | uri %]">Cancel</a></fieldset>
+    </div>
 </div>
 </form>
-</div>
 
 
 [% ELSE %]
+    <div class="row">
     <div class="col-md-12">
     <h2>Search results</h2>
 
@@ -204,7 +204,8 @@ tr.selected { background-color : #FFFFCC; } tr.selected td { background-color :
         [% END %]
         <div class="dialog message">Nothing found. <a href="javascript: history.back()">Try another search</a>.</div>
     [% END %]
-</div>
+    </div> <!-- /.col-md-12 -->
+    </div> <!-- /.row -->
 
 [% END %]
 
@@ -214,7 +215,7 @@ tr.selected { background-color : #FFFFCC; } tr.selected td { background-color :
     [% Asset.js("js/acquisitions-menu.js") | $raw %]
     [% INCLUDE 'datatables.inc' %]
     [% Asset.js("lib/jquery/plugins/jquery.checkboxes.min.js") | $raw %]
-    <script type="text/javascript">
+    <script>
         $(document).ready(function(){
             var resultst = $("#resultst").dataTable($.extend(true, {}, dataTablesDefaults, {
                 "aoColumnDefs": [