diff --git a/apps/datahub/src/app/search/search-filters/search-filters.component.ts b/apps/datahub/src/app/search/search-filters/search-filters.component.ts index ec383d2..f2108cc 100644 --- a/apps/datahub/src/app/search/search-filters/search-filters.component.ts +++ b/apps/datahub/src/app/search/search-filters/search-filters.component.ts @@ -1,6 +1,7 @@ import { ChangeDetectionStrategy, Component } from '@angular/core' import { marker } from '@biesbjerg/ngx-translate-extract-marker' import { RouterFacade } from 'geonetwork-ui' +import { getOptionalSearchConfig } from 'geonetwork-ui' marker('mel.datahub.search.filters.topic') marker('mel.datahub.search.filters.categoryKeyword') @@ -11,6 +12,12 @@ marker('mel.datahub.search.filters.qualityScore') marker('mel.datahub.search.filters.territories') marker('mel.datahub.search.filters.producerOrg') marker('mel.datahub.search.filters.publisherOrg') +marker('mel.datahub.search.filters.format') +marker('mel.datahub.search.filters.inspireKeyword') +marker('mel.datahub.search.filters.keyword') +marker('mel.datahub.search.filters.isSpatial') +marker('mel.datahub.search.filters.resourceType') +marker('mel.datahub.search.filters.representationType') @Component({ selector: 'mel-datahub-search-filters', @@ -21,14 +28,16 @@ marker('mel.datahub.search.filters.publisherOrg') export class SearchFiltersComponent { constructor(private routerFacade: RouterFacade) {} displayCount = 3 - searchConfig = [ - 'categoryKeyword', - 'organization', - 'publicationYear', - 'license', - 'qualityScore', - 'territories', - ].map((filter) => ({ + searchConfig = ( + getOptionalSearchConfig().ADVANCED_FILTERS || [ + 'categoryKeyword', + 'organization', + 'publicationYear', + 'license', + 'qualityScore', + 'territories', + ] + ).map((filter) => ({ fieldName: filter, title: `mel.datahub.search.filters.${filter}`, })) diff --git a/resources/translations/en_MEL.json b/resources/translations/en_MEL.json index eb74eb6..3fd181f 100644 --- a/resources/translations/en_MEL.json +++ b/resources/translations/en_MEL.json @@ -11,13 +11,16 @@ "mel.datahub.multiselect.filter.placeholder": "", "mel.datahub.search.clear": "", "mel.datahub.search.filters.categoryKeyword": "", + "mel.datahub.search.filters.format": "", + "mel.datahub.search.filters.inspireKeyword": "", + "mel.datahub.search.filters.isSpatial": "", + "mel.datahub.search.filters.keyword": "", "mel.datahub.search.filters.license": "", "mel.datahub.search.filters.maxValue": "", "mel.datahub.search.filters.minValue": "", "mel.datahub.search.filters.more": "", "mel.datahub.search.filters.organization": "", "mel.datahub.search.filters.producerOrg": "", - "mel.datahub.search.filters.publicationYear": "", "mel.datahub.search.filters.publisherOrg": "", "mel.datahub.search.filters.qualityScore": "", "mel.datahub.search.filters.range.from": "", @@ -25,8 +28,13 @@ "mel.datahub.search.filters.reduce": "", "mel.datahub.search.filters.reset": "", "mel.datahub.search.filters.territories": "", - "mel.datahub.search.filters.topic": "", "mel.datahub.search.filters.validate": "", + "mel.datahub.search.filters.publicationYear": "", + "mel.datahub.search.filters.publisher": "", + "mel.datahub.search.filters.representationType": "", + "mel.datahub.search.filters.resourceType": "", + "mel.datahub.search.filters.revisionYear": "", + "mel.datahub.search.filters.topic": "", "mel.datahub.search.form.description": "", "mel.datahub.search.form.title": "", "mel.datahub.search.hits.found": "", diff --git a/resources/translations/fr_MEL.json b/resources/translations/fr_MEL.json index 38a6d7c..96e9cf0 100644 --- a/resources/translations/fr_MEL.json +++ b/resources/translations/fr_MEL.json @@ -11,13 +11,16 @@ "mel.datahub.multiselect.filter.placeholder": "Rechercher", "mel.datahub.search.clear": "Effacer", "mel.datahub.search.filters.categoryKeyword": "Thématique", + "mel.datahub.search.filters.format": "Format", + "mel.datahub.search.filters.inspireKeyword": "Mot-clé INSPIRE", + "mel.datahub.search.filters.isSpatial": "Données spatiales", + "mel.datahub.search.filters.keyword": "Mot-clé", "mel.datahub.search.filters.license": "Licence", "mel.datahub.search.filters.maxValue": "Valeur maximale", "mel.datahub.search.filters.minValue": "Valeur minimale", "mel.datahub.search.filters.more": "Plus de filtres", "mel.datahub.search.filters.organization": "Organisation", "mel.datahub.search.filters.producerOrg": "Producteur", - "mel.datahub.search.filters.publicationYear": "Date", "mel.datahub.search.filters.publisherOrg": "Distributeur", "mel.datahub.search.filters.qualityScore": "Score de qualité", "mel.datahub.search.filters.range.from": "De :", @@ -27,6 +30,11 @@ "mel.datahub.search.filters.territories": "Territoires", "mel.datahub.search.filters.topic": "Catégories", "mel.datahub.search.filters.validate": "Valider", + "mel.datahub.search.filters.publicationYear": "Année de publication", + "mel.datahub.search.filters.publisher": "Producteur", + "mel.datahub.search.filters.representationType": "Type de représentation", + "mel.datahub.search.filters.resourceType": "Type de ressource", + "mel.datahub.search.filters.revisionYear": "Date", "mel.datahub.search.form.description": "Vous pouvez utiliser la barre de recherche ou les différents filtres situés ci-dessous pour trouver un jeu de données plus rapidement.", "mel.datahub.search.form.title": "Trouver un jeu de données", "mel.datahub.search.hits.found": "{hits, plural, =0{Aucune correspondance.} one{1 enregistrement trouvé.} other{Ensemble des données: {hits}}}",