OPAC Browse: i18n improvement for short terms
authorLebbeous Fogle-Weekley <lebbeous@esilibrary.com>
Tue, 14 May 2013 19:48:39 +0000 (15:48 -0400)
committerLebbeous Fogle-Weekley <lebbeous@esilibrary.com>
Tue, 14 May 2013 19:48:39 +0000 (15:48 -0400)
This makes the row of widgets "Browse by <foo> for <bar> held under
<baz>" localizable.

There is a minor usability tradeoff as we lose the clickable <label>
tags, but I think the trade is worth it.

Signed-off-by: Lebbeous Fogle-Weekley <lebbeous@esilibrary.com>
Open-ILS/src/templates/opac/browse.tt2

index 6e806a6..aedce40 100644 (file)
                         <input type="hidden" name="blimit"
                             value="[% blimit %]" />
 
-                        <label for="browse-search-class">[%
-                            l('Browse by') %]</label>
-                        [% INCLUDE "opac/parts/qtype_selector.tt2"
+                        [% control_qtype = INCLUDE "opac/parts/qtype_selector.tt2"
                             id="browse-search-class" browse_only=1 %]
 
-                        <label for="browse-term">[% l('for') %]</label>
-                        <input type="text" name="bterm" id="browse-term"
-                            value="[% CGI.param('bterm') | html %]" />
-
-                        <label for="browse-context">[%
-                            l('held under') %]</label>
-                        [% INCLUDE build_org_selector id='browse-context'
+                        [% control_bterm = BLOCK %]<input type="text" name="bterm" id="browse-term"
+                            value="[% CGI.param('bterm') | html %]" />[% END %]
+                        [% control_locg = INCLUDE build_org_selector id='browse-context'
                             show_loc_groups=1
                             arialabel=l('Select holding library') %]
+                        [% l('Browse by [_1] for [_2] held under [_3]', control_qtype, control_bterm, control_locg) %]
 
                         <input type="submit" value="[% l('Go') %]" />
                     </form>