Bug 5357: Follow-up - layout and EAN search
authorKatrin Fischer <Katrin.Fischer.83@web.de>
Sat, 25 Aug 2012 21:18:08 +0000 (23:18 +0200)
committerPaul Poulain <paul.poulain@biblibre.com>
Tue, 18 Sep 2012 20:37:31 +0000 (22:37 +0200)
1) EAN search should be hidden if marcflavour is not UNIMARC
2) Fixes layout to match the advanced search in acquisitions
- labels in front of the fields instead of separate lines
- adds a legend to the form and moves the toggle for the search form to it

To test:
- EAN search field should only show up when marcflavour system preference
  is set to UNIMARC
- Check layout is consistent and you like it
- Check toggle for advanced search still behaves the same

Signed-off-by: Jonathan Druart <jonathan.druart@biblibre.com>
Signed-off-by: Paul Poulain <paul.poulain@biblibre.com>
koha-tmpl/intranet-tmpl/prog/en/modules/serials/serials-search.tt
serials/serials-search.pl

index a8b8399..b5e7f54 100644 (file)
 
       <div id="advsearch">
         <form action="/cgi-bin/koha/serials/serials-search.pl" method="get">
-          <fieldset class="brief">
+          <fieldset class="rows">
+          <legend onclick="$('#advsearch_form').slideToggle(400);">
+              <a id="unfold_advsearch" style="cursor:pointer">Search subscriptions</a>
+          </legend>
             [% IF ( done_searched ) %]
-              <div onclick="$('#advsearch_form').slideToggle(400);" style="width:100%;">
-                <a id="unfold_advsearch" style="cursor:pointer">Advanced search</a>
-              </div>
               <div id="advsearch_form" style="display:none">
             [% ELSE %]
               <div>
                   <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 %]" />
index 0da19d0..ac5d0d3 100755 (executable)
@@ -104,7 +104,7 @@ $template->param(
     branches_loop => \@branches_loop,
     done_searched => $searched,
     routing       => $routing,
-    (uc(C4::Context->preference("marcflavour"))) => 1
+    marcflavour   => (uc(C4::Context->preference("marcflavour")))
 );
 
 output_html_with_http_headers $query, $cookie, $template->output;