Bug 11312: make facets selectable using an ID -- opac-bootstrap
authorFrancesca Moore <francescalamoore@gmail.com>
Tue, 14 Jan 2014 01:42:38 +0000 (14:42 +1300)
committerGalen Charlton <gmc@esilibrary.com>
Thu, 23 Jan 2014 15:52:05 +0000 (15:52 +0000)
To test:
1. search in OPAC directory
2. inspect the facets, note that they now have spans

Signed-off-by: David Cook <dcook@prosentient.com.au>
Works as described.

I'm not sure that this change is necessary, since the parent li elements
have IDs that can be hooked onto for CSS, but it doesn't change existing
behaviour and more control is always nice, so that's all right.

Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Signed-off-by: Galen Charlton <gmc@esilibrary.com>
koha-tmpl/opac-tmpl/bootstrap/en/includes/opac-facets.inc

index 5669ce1..5a6f61c 100644 (file)
             [% FOREACH facets_loo IN facets_loop %]
                 [% IF facets_loo.facets.size > 0 %]
                     <li id="[% facets_loo.type_id %]">
-                        <h5>[% IF ( facets_loo.type_label_Authors ) %]Authors[% END %]
-                                            [% IF ( facets_loo.type_label_Titles ) %]Titles[% END %]
-                                            [% IF ( facets_loo.type_label_Topics ) %]Topics[% END %]
-                                            [% IF ( facets_loo.type_label_Places ) %]Places[% END %]
-                                            [% IF ( facets_loo.type_label_Series ) %]Series[% END %]
-                                            [% IF ( facets_loo.type_label_ItemTypes ) %]Item types[% END %]
+                        <h5>[% IF ( facets_loo.type_label_Authors ) %]<span id="facets-Authors">Authors</span>[% END %]
+                                            [% IF ( facets_loo.type_label_Titles ) %]<span id="facets-Titles">Titles</span>[% END %]
+                                            [% IF ( facets_loo.type_label_Topics ) %]<span id="facets-Topics">Topics</span>[% END %]
+                                            [% IF ( facets_loo.type_label_Places ) %]<span id="facets-Places">Places</span>[% END %]
+                                            [% IF ( facets_loo.type_label_Series ) %]<span id="facets-Series">Series</span>[% END %]
+                                            [% IF ( facets_loo.type_label_ItemTypes ) %]<span id="facets-Itemtypes">Item types</span>[% END %]
                                             [% UNLESS ( singleBranchMode ) %]
-                                                [% IF ( facets_loo.type_label_Libraries ) %]Libraries[% END %]
+                                                [% IF ( facets_loo.type_label_Libraries ) %]<span id="facets-Libraries">Libraries</span>[% END %]
                                             [% END %]
-                                            [% IF ( facets_loo.type_label_Location ) %]Locations[% END %]</h5>
+                                            [% IF ( facets_loo.type_label_Location ) %]<span id="facets-Locations">Locations</span>[% END %]</h5>
                         <ul>
                             [% FOREACH facet IN facets_loo.facets %]
                                 <li>