From 4ea3a7def1cf0b1a68463cda7d51c1b5226bbde3 Mon Sep 17 00:00:00 2001 From: Alexander Ioannidis Date: Tue, 20 Mar 2018 17:31:09 +0100 Subject: [PATCH] templates: show facet selections with no results * Shows top-level selected values from previously selected facets that have zero results. (closes #111) --- src/invenio-search-js/templates/facets.html | 24 +++++++++++++-------- 1 file changed, 15 insertions(+), 9 deletions(-) diff --git a/src/invenio-search-js/templates/facets.html b/src/invenio-search-js/templates/facets.html index 2d52737..8c54ef0 100644 --- a/src/invenio-search-js/templates/facets.html +++ b/src/invenio-search-js/templates/facets.html @@ -6,38 +6,44 @@ under the terms of the MIT License; see LICENSE file for more details. -->
-
+

{{ aggr.key }}

-
    +
    • {{ item.key }} ({{ item.doc_count }}) {{ (tree[item.key]) ? '-' : '+' }} -
      +
      -
        +
        • {{ subFacets.key }} ({{ subFacets.doc_count }}) + ng-init="tree[item.key] = (subValues.indexOf(subFacets.key) > -1 || tree[item.key])" + type="checkbox" + ng-checked="subValues.indexOf(subFacets.key) > -1" + ng-click="handleClick(subKey, subFacets.key)" /> {{ subFacets.key }} ({{ subFacets.doc_count }})
    + +
      +
    • + {{ selectedValue }} (0) +
    • +