Koha/koha-tmpl/opac-tmpl/bootstrap/en/includes/opac-facets.inc
Tomas Cohen Arazi 700568bb89 Bug 11117: Fix text mixup in facets where RTL text + facet count showed
This patch adds classes for both the facet label and count, and adds
'inline-block' to the 'facet-count' class so text shows properly.

To reproduce:
- Have facets to show some right to left text (example on the bug
  report) in English language templates.
- Enable the displayFacetCount.
- Check it displays like the attached screenshot.

To test:
- Apply the patch
- Do a search that previously reproduced the problem on the staff
  interface
=> Shows correctly
- Repeat for OPAC (the three themes)
=> Shows correctly

Sponsored-by: Universidad Nacional de Cordoba

Signed-off-by: Bernardo Gonzalez Kriegel <bgkriegel@gmail.com>
Still work as described. Checked in Arabic with Arabic records.
No koha-qa errors

Signed-off-by: Katrin Fischer <Katrin.Fischer.83@web.de>
Passes all tests and QA script.
Confirmed bug and that the patch fixes it, tested in staff,
prog, ccsr and bootstrap.

Signed-off-by: Galen Charlton <gmc@esilibrary.com>
2014-05-05 00:44:31 +00:00

59 lines
4 KiB
HTML

[% IF ( opacfacets && facets_loop && total ) %]
<div id="search-facets">
<h4><a href="#" class="menu-collapse-toggle">Refine your search</a></h4>
<ul class="menu-collapse">
<li id="availability_facet">Availability
<ul>
<li>
[% IF ( available ) %]
Showing only <strong>available</strong> items. <a href="/cgi-bin/koha/opac-search.pl?[% query_cgi |url %][% limit_cgi_not_availablity %][% IF ( sort_by ) %]&amp;sort_by=[% sort_by |url %][% END %]">Show all items</a>
[% ELSE %]
<a href="/cgi-bin/koha/opac-search.pl?[% query_cgi |url %][% limit_cgi |url %][% IF ( sort_by ) %]&amp;sort_by=[% sort_by |url %][% END %]&amp;limit=available">Limit to currently available items.</a>
[% END %]
</li>
</ul>
[% IF ( related ) %] <li>(related searches: [% FOREACH relate IN related %][% relate.related_search %][% END %])</li>[% END %]
</li>
[% FOREACH facets_loo IN facets_loop %]
[% IF facets_loo.facets.size > 0 %]
<li id="[% facets_loo.type_id %]">
[% IF facets_loo.type_label_Authors %]<h5 id="facet-authors">Authors</h5>[% END %]
[% IF facets_loo.type_label_Titles %]<h5 id="facet-titles">Titles</h5>[% END %]
[% IF facets_loo.type_label_Topics %]<h5 id="facet-topics">Topics</h5>[% END %]
[% IF facets_loo.type_label_Places %]<h5 id="facet-places">Places</h5>[% END %]
[% IF facets_loo.type_label_Series %]<h5 id="facet-series">Series</h5>[% END %]
[% IF facets_loo.type_label_ItemTypes %]<h5 id="facet-itemtypes">Item types</h5>[% END %]
[% UNLESS singleBranchMode %]
[% IF ( facets_loo.type_label_HomeLibrary ) %]<span id="facet-home-libraries">Home libraries</span>[% END %]
[% IF ( facets_loo.type_label_HoldingLibrary ) %]<span id="facet-holding-libraries">Holding libraries</span>[% END %]
[% END %]
[% IF facets_loo.type_label_Location %]<h5 id="facet-locations">Locations</h5>[% END %]
<ul>
[% FOREACH facet IN facets_loo.facets %]
<li>
<span class="facet-label"><a href="/cgi-bin/koha/opac-search.pl?[% query_cgi |url %][% limit_cgi |url %][% IF ( sort_by ) %]&amp;sort_by=[% sort_by |url %][% END %]&amp;limit=[% facet.type_link_value |url %]:[% facet.facet_link_value |url %]" title="[% facet.facet_title_value |html %]">[% facet.facet_label_value %]</a></span>
[% IF ( displayFacetCount ) %]
<span class="facet-count"> ([% facet.facet_count %])</span>
[% END %]
</li>
[% END %]
[% IF ( facets_loo.expandable ) %]
<li class="showmore">
<a href="/cgi-bin/koha/opac-search.pl?[% query_cgi |url %][% limit_cgi |url %][% IF ( sort_by ) %]&amp;sort_by=[% sort_by |url %][% END %][% IF ( offset ) %]
&amp;offset=[% offset |url %][% END %]&amp;expand=[% facets_loo.expand |url %]#[% facets_loo.type_id |url %]">Show more</a>
</li>
[% END %]
</ul>
</li>
[% END # / IF facets_loo.facets.size > 0 %]
[% END # / FOREACH facets_loo %]
</ul>
</div> <!-- / #search-facets -->
[% IF ( OPACResultsSidebar ) %]
<div id="opacresultssidebar">
[% OPACResultsSidebar %]
</div>
[% END %]
[% END # / IF opacfacets && facets_loop %]