[Koha-patches] [PATCH] Bug 8851 - strange blue bar above serials results

Owen Leonard oleonard at myacpl.org
Tue Oct 2 20:40:22 CEST 2012


Bug 5357 (Subscription search and displays) added an advanced
search form which adds a new interface featured: a collapsible
fieldset with the search form inside. Bug 8851 was filed
because it is not immediately obvious that the search form
is hidden and can be shown by clicking the fieldset's legend.

I contend that this new behavior is unnecessary: In many other
places we put a similar search form in the left-hand sidebar.

This patch amends the template to show the search form in the
main body of the page if no search has been performed. After
searching the form is moved to the sidebar. This keeps the page
consistent with other interfaces and eliminates the confusion
about the collapsed form.
---
 .../prog/en/modules/serials/serials-search.tt      |   64 ++++++++++++++++----
 1 file changed, 53 insertions(+), 11 deletions(-)

diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/serials/serials-search.tt b/koha-tmpl/intranet-tmpl/prog/en/modules/serials/serials-search.tt
index b5e7f54..98ef4d5 100644
--- a/koha-tmpl/intranet-tmpl/prog/en/modules/serials/serials-search.tt
+++ b/koha-tmpl/intranet-tmpl/prog/en/modules/serials/serials-search.tt
@@ -34,18 +34,11 @@
       [% INCLUDE 'serials-toolbar.inc' %]
 
       <h2>Serials subscriptions</h2>
-
+      [% UNLESS ( done_searched ) %]
       <div id="advsearch">
         <form action="/cgi-bin/koha/serials/serials-search.pl" method="get">
           <fieldset class="rows">
-          <legend onclick="$('#advsearch_form').slideToggle(400);">
-              <a id="unfold_advsearch" style="cursor:pointer">Search subscriptions</a>
-          </legend>
-            [% IF ( done_searched ) %]
-              <div id="advsearch_form" style="display:none">
-            [% ELSE %]
-              <div>
-            [% END %]
+          <legend>Search subscriptions</legend>
               <ol>
                 <li>
                   <label for="issn">ISSN:</label>
@@ -87,11 +80,10 @@
               <fieldset class="action">
                 <input type="submit" value="Search" />
               </fieldset>
-            </div>
           </fieldset>
         </form>
       </div>
-
+      [% END %]
       [% IF ( done_searched ) %]
         [% IF ( subscriptions ) %]
           <table id="srlt">
@@ -180,6 +172,56 @@
 
   <div class="yui-b">
     [% INCLUDE 'serials-menu.inc' %]
+    [% IF ( done_searched ) %]
+    <div id="advsearch">
+        <form action="/cgi-bin/koha/serials/serials-search.pl" method="get">
+          <fieldset class="brief">
+            <h4>Search subscriptions</h4>
+              <ol>
+                <li>
+                  <label for="issn">ISSN:</label>
+                  <input type="text" id="issn" name="ISSN_filter" value="[% ISSN_filter %]" />
+                </li>
+                <li>
+                  <label for="title">Title:</label>
+                  <input type="text" id="title" name="title_filter" value="[% title_filter %]" />
+                </li>
+                [% IF ( marcflavour == "UNIMARC" ) %]
+                <li>
+                  <label for="ean">EAN:</label>
+                  <input type="text" id="ean" name="EAN_filter" value="[% EAN_filter %]" />
+                </li>
+                [% END %]
+                <li>
+                  <label for="publisher">Publisher:</label>
+                  <input type="text" id="publisher" name="publisher_filter" value="[% publisher_filter %]" />
+                </li>
+                <li>
+                  <label for="bookseller">Bookseller:</label>
+                  <input type="text" id="bookseller" name="bookseller_filter" value="[% bookseller_filter %]" />
+                </li>
+                <li>
+                  <label for="branch">Branch:</label>
+                  <select id="branch" name="branch_filter">
+                    <option value="">All</option>
+                    [% FOREACH branch IN branches_loop %]
+                      [% IF ( branch.selected ) %]
+                        <option selected="selected" value="[% branch.branchcode %]">[% branch.branchname %]</option>
+                      [% ELSE %]
+                        <option value="[% branch.branchcode %]">[% branch.branchname %]</option>
+                      [% END %]
+                    [% END %]
+                  </select>
+                </li>
+              </ol>
+              <input type="hidden" name="searched" value="1" />
+              <fieldset class="action">
+                <input type="submit" value="Search" />
+              </fieldset>
+            </div>
+          </fieldset>
+        </form>
+      [% END %]
   </div>
 </div>
 [% INCLUDE 'intranet-bottom.inc' %]
-- 
1.7.9.5



More information about the Koha-patches mailing list