Bug 7031 Follow-up, More options for AdvancedSearchTypes
authorOwen Leonard <oleonard@myacpl.org>
Tue, 27 Dec 2011 16:18:34 +0000 (11:18 -0500)
committerPaul Poulain <paul.poulain@biblibre.com>
Wed, 14 Mar 2012 13:35:29 +0000 (14:35 +0100)
This follow-up patch corrects some markup errors and removes some
markup which I think is superfluous:

- Using template FILTER command to remove invalid punctuation from
  ID attributes (to quiet the HTML validator)
- Removing <fieldset> since options are bordered by the tab box now
- Correcting the conditional which controls the table markup
  to prevent extra/missing </tr>
- Adding missing ID attribute in the OPAC template

Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
koha-tmpl/intranet-tmpl/prog/en/modules/catalogue/advsearch.tt
koha-tmpl/opac-tmpl/prog/en/modules/opac-advsearch.tt

index acf133d..28f445c 100644 (file)
       </ul>
     [% FOREACH advsearchloo IN advancedsearchesloop %]
     <div id="advsearch-[% advsearchloo.advanced_search_type %]" class="advsearch">
-    <fieldset>
-    <legend>Limit to any of the following:</legend>
+    <h4>Limit to any of the following:</h4>
     <table>
         <tr>
     [% FOREACH itemtypeloo IN advsearchloo.code_loop %]
-        <td><input type="checkbox" id="[% itemtypeloo.ccl %]-[% itemtypeloo.number %]" name="limit" value="mc-[% itemtypeloo.ccl %]:[% itemtypeloo.code %]"/><label for="[% itemtypeloo.ccl %]-[% itemtypeloo.number %]">[% UNLESS ( noItemTypeImages ) %][% IF ( itemtypeloo.imageurl ) %]<img border="0" src="[% itemtypeloo.imageurl %]" alt="[% itemtypeloo.description %]" />[% END %]&nbsp;[% END %]
+        <td><input type="checkbox" id="[% itemtypeloo.ccl FILTER remove(',') %]-[% itemtypeloo.number %]" name="limit" value="mc-[% itemtypeloo.ccl %]:[% itemtypeloo.code %]"/><label for="[% itemtypeloo.ccl FILTER remove(',') %]-[% itemtypeloo.number %]">[% UNLESS ( noItemTypeImages ) %][% IF ( itemtypeloo.imageurl ) %]<img border="0" src="[% itemtypeloo.imageurl %]" alt="[% itemtypeloo.description %]" />[% END %]&nbsp;[% END %]
         [% itemtypeloo.description %]</label></td>
-        [% UNLESS ( loop.count % 5 ) %]</tr><tr>[% END %]
+        [% IF ( loop.last ) %]</tr>[% ELSE %][% UNLESS ( loop.count % 5 ) %]</tr><tr>[% END %][% END %]
     [% END %]
-        </tr>
     </table>
-    </fieldset>
     </div>
     [% END %]
 <!-- /MC-TYPE LIMIT -->
             </fieldset>
 <!-- /SEARCH BUTTONS -->
 </div>
+</div>
 </form>
 </div>
 
index 4847ae3..d4e92b4 100644 (file)
     <table>
         <tr>
     [% FOREACH itemtypeloo IN advsearchloo.code_loop %]
-        <td><input type="checkbox" id="[% itemtypeloo.ccl %]-[% itemtypeloo.number %]" name="limit" value="mc-[% itemtypeloo.ccl %]:[% itemtypeloo.code %]"/><label for="[% itemtypeloo.ccl %]-[% itemtypeloo.number %]">[% UNLESS ( noItemTypeImages ) %][% IF ( itemtypeloo.imageurl ) %]<img border="0" src="[% itemtypeloo.imageurl %]" alt="[% itemtypeloo.description %]" />[% END %]&nbsp;[% END %]
+        <td><input type="checkbox" id="[% itemtypeloo.ccl FILTER remove(',') %]-[% itemtypeloo.number %]" name="limit" value="mc-[% itemtypeloo.ccl %]:[% itemtypeloo.code %]"/><label for="[% itemtypeloo.ccl FILTER remove(',') %]-[% itemtypeloo.number %]">[% UNLESS ( noItemTypeImages ) %][% IF ( itemtypeloo.imageurl ) %]<img border="0" src="[% itemtypeloo.imageurl %]" alt="[% itemtypeloo.description %]" />[% END %]&nbsp;[% END %]
         [% itemtypeloo.description %]</label></td>
-        [% UNLESS ( loop.count % 5 ) %]</tr><tr>[% END %]
+        [% IF ( loop.last ) %]</tr>[% ELSE %][% UNLESS ( loop.count % 5 ) %]</tr><tr>[% END %][% END %]
     [% END %]
-        </tr>
     </table>
     </fieldset>
     </div>
     <fieldset><legend>Language</legend>
     <!-- LANGUAGE LIMIT -->
                 <p><label for="language-limit">Language: </label>                                        
-                <select name="limit">
+                <select id="language-limit" name="limit">
                 <option value="">No Limit</option>
                 [% FOREACH search_languages_loo IN search_languages_loop %]
                     [% IF ( search_languages_loo.selected ) %]