Skip to content

Commit

Permalink
Update home page "browse by" to display facet as label if there is on…
Browse files Browse the repository at this point in the history
…ly one (geonetwork#8426) (geonetwork#8449)

* Update home page to display facet as label if there is only one

* Show label with a single facet

* Fix bug with single facet
  • Loading branch information
tylerjmchugh authored Oct 17, 2024
1 parent 89076cc commit eb2e44b
Showing 1 changed file with 5 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -118,9 +118,12 @@ <h1 data-translate="">topMaps</h1>
<div data-ng-show="homeFacet.list.length > 0">
<div class="row">
<h1 class="col-md-12">
<span data-translate="">browseBy</span>
<span data-translate="" data-ng-if="homeFacet.list.length > 2">browseBy</span>
<span data-ng-if="homeFacet.list.length < 3" data-translate="">
{{::('facet-' + homeFacet.list[0]) | facetKeyTranslator}}
</span>
</h1>
<div class="gn-topic-select col-md-12">
<div class="gn-topic-select col-md-12" data-ng-if="homeFacet.list.length > 2">
<label
data-ng-repeat="facetKey in homeFacet.list"
data-ng-init="agg = searchInfo.aggregations[facetKey]"
Expand Down

0 comments on commit eb2e44b

Please sign in to comment.