Bug 17169 - Use CCODE descriptions instead of codes
authorNick Clemens <nick@bywatersolutions.com>
Thu, 16 Feb 2017 14:26:20 +0000 (14:26 +0000)
committerBrendan A Gallagher <brendan@bywatersolutions.com>
Wed, 22 Mar 2017 19:24:23 +0000 (19:24 +0000)
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Signed-off-by: Brendan A Gallagher <brendan@bywatersolutions.com>
koha-tmpl/intranet-tmpl/prog/en/includes/facets.inc
koha-tmpl/opac-tmpl/bootstrap/en/includes/opac-facets.inc

index 887c38c..572be95 100644 (file)
@@ -1,3 +1,4 @@
+[% USE AuthorisedValues %]
 [% IF ( opacfacets ) %]
 [% IF ( facets_loop ) %]
 <div id="search-facets">
@@ -27,6 +28,7 @@
     [% url = BLOCK %][% url %][% "&amp;sort_by=" _ sort_by |url %][% END %]
   [% END %]
   [% FOREACH facet IN facets_loo.facets %]
+  [% IF facets_loo.type_label_CollectionCodes %][% SET facet.facet_label_value = AuthorisedValues.GetByCode('CCODE',facet.facet_label_value,0) || facet.facet_label_value %][% END %]
     <li>
       [% IF facet.active %]
         [% SET local_url = url _ "&amp;nolimit=" _ facet.type_link_value _ ":" _ facet.facet_link_value %]
index b1505b7..e89a693 100644 (file)
@@ -1,3 +1,4 @@
+[% USE AuthorisedValues %]
 [% IF ( opacfacets && facets_loop && total ) %]
     <div id="search-facets">
         <h4><a href="#" class="menu-collapse-toggle">Refine your search</a></h4>
@@ -36,6 +37,7 @@
                               [% url = BLOCK %][% url %][% "&amp;sort_by=" _ sort_by |url %][% END %]
                             [% END %]
                             [% FOREACH facet IN facets_loo.facets %]
+                            [% IF facets_loo.type_label_CollectionCodes %][% SET facet.facet_label_value = AuthorisedValues.GetByCode('CCODE',facet.facet_label_value,1) || facet.facet_label_value %][% END %]
                                 <li>
                                   [% IF facet.active %]
                                     [% SET local_url = url _ "&amp;nolimit=" _ facet.type_link_value _ ":" _ facet.facet_link_value %]