Bug 16548 - All libraries selected on Tools -> Export Data screen
authorOwen Leonard <oleonard@myacpl.org>
Wed, 18 May 2016 23:45:27 +0000 (19:45 -0400)
committerBrendan Gallagher <brendan@bywatersolutions.com>
Mon, 30 May 2016 11:17:28 +0000 (11:17 +0000)
This patch adds "select all" and "select none" links to the display of
libraries in the export bibliographic records form.

Also modified: call number range and accession date fields have been
grouped in their own fieldsets in the hopes that this is more readable.
Page title and breadcrumbs have been corrected to read "Export data"
instead of "MARC export," matching menu items.

To test, apply the patch and go to Tools -> Export data.

- Test the select all/select none links and confirm that they work as
  expected.
- Confirm that the structural changes to the form look okay.

Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
Post sign-off revision: Use the standard "Clear all" instead of "Select
none."

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Signed-off-by: Brendan Gallagher <brendan@bywatersolutions.com>
koha-tmpl/intranet-tmpl/prog/en/includes/branch-selector.inc
koha-tmpl/intranet-tmpl/prog/en/modules/tools/export.tt

index f3aa11a..cd5760c 100644 (file)
@@ -6,13 +6,14 @@
     END;
 END %]
 <div class="branchselector">
+    <p><a href="#" id="checkall"> <i class="fa fa-check"></i> Select all</a> | <a href="#" id="checknone"> <i class="fa fa-remove"></i> Clear all</a></p>
     <div class="branchgridrow">
     [% FOREACH branch IN branches %]
         <div class="branchgriditem">
             [% IF branch.selected || (selectall == 1) %]
-                <input id="branch_[% branch.value %]" type="checkbox" name="branch" value="[% branch.value %]" checked="checked" />
+                <input id="branch_[% branch.value %]" class="branch_select" type="checkbox" name="branch" value="[% branch.value %]" checked="checked" />
             [% ELSE %]
-                <input id="branch_[% branch.value %]" type="checkbox" name="branch" value="[% branch.value %]" />
+                <input id="branch_[% branch.value %]" class="branch_select" type="checkbox" name="branch" value="[% branch.value %]" />
             [% END %]
 
             <label for="branch_[% branch.value %]">[% branch.branchname %]</label>
index 5362fa9..cf41e5f 100644 (file)
@@ -1,5 +1,5 @@
 [% INCLUDE 'doc-head-open.inc' %]
-<title>Koha &rsaquo; Tools &rsaquo; MARC export</title>
+<title>Koha &rsaquo; Tools &rsaquo; Export data</title>
 [% INCLUDE 'doc-head-close.inc' %]
 [% INCLUDE 'calendar.inc' %]
 <script type="text/javascript">
@@ -17,15 +17,28 @@ $(document).ready(function() {
             $("#bibs li.csv_profiles").hide();
         }
     });
+    $("#checkall").on("click",function(e){
+        e.preventDefault();
+        $(".branch_select").prop("checked",1);
+    });
+    $("#checknone").on("click",function(e){
+        e.preventDefault();
+        $(".branch_select").prop("checked",0);
+    });
 });
 //]]>
 </script>
+<style type="text/css">
+    fieldset.rows fieldset.rows {
+        width: 90%;
+    }
+</style>
 </head>
 <body id="tools_export" class="tools">
 [% INCLUDE 'header.inc' %]
 [% INCLUDE 'cat-search.inc' %]
 
-<div id="breadcrumbs"><a href="/cgi-bin/koha/mainpage.pl">Home</a> &rsaquo; <a href="/cgi-bin/koha/tools/tools-home.pl">Tools</a> &rsaquo; MARC export</div>
+<div id="breadcrumbs"><a href="/cgi-bin/koha/mainpage.pl">Home</a> &rsaquo; <a href="/cgi-bin/koha/tools/tools-home.pl">Tools</a> &rsaquo; Export data</div>
 
 <div id="doc3" class="yui-t2">
    
@@ -52,7 +65,8 @@ $(document).ready(function() {
 <form method="post" enctype="multipart/form-data" action="/cgi-bin/koha/tools/export.pl">
     <fieldset class="rows">
     <legend> Select records to export </legend>
-        <ol><li>
+        <ol>
+        <li>
             <label for="start">From biblio number: </label>
             <input id="start" type="text" name="StartingBiblionumber" size="5" />
         </li>
@@ -80,25 +94,36 @@ $(document).ready(function() {
             [% INCLUDE 'branch-selector.inc'
                 branches = branchloop %]
         </li>
-        <li>
-            <label for="startcn">From item call number: </label>
-            <input id="startcn" type="text" name="start_callnumber" size="5" />
-        </li>
-        <li>
-            <label for="endcn">To item call number: </label>
-            <input id="endcn" type="text" name="end_callnumber" size="5" />
-        </li>
-       <li>Accession date (inclusive):
-               <ul><li>
-        <label for="from">Start date:</label>
-        <input type="text" size="10" id="from" name="start_accession" value="[% from %]" class="datepickerfrom" />
-</li>
-<li><label for="to">
-    End date:
-</label>
-<input size="10" id="to" name="end_accession" value="[% end_accession %]" type="text" class="datepickerto" />
-</li>
-</ul></li></ol>
+    </ol>
+
+    <fieldset class="rows">
+        <legend>Call number range</legend>
+        <ol>
+            <li>
+                <label for="startcn">From item call number: </label>
+                <input id="startcn" type="text" name="start_callnumber" size="15" />
+            </li>
+            <li>
+                <label for="endcn">To item call number: </label>
+                <input id="endcn" type="text" name="end_callnumber" size="15" />
+            </li>
+        </ol>
+    </fieldset>
+
+    <fieldset class="rows">
+        <legend>Accession date (inclusive)</legend>
+        <ol>
+            <li>
+                    <label for="from">Start date:</label>
+                    <input type="text" size="10" id="from" name="start_accession" value="[% from %]" class="datepickerfrom" />
+            </li>
+            <li>
+                <label for="to">End date:</label>
+                <input size="10" id="to" name="end_accession" value="[% end_accession %]" type="text" class="datepickerto" />
+            </li>
+        </ol>
+    </fieldset>
+
     </fieldset>
     <fieldset class="rows">
     <legend>