From 530b3db7d509fcd8c42ee8dcdbefb3b1510f644f Mon Sep 17 00:00:00 2001 From: Camille Moinier Date: Thu, 11 Jan 2024 15:31:53 +0100 Subject: [PATCH 01/18] feat(dh): new header objects and positions + add text to favorite component --- .../header-record.component.html | 64 ++++++++++--------- .../favorite-star.component.html | 13 +++- .../favorite-star/favorite-star.component.ts | 1 + .../results-list.container.component.html | 5 +- 4 files changed, 49 insertions(+), 34 deletions(-) diff --git a/apps/datahub/src/app/record/header-record/header-record.component.html b/apps/datahub/src/app/record/header-record/header-record.component.html index f20951d6de..04202c7861 100644 --- a/apps/datahub/src/app/record/header-record/header-record.component.html +++ b/apps/datahub/src/app/record/header-record/header-record.component.html @@ -1,36 +1,40 @@
-
- -
- {{ metadata.title }} +
+
+
+ + +
+
+ + +
- -
- +
- + {{ metadata.title }} +
+
+

Donnée géographique

+

Mise à jour le 01.01.2024

+

[Statut]

+
- -
- -
diff --git a/libs/feature/search/src/lib/favorites/favorite-star/favorite-star.component.html b/libs/feature/search/src/lib/favorites/favorite-star/favorite-star.component.html index 401e9b1ee2..3ad8b0e9dd 100644 --- a/libs/feature/search/src/lib/favorites/favorite-star/favorite-star.component.html +++ b/libs/feature/search/src/lib/favorites/favorite-star/favorite-star.component.html @@ -1,10 +1,17 @@
- {{ - favoriteCount - }} + {{ favoriteCount }} +
diff --git a/libs/feature/search/src/lib/favorites/favorite-star/favorite-star.component.ts b/libs/feature/search/src/lib/favorites/favorite-star/favorite-star.component.ts index ddc2b9186a..8ffd869ac9 100644 --- a/libs/feature/search/src/lib/favorites/favorite-star/favorite-star.component.ts +++ b/libs/feature/search/src/lib/favorites/favorite-star/favorite-star.component.ts @@ -27,6 +27,7 @@ import { PlatformServiceInterface } from '@geonetwork-ui/common/domain/platform. changeDetection: ChangeDetectionStrategy.OnPush, }) export class FavoriteStarComponent implements AfterViewInit, OnDestroy { + @Input() displayCount: string @Input() set record(value) { this.record_ = value this.favoriteCount = diff --git a/libs/feature/search/src/lib/results-list/results-list.container.component.html b/libs/feature/search/src/lib/results-list/results-list.container.component.html index 45ed9d351b..ec457a4c21 100644 --- a/libs/feature/search/src/lib/results-list/results-list.container.component.html +++ b/libs/feature/search/src/lib/results-list/results-list.container.component.html @@ -55,5 +55,8 @@ - + From 67202e10f0b41e9330c87eea066cbdbc88b47572 Mon Sep 17 00:00:00 2001 From: Camille Moinier Date: Thu, 11 Jan 2024 15:32:11 +0100 Subject: [PATCH 02/18] feat(dh): add translations for favorite key --- translations/de.json | 1 + translations/en.json | 1 + translations/es.json | 1 + translations/fr.json | 1 + translations/it.json | 1 + translations/nl.json | 1 + translations/pt.json | 1 + translations/sk.json | 1 + 8 files changed, 8 insertions(+) diff --git a/translations/de.json b/translations/de.json index 20e6e1a395..fe1c07ab9b 100644 --- a/translations/de.json +++ b/translations/de.json @@ -115,6 +115,7 @@ "datahub.news.contact.title": "", "datahub.news.feed": "Nachrichtenfeed", "datahub.news.figures": "Indikatoren", + "datahub.record.addToFavorites": "", "datahub.search.back": "Zurück zu den Ergebnissen", "datahub.search.filter.all": "Alle", "datahub.search.filter.generatedByWfs": "Generiert durch API", diff --git a/translations/en.json b/translations/en.json index de0d52101d..374dc77d44 100644 --- a/translations/en.json +++ b/translations/en.json @@ -115,6 +115,7 @@ "datahub.news.contact.title": "A specific need?", "datahub.news.feed": "News feed", "datahub.news.figures": "Indicators", + "datahub.record.addToFavorites": "Add to favorites", "datahub.search.back": "Back to results", "datahub.search.filter.all": "All", "datahub.search.filter.generatedByWfs": "generated by an API", diff --git a/translations/es.json b/translations/es.json index f645ff47e9..9c9f2c326f 100644 --- a/translations/es.json +++ b/translations/es.json @@ -115,6 +115,7 @@ "datahub.news.contact.title": "", "datahub.news.feed": "", "datahub.news.figures": "", + "datahub.record.addToFavorites": "", "datahub.search.back": "", "datahub.search.filter.all": "", "datahub.search.filter.generatedByWfs": "", diff --git a/translations/fr.json b/translations/fr.json index b4dd3237c9..a8f6fa196e 100644 --- a/translations/fr.json +++ b/translations/fr.json @@ -115,6 +115,7 @@ "datahub.news.contact.title": "Un besoin spécifique ?", "datahub.news.feed": "Fil d'activité", "datahub.news.figures": "Quelques chiffres", + "datahub.record.addToFavorites": "Ajouter aux favoris", "datahub.search.back": "Retour aux résultats", "datahub.search.filter.all": "Tous", "datahub.search.filter.generatedByWfs": "généré par une API", diff --git a/translations/it.json b/translations/it.json index 95d9a9a7b3..8851e97770 100644 --- a/translations/it.json +++ b/translations/it.json @@ -115,6 +115,7 @@ "datahub.news.contact.title": "", "datahub.news.feed": "Feed di attività", "datahub.news.figures": "Alcune figure", + "datahub.record.addToFavorites": "Aggiungere a miei preferiti", "datahub.search.back": "Torna ai risultati", "datahub.search.filter.all": "Tutti", "datahub.search.filter.generatedByWfs": "generato da un'API", diff --git a/translations/nl.json b/translations/nl.json index a7a0178cd9..bfb22b446c 100644 --- a/translations/nl.json +++ b/translations/nl.json @@ -115,6 +115,7 @@ "datahub.news.contact.title": "", "datahub.news.feed": "", "datahub.news.figures": "", + "datahub.record.addToFavorites": "", "datahub.search.back": "", "datahub.search.filter.all": "", "datahub.search.filter.generatedByWfs": "", diff --git a/translations/pt.json b/translations/pt.json index 63b3833b70..f72827d622 100644 --- a/translations/pt.json +++ b/translations/pt.json @@ -115,6 +115,7 @@ "datahub.news.contact.title": "", "datahub.news.feed": "", "datahub.news.figures": "", + "datahub.record.addToFavorites": "", "datahub.search.back": "", "datahub.search.filter.all": "", "datahub.search.filter.generatedByWfs": "", diff --git a/translations/sk.json b/translations/sk.json index 40e0c45af2..9af4695568 100644 --- a/translations/sk.json +++ b/translations/sk.json @@ -115,6 +115,7 @@ "datahub.news.contact.title": "", "datahub.news.feed": "Spravodajský kanál", "datahub.news.figures": "Ukazovatele", + "datahub.record.addToFavorites": "", "datahub.search.back": "Späť na výsledky", "datahub.search.filter.all": "Všetky", "datahub.search.filter.generatedByWfs": "vygenerované cez API", From e4a6ba7dae10e5d86306d33778f538c630abc510 Mon Sep 17 00:00:00 2001 From: Camille Moinier Date: Thu, 11 Jan 2024 16:08:12 +0100 Subject: [PATCH 03/18] feat(dh): add language switcher --- .../header-record.component.html | 38 ++++++++++--------- .../favorite-star.component.html | 2 +- 2 files changed, 21 insertions(+), 19 deletions(-) diff --git a/apps/datahub/src/app/record/header-record/header-record.component.html b/apps/datahub/src/app/record/header-record/header-record.component.html index 04202c7861..54a17a58fb 100644 --- a/apps/datahub/src/app/record/header-record/header-record.component.html +++ b/apps/datahub/src/app/record/header-record/header-record.component.html @@ -1,7 +1,9 @@
-
+
-
+
-
+
- +
-
-
- {{ metadata.title }} -
-
-

Donnée géographique

-

Mise à jour le 01.01.2024

-

[Statut]

-
+
+ {{ metadata.title }} +
+
+

Donnée géographique

+

Mise à jour le 01.01.2024

+

[Statut]

diff --git a/libs/feature/search/src/lib/favorites/favorite-star/favorite-star.component.html b/libs/feature/search/src/lib/favorites/favorite-star/favorite-star.component.html index 3ad8b0e9dd..2a0c85f990 100644 --- a/libs/feature/search/src/lib/favorites/favorite-star/favorite-star.component.html +++ b/libs/feature/search/src/lib/favorites/favorite-star/favorite-star.component.html @@ -10,7 +10,7 @@ [disabled]="loading || (isAnonymous$ | async)" > From b434cf8ed6738df5df839175575a6960e5237098 Mon Sep 17 00:00:00 2001 From: Camille Moinier Date: Thu, 11 Jan 2024 16:31:53 +0100 Subject: [PATCH 04/18] feat(dh): add last update --- .../app/record/header-record/header-record.component.html | 7 ++++++- .../app/record/header-record/header-record.component.ts | 4 ++++ 2 files changed, 10 insertions(+), 1 deletion(-) diff --git a/apps/datahub/src/app/record/header-record/header-record.component.html b/apps/datahub/src/app/record/header-record/header-record.component.html index 54a17a58fb..5612d70073 100644 --- a/apps/datahub/src/app/record/header-record/header-record.component.html +++ b/apps/datahub/src/app/record/header-record/header-record.component.html @@ -35,7 +35,12 @@

Donnée géographique

-

Mise à jour le 01.01.2024

+
+

record.metadata.lastUpdate

+

+ {{ lastUpdate }} +

+

[Statut]

diff --git a/apps/datahub/src/app/record/header-record/header-record.component.ts b/apps/datahub/src/app/record/header-record/header-record.component.ts index 248db72c3d..9c361e7dd7 100644 --- a/apps/datahub/src/app/record/header-record/header-record.component.ts +++ b/apps/datahub/src/app/record/header-record/header-record.component.ts @@ -18,6 +18,10 @@ export class HeaderRecordComponent { constructor(private searchService: SearchService) {} + get lastUpdate() { + return this.metadata.recordUpdated.toLocaleString().split(',')[0] + } + back() { this.searchService.updateFilters({}) } From bdab98cf3d6131691467ee26b33831bab17108c0 Mon Sep 17 00:00:00 2001 From: Camille Moinier Date: Thu, 11 Jan 2024 16:32:10 +0100 Subject: [PATCH 05/18] feat(dh): add translations for last update --- translations/de.json | 1 + translations/en.json | 1 + translations/es.json | 1 + translations/fr.json | 1 + translations/it.json | 1 + translations/nl.json | 1 + translations/pt.json | 1 + translations/sk.json | 1 + 8 files changed, 8 insertions(+) diff --git a/translations/de.json b/translations/de.json index fe1c07ab9b..63c4c10d21 100644 --- a/translations/de.json +++ b/translations/de.json @@ -219,6 +219,7 @@ "record.metadata.formats": "", "record.metadata.isOpenData": "Open Data", "record.metadata.keywords": "Stichworte", + "record.metadata.lastUpdate": "", "record.metadata.links": "Links", "record.metadata.noUsage": "Für diesen Datensatz sind keine Verwendungsbedingungen angegeben.", "record.metadata.origin": "Über die Daten", diff --git a/translations/en.json b/translations/en.json index 374dc77d44..39c428e20d 100644 --- a/translations/en.json +++ b/translations/en.json @@ -219,6 +219,7 @@ "record.metadata.formats": "Formats", "record.metadata.isOpenData": "Open Data", "record.metadata.keywords": "Keywords", + "record.metadata.lastUpdate": "Lasted updated on", "record.metadata.links": "Links", "record.metadata.noUsage": "No usage conditions specified for this record.", "record.metadata.origin": "About the data", diff --git a/translations/es.json b/translations/es.json index 9c9f2c326f..29acda66ed 100644 --- a/translations/es.json +++ b/translations/es.json @@ -219,6 +219,7 @@ "record.metadata.formats": "", "record.metadata.isOpenData": "", "record.metadata.keywords": "", + "record.metadata.lastUpdate": "", "record.metadata.links": "", "record.metadata.noUsage": "", "record.metadata.origin": "", diff --git a/translations/fr.json b/translations/fr.json index a8f6fa196e..2f1f113971 100644 --- a/translations/fr.json +++ b/translations/fr.json @@ -219,6 +219,7 @@ "record.metadata.formats": "Formats", "record.metadata.isOpenData": "Donnée Ouverte", "record.metadata.keywords": "Mots clés", + "record.metadata.lastUpdate": "Mis à jour le", "record.metadata.links": "Liens", "record.metadata.noUsage": "Aucune condition d'utilisation spécifiée pour ces données", "record.metadata.origin": "À propos des données", diff --git a/translations/it.json b/translations/it.json index 8851e97770..2c18b84dc0 100644 --- a/translations/it.json +++ b/translations/it.json @@ -219,6 +219,7 @@ "record.metadata.formats": "Formati", "record.metadata.isOpenData": "Data aperta", "record.metadata.keywords": "Parole chiave", + "record.metadata.lastUpdate": "", "record.metadata.links": "Collegamenti", "record.metadata.noUsage": "Nessuna condizione d'uso specificata per questi dati", "record.metadata.origin": "Informazioni sui dati", diff --git a/translations/nl.json b/translations/nl.json index bfb22b446c..c25e718497 100644 --- a/translations/nl.json +++ b/translations/nl.json @@ -219,6 +219,7 @@ "record.metadata.formats": "", "record.metadata.isOpenData": "", "record.metadata.keywords": "", + "record.metadata.lastUpdate": "", "record.metadata.links": "", "record.metadata.noUsage": "", "record.metadata.origin": "", diff --git a/translations/pt.json b/translations/pt.json index f72827d622..c73701ddc7 100644 --- a/translations/pt.json +++ b/translations/pt.json @@ -219,6 +219,7 @@ "record.metadata.formats": "", "record.metadata.isOpenData": "", "record.metadata.keywords": "", + "record.metadata.lastUpdate": "", "record.metadata.links": "", "record.metadata.noUsage": "", "record.metadata.origin": "", diff --git a/translations/sk.json b/translations/sk.json index 9af4695568..2f21dbd390 100644 --- a/translations/sk.json +++ b/translations/sk.json @@ -219,6 +219,7 @@ "record.metadata.formats": "Formáty", "record.metadata.isOpenData": "Otvorené dáta", "record.metadata.keywords": "Kľúčové slová", + "record.metadata.lastUpdate": "", "record.metadata.links": "Odkazy", "record.metadata.noUsage": "Pre túto položku nie sú špecifikované žiadne podmienky použitia.", "record.metadata.origin": "Pôvod", From c37bd596c27b289bc62fcd4685e3a30b1668a9cf Mon Sep 17 00:00:00 2001 From: Camille Moinier Date: Fri, 12 Jan 2024 11:35:46 +0100 Subject: [PATCH 06/18] feat(dh): position of favorites et language switcher + add status --- .../header-record.component.html | 21 ++++++++++++------- .../src/lib/model/record/metadata.model.ts | 1 + 2 files changed, 15 insertions(+), 7 deletions(-) diff --git a/apps/datahub/src/app/record/header-record/header-record.component.html b/apps/datahub/src/app/record/header-record/header-record.component.html index 5612d70073..2588deb9cc 100644 --- a/apps/datahub/src/app/record/header-record/header-record.component.html +++ b/apps/datahub/src/app/record/header-record/header-record.component.html @@ -1,9 +1,9 @@ -
+
-
-
+
+
-
+
{{ metadata.title }} @@ -41,7 +41,14 @@ {{ lastUpdate }}

-

[Statut]

+
+

+
diff --git a/libs/common/domain/src/lib/model/record/metadata.model.ts b/libs/common/domain/src/lib/model/record/metadata.model.ts index 38ebcd6e1e..6c2143f5b3 100644 --- a/libs/common/domain/src/lib/model/record/metadata.model.ts +++ b/libs/common/domain/src/lib/model/record/metadata.model.ts @@ -84,6 +84,7 @@ export interface BaseRecord { extras?: Record landingPage?: URL updateFrequency?: UpdateFrequency + status?: RecordStatus // to add: iso19139.topicCategory // to add: canonical url From 6e8fe614b21a479baef27121f05dd57c45003446 Mon Sep 17 00:00:00 2001 From: Camille Moinier Date: Fri, 12 Jan 2024 15:38:46 +0100 Subject: [PATCH 07/18] feat(dh): add geographical data type --- .../header-record/header-record.component.html | 15 ++++++++++++--- .../header-record/header-record.component.ts | 17 ++++++++++++++++- .../navigation-button.component.html | 10 +++++++--- translations/de.json | 1 + translations/en.json | 3 ++- translations/es.json | 1 + translations/fr.json | 3 ++- translations/it.json | 5 +++-- translations/nl.json | 1 + translations/pt.json | 1 + translations/sk.json | 1 + 11 files changed, 47 insertions(+), 11 deletions(-) diff --git a/apps/datahub/src/app/record/header-record/header-record.component.html b/apps/datahub/src/app/record/header-record/header-record.component.html index 2588deb9cc..8cd26ed13f 100644 --- a/apps/datahub/src/app/record/header-record/header-record.component.html +++ b/apps/datahub/src/app/record/header-record/header-record.component.html @@ -7,7 +7,7 @@ @@ -34,14 +34,23 @@ {{ metadata.title }}
-

Donnée géographique

+
+ + my_location + +

record.metadata.type

+

record.metadata.lastUpdate

{{ lastUpdate }}

-
+
+

- {{ icon }} - + {{ + icon + }} + {{ + label.toUpperCase() + }} diff --git a/translations/de.json b/translations/de.json index 63c4c10d21..13a5d2104b 100644 --- a/translations/de.json +++ b/translations/de.json @@ -246,6 +246,7 @@ "record.metadata.related": "Ähnliche Datensätze", "record.metadata.sheet": "Weitere Informationen erhalten Sie unter :", "record.metadata.title": "Titel", + "record.metadata.type": "", "record.metadata.updateFrequency": "Aktualisierungsfrequenz der Daten", "record.metadata.updateStatus": "Aktualisierungsstatus der Daten", "record.metadata.updatedOn": "Letzte Aktualisierung der Dateninformationen", diff --git a/translations/en.json b/translations/en.json index 39c428e20d..126e0eec57 100644 --- a/translations/en.json +++ b/translations/en.json @@ -116,7 +116,7 @@ "datahub.news.feed": "News feed", "datahub.news.figures": "Indicators", "datahub.record.addToFavorites": "Add to favorites", - "datahub.search.back": "Back to results", + "datahub.search.back": "Back", "datahub.search.filter.all": "All", "datahub.search.filter.generatedByWfs": "generated by an API", "datahub.search.filter.others": "Others", @@ -246,6 +246,7 @@ "record.metadata.related": "Related records", "record.metadata.sheet": "More information available from:", "record.metadata.title": "Title", + "record.metadata.type": "Geographical dataset", "record.metadata.updateFrequency": "Data Update Frequency", "record.metadata.updateStatus": "Data Update Status", "record.metadata.updatedOn": "Last Data Information Update", diff --git a/translations/es.json b/translations/es.json index 29acda66ed..3f6b3d283e 100644 --- a/translations/es.json +++ b/translations/es.json @@ -246,6 +246,7 @@ "record.metadata.related": "", "record.metadata.sheet": "", "record.metadata.title": "", + "record.metadata.type": "", "record.metadata.updateFrequency": "", "record.metadata.updateStatus": "", "record.metadata.updatedOn": "", diff --git a/translations/fr.json b/translations/fr.json index 2f1f113971..7764c39814 100644 --- a/translations/fr.json +++ b/translations/fr.json @@ -116,7 +116,7 @@ "datahub.news.feed": "Fil d'activité", "datahub.news.figures": "Quelques chiffres", "datahub.record.addToFavorites": "Ajouter aux favoris", - "datahub.search.back": "Retour aux résultats", + "datahub.search.back": "Retour", "datahub.search.filter.all": "Tous", "datahub.search.filter.generatedByWfs": "généré par une API", "datahub.search.filter.others": "Autres", @@ -246,6 +246,7 @@ "record.metadata.related": "Voir aussi", "record.metadata.sheet": "Plus d'informations à l'adresse suivante :", "record.metadata.title": "Titre", + "record.metadata.type": "Donnée géographique", "record.metadata.updateFrequency": "Fréquence de mise à jour des données", "record.metadata.updateStatus": "Statut de mise à jour des données", "record.metadata.updatedOn": "Dernière mise à jour des informations sur les données", diff --git a/translations/it.json b/translations/it.json index 2c18b84dc0..1d0abd690a 100644 --- a/translations/it.json +++ b/translations/it.json @@ -116,7 +116,7 @@ "datahub.news.feed": "Feed di attività", "datahub.news.figures": "Alcune figure", "datahub.record.addToFavorites": "Aggiungere a miei preferiti", - "datahub.search.back": "Torna ai risultati", + "datahub.search.back": "Ritorna", "datahub.search.filter.all": "Tutti", "datahub.search.filter.generatedByWfs": "generato da un'API", "datahub.search.filter.others": "Altri", @@ -219,7 +219,7 @@ "record.metadata.formats": "Formati", "record.metadata.isOpenData": "Data aperta", "record.metadata.keywords": "Parole chiave", - "record.metadata.lastUpdate": "", + "record.metadata.lastUpdate": "Ultimo aggiornamento", "record.metadata.links": "Collegamenti", "record.metadata.noUsage": "Nessuna condizione d'uso specificata per questi dati", "record.metadata.origin": "Informazioni sui dati", @@ -246,6 +246,7 @@ "record.metadata.related": "Vedi anche", "record.metadata.sheet": "Per ulteriori informazioni, cliccate qui:", "record.metadata.title": "Titolo", + "record.metadata.type": "Dati geografici", "record.metadata.updateFrequency": "Frequenza di aggiornamento dei dati", "record.metadata.updateStatus": "Stato di aggiornamento dei dati", "record.metadata.updatedOn": "Ultimo aggiornamento delle informazioni sui dati", diff --git a/translations/nl.json b/translations/nl.json index c25e718497..c0140d7e91 100644 --- a/translations/nl.json +++ b/translations/nl.json @@ -246,6 +246,7 @@ "record.metadata.related": "", "record.metadata.sheet": "", "record.metadata.title": "", + "record.metadata.type": "", "record.metadata.updateFrequency": "", "record.metadata.updateStatus": "", "record.metadata.updatedOn": "", diff --git a/translations/pt.json b/translations/pt.json index c73701ddc7..81cd78a9d2 100644 --- a/translations/pt.json +++ b/translations/pt.json @@ -246,6 +246,7 @@ "record.metadata.related": "", "record.metadata.sheet": "", "record.metadata.title": "", + "record.metadata.type": "", "record.metadata.updateFrequency": "", "record.metadata.updateStatus": "", "record.metadata.updatedOn": "", diff --git a/translations/sk.json b/translations/sk.json index 2f21dbd390..981d95840d 100644 --- a/translations/sk.json +++ b/translations/sk.json @@ -246,6 +246,7 @@ "record.metadata.related": "Súvisiace záznamy", "record.metadata.sheet": "Ďalšie metadáta sú k dispozícii na:", "record.metadata.title": "Názov", + "record.metadata.type": "", "record.metadata.updateFrequency": "Frekvencia aktualizácie metadát", "record.metadata.updateStatus": "Stav aktualizácie metadát", "record.metadata.updatedOn": "Posledná aktualizácia metadát", From fc131c38a54ca41d16ddae1dbbf677bbbe5893ee Mon Sep 17 00:00:00 2001 From: Camille Moinier Date: Fri, 12 Jan 2024 16:54:04 +0100 Subject: [PATCH 08/18] feat(dh): language switcher style and position --- .../app/record/header-record/header-record.component.html | 8 ++++---- .../favorites/favorite-star/favorite-star.component.html | 7 ++++--- .../language-switcher/language-switcher.component.html | 1 + .../lib/language-switcher/language-switcher.component.ts | 2 +- 4 files changed, 10 insertions(+), 8 deletions(-) diff --git a/apps/datahub/src/app/record/header-record/header-record.component.html b/apps/datahub/src/app/record/header-record/header-record.component.html index 8cd26ed13f..7b4ef7d4be 100644 --- a/apps/datahub/src/app/record/header-record/header-record.component.html +++ b/apps/datahub/src/app/record/header-record/header-record.component.html @@ -2,7 +2,7 @@

-
+
-
+
diff --git a/libs/feature/search/src/lib/favorites/favorite-star/favorite-star.component.html b/libs/feature/search/src/lib/favorites/favorite-star/favorite-star.component.html index 2a0c85f990..aff63e96d6 100644 --- a/libs/feature/search/src/lib/favorites/favorite-star/favorite-star.component.html +++ b/libs/feature/search/src/lib/favorites/favorite-star/favorite-star.component.html @@ -1,6 +1,6 @@ -
+
{{ favoriteCount }} @@ -8,9 +8,10 @@ [toggled]="isFavorite$ | async" (newValue)="toggleFavorite($event)" [disabled]="loading || (isAnonymous$ | async)" + class="mt-1" > diff --git a/libs/ui/catalog/src/lib/language-switcher/language-switcher.component.html b/libs/ui/catalog/src/lib/language-switcher/language-switcher.component.html index 70f8b1bb58..d989df584b 100644 --- a/libs/ui/catalog/src/lib/language-switcher/language-switcher.component.html +++ b/libs/ui/catalog/src/lib/language-switcher/language-switcher.component.html @@ -5,5 +5,6 @@ [selected]="currentLang" ariaName="languages" [showTitle]="false" + [extraBtnClass]="'flex justify-items-center border border-white !pl-2 !py-1'" > diff --git a/libs/ui/catalog/src/lib/language-switcher/language-switcher.component.ts b/libs/ui/catalog/src/lib/language-switcher/language-switcher.component.ts index aa631a93ec..ad781c73cf 100644 --- a/libs/ui/catalog/src/lib/language-switcher/language-switcher.component.ts +++ b/libs/ui/catalog/src/lib/language-switcher/language-switcher.component.ts @@ -34,7 +34,7 @@ export class LanguageSwitcherComponent implements OnInit { ngOnInit(): void { const languages = this.languagePlaceholder || DEFAULT_LANGUAGES this.languageList = languages.map((language) => ({ - label: `language.${language}`, + label: `${language}`.toUpperCase(), value: language, })) } From c0ac453c6b0fc73f3391c020d609bb4c4f9cbb2d Mon Sep 17 00:00:00 2001 From: Camille Moinier Date: Fri, 12 Jan 2024 16:54:19 +0100 Subject: [PATCH 09/18] feat(dh): add several missing italian translations --- translations/it.json | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/translations/it.json b/translations/it.json index 1d0abd690a..d7182a0907 100644 --- a/translations/it.json +++ b/translations/it.json @@ -110,9 +110,9 @@ "datahub.header.organisations": "Organizzazioni", "datahub.header.popularRecords": "Più popolari", "datahub.header.title.html": "
Tutti i dati
pubblici della mia organizzazione
", - "datahub.news.contact.contactus": "", - "datahub.news.contact.html": "", - "datahub.news.contact.title": "", + "datahub.news.contact.contactus": "Contattateci", + "datahub.news.contact.html": "

Ha bisogno di dati che non sono attualmente disponibili sulla piattaforma?

I nostri team sono qui per aiutarla.

", + "datahub.news.contact.title": "Ha un bisogno specifico?", "datahub.news.feed": "Feed di attività", "datahub.news.figures": "Alcune figure", "datahub.record.addToFavorites": "Aggiungere a miei preferiti", @@ -143,7 +143,7 @@ "downloads.format.unknown": "sconosciuto", "downloads.wfs.featuretype.not.found": "Il layer non è stato trovato", "dropFile": "Trascina il suo file", - "externalviewer.dataset.unnamed": "", + "externalviewer.dataset.unnamed": "Layer del datahub", "facets.block.title.OrgForResource": "Organizzazione", "facets.block.title.availableInServices": "Disponibile per", "facets.block.title.cl_hierarchyLevel.key": "Tipo di risorsa", @@ -258,10 +258,10 @@ "record.was.created.time": "ha creato questi dati {time}", "records": "record", "results.layout.selectOne": "Mostra risultati", - "results.records.hits.displayedOn": "", + "results.records.hits.displayedOn": "{displayed, plural, =0{Nessun record} one{1 record visualizzato} other{{displayed} records visualizzati}} {hits, plural, other{su {hits} in totale.}}", "results.records.hits.empty.help.html": "Suggerimenti:
  • Prova con altre parole chiave
  • Cerca con meno parole
", "results.records.hits.found": "{hits, plural, =0{Nessuna corrispondenza.} one{1 record trovato.} other{{hits} risultati.}}", - "results.records.hits.selected": "", + "results.records.hits.selected": "{amount, plural, one{1 selezionato} other{{ amount } selezionati}}", "results.showMore": "Altri risultati...", "results.sortBy.dateStamp": "Più recente", "results.sortBy.popularity": "Popolarità", @@ -312,8 +312,8 @@ "tooltip.html.copy": "Copiare il HTML", "tooltip.url.copy": "Copiare l'URL", "tooltip.url.open": "Aprire l'URL", - "ui.readLess": "", - "ui.readMore": "", + "ui.readLess": "Ridurre", + "ui.readMore": "Leggi di più", "wfs.featuretype.notfound": "La classe di oggetto non è stata trovata nel servizio", "wfs.geojsongml.notsupported": "Il servizio non supporta il formato GeoJSON o GML", "wfs.unreachable.cors": "Il servizio non è accessibile a causa di limitazioni CORS", From 5ddd186c762fbdbff7199c8c5064843c63d4a199 Mon Sep 17 00:00:00 2001 From: Camille Moinier Date: Fri, 12 Jan 2024 17:10:19 +0100 Subject: [PATCH 10/18] fix(e2e): remove e2e test not needed --- apps/datahub-e2e/src/e2e/datasetDetailPage.cy.ts | 16 ---------------- 1 file changed, 16 deletions(-) diff --git a/apps/datahub-e2e/src/e2e/datasetDetailPage.cy.ts b/apps/datahub-e2e/src/e2e/datasetDetailPage.cy.ts index 26d431145b..91714f9a94 100644 --- a/apps/datahub-e2e/src/e2e/datasetDetailPage.cy.ts +++ b/apps/datahub-e2e/src/e2e/datasetDetailPage.cy.ts @@ -81,22 +81,6 @@ describe('dataset pages', () => { cy.url().should('include', '/search') }) }) - describe('navigation bar', () => { - it('should display the navigation bar with 4 sections', () => { - cy.get('datahub-navigation-bar') - .find('button') - .filter(':visible') - .should('have.length', 4) - }) - it('should scroll down/up to the clicked section', () => { - cy.get('datahub-navigation-bar') - .find('button') - .filter(':visible') - .as('navBtns') - cy.get('@navBtns').eq(3).click() - cy.get('datahub-record-otherlinks').should('be.visible') - }) - }) }) describe('ABOUT SECTION : display & functions', () => { From 20f736bfb3fc7ae3fa52e2f72e4209652f859f92 Mon Sep 17 00:00:00 2001 From: Camille Moinier Date: Mon, 15 Jan 2024 09:59:17 +0100 Subject: [PATCH 11/18] fix(dh): fix affected unit tests --- .../header-record.component.spec.ts | 20 ++++++++++++++++++- .../favorite-star.component.spec.ts | 1 + .../navigation-button.component.spec.ts | 2 ++ 3 files changed, 22 insertions(+), 1 deletion(-) diff --git a/apps/datahub/src/app/record/header-record/header-record.component.spec.ts b/apps/datahub/src/app/record/header-record/header-record.component.spec.ts index 6428cfa72e..c04cb850fa 100644 --- a/apps/datahub/src/app/record/header-record/header-record.component.spec.ts +++ b/apps/datahub/src/app/record/header-record/header-record.component.spec.ts @@ -1,7 +1,10 @@ import { NO_ERRORS_SCHEMA } from '@angular/core' import { ComponentFixture, TestBed } from '@angular/core/testing' +import { DATASET_RECORDS } from '@geonetwork-ui/common/fixtures' +import { MdViewFacade } from '@geonetwork-ui/feature/record' import { SearchService } from '@geonetwork-ui/feature/search' import { TranslateModule } from '@ngx-translate/core' +import { BehaviorSubject } from 'rxjs' import { HeaderRecordComponent } from './header-record.component' @@ -15,6 +18,12 @@ jest.mock('@geonetwork-ui/util/app-config', () => ({ const searchServiceMock = { updateFilters: jest.fn(), } + +class MdViewFacadeMock { + mapApiLinks$ = new BehaviorSubject([]) + geoDataLinks$ = new BehaviorSubject([]) +} + describe('HeaderRecordComponent', () => { let component: HeaderRecordComponent let fixture: ComponentFixture @@ -24,13 +33,22 @@ describe('HeaderRecordComponent', () => { declarations: [HeaderRecordComponent], imports: [TranslateModule.forRoot()], schemas: [NO_ERRORS_SCHEMA], - providers: [{ provide: SearchService, useValue: searchServiceMock }], + providers: [ + { provide: SearchService, useValue: searchServiceMock }, + { + provide: MdViewFacade, + useClass: MdViewFacadeMock, + }, + ], }).compileComponents() }) beforeEach(() => { fixture = TestBed.createComponent(HeaderRecordComponent) component = fixture.componentInstance + component.metadata = { + ...DATASET_RECORDS[0], + } fixture.detectChanges() }) diff --git a/libs/feature/search/src/lib/favorites/favorite-star/favorite-star.component.spec.ts b/libs/feature/search/src/lib/favorites/favorite-star/favorite-star.component.spec.ts index c123fe48ff..6b2a429f59 100644 --- a/libs/feature/search/src/lib/favorites/favorite-star/favorite-star.component.spec.ts +++ b/libs/feature/search/src/lib/favorites/favorite-star/favorite-star.component.spec.ts @@ -66,6 +66,7 @@ describe('FavoriteStarComponent', () => { favoritesService = TestBed.inject(FavoritesService) fixture = TestBed.createComponent(FavoriteStarComponent) component = fixture.componentInstance + component.displayCount = 'true' fixture.detectChanges() starToggle = fixture.debugElement.query( By.directive(StarToggleComponent) diff --git a/libs/ui/inputs/src/lib/navigation-button/navigation-button.component.spec.ts b/libs/ui/inputs/src/lib/navigation-button/navigation-button.component.spec.ts index 03f3864f13..81d9283773 100644 --- a/libs/ui/inputs/src/lib/navigation-button/navigation-button.component.spec.ts +++ b/libs/ui/inputs/src/lib/navigation-button/navigation-button.component.spec.ts @@ -17,6 +17,8 @@ describe('NavigationButtonComponent', () => { beforeEach(() => { fixture = TestBed.createComponent(NavigationButtonComponent) component = fixture.componentInstance + component.icon = 'navigate_before' + component.label = 'Retours aux résultats' fixture.detectChanges() }) From 254dd417c30a17e3d339b6f9910a00db352c1cb0 Mon Sep 17 00:00:00 2001 From: Camille Moinier Date: Mon, 15 Jan 2024 20:08:27 +0100 Subject: [PATCH 12/18] feat(dh): apply suggested changes from review --- .../record/header-record/header-record.component.html | 4 ++-- .../record/header-record/header-record.component.ts | 11 +++++++++-- .../favorite-star/favorite-star.component.ts | 2 +- .../results-list.container.component.html | 5 +---- .../language-switcher.component.html | 4 +++- .../navigation-button.component.html | 7 ++++--- translations/en.json | 2 +- 7 files changed, 21 insertions(+), 14 deletions(-) diff --git a/apps/datahub/src/app/record/header-record/header-record.component.html b/apps/datahub/src/app/record/header-record/header-record.component.html index 7b4ef7d4be..f5a9eca454 100644 --- a/apps/datahub/src/app/record/header-record/header-record.component.html +++ b/apps/datahub/src/app/record/header-record/header-record.component.html @@ -33,9 +33,9 @@ > {{ metadata.title }}
-
+
diff --git a/apps/datahub/src/app/record/header-record/header-record.component.ts b/apps/datahub/src/app/record/header-record/header-record.component.ts index b882829e69..57c241deb3 100644 --- a/apps/datahub/src/app/record/header-record/header-record.component.ts +++ b/apps/datahub/src/app/record/header-record/header-record.component.ts @@ -23,7 +23,7 @@ export class HeaderRecordComponent { public facade: MdViewFacade ) {} - displayMap$ = combineLatest([ + isGeodata$ = combineLatest([ this.facade.mapApiLinks$, this.facade.geoDataLinks$, ]).pipe( @@ -34,7 +34,14 @@ export class HeaderRecordComponent { ) get lastUpdate() { - return this.metadata.recordUpdated.toLocaleString().split(',')[0] + const date = this.metadata.recordUpdated + return ( + ('0' + date.getDate()).slice(-2) + + '.' + + ('0' + (date.getMonth() + 1)).slice(-2) + + '.' + + date.getFullYear() + ) } back() { diff --git a/libs/feature/search/src/lib/favorites/favorite-star/favorite-star.component.ts b/libs/feature/search/src/lib/favorites/favorite-star/favorite-star.component.ts index 8ffd869ac9..2928e02c2e 100644 --- a/libs/feature/search/src/lib/favorites/favorite-star/favorite-star.component.ts +++ b/libs/feature/search/src/lib/favorites/favorite-star/favorite-star.component.ts @@ -27,7 +27,7 @@ import { PlatformServiceInterface } from '@geonetwork-ui/common/domain/platform. changeDetection: ChangeDetectionStrategy.OnPush, }) export class FavoriteStarComponent implements AfterViewInit, OnDestroy { - @Input() displayCount: string + @Input() displayCount? = true @Input() set record(value) { this.record_ = value this.favoriteCount = diff --git a/libs/feature/search/src/lib/results-list/results-list.container.component.html b/libs/feature/search/src/lib/results-list/results-list.container.component.html index ec457a4c21..45ed9d351b 100644 --- a/libs/feature/search/src/lib/results-list/results-list.container.component.html +++ b/libs/feature/search/src/lib/results-list/results-list.container.component.html @@ -55,8 +55,5 @@
- + diff --git a/libs/ui/catalog/src/lib/language-switcher/language-switcher.component.html b/libs/ui/catalog/src/lib/language-switcher/language-switcher.component.html index d989df584b..1d0d2ab2e5 100644 --- a/libs/ui/catalog/src/lib/language-switcher/language-switcher.component.html +++ b/libs/ui/catalog/src/lib/language-switcher/language-switcher.component.html @@ -5,6 +5,8 @@ [selected]="currentLang" ariaName="languages" [showTitle]="false" - [extraBtnClass]="'flex justify-items-center border border-white !pl-2 !py-1'" + [extraBtnClass]=" + 'flex justify-items-center border border-white bg-primary text-white !pl-2 !py-1' + " > diff --git a/libs/ui/inputs/src/lib/navigation-button/navigation-button.component.html b/libs/ui/inputs/src/lib/navigation-button/navigation-button.component.html index aaa890c83f..97789516cf 100644 --- a/libs/ui/inputs/src/lib/navigation-button/navigation-button.component.html +++ b/libs/ui/inputs/src/lib/navigation-button/navigation-button.component.html @@ -4,7 +4,8 @@ {{ icon }} - {{ - label.toUpperCase() - }} + {{ label.toUpperCase() }} diff --git a/translations/en.json b/translations/en.json index 126e0eec57..b18200e83a 100644 --- a/translations/en.json +++ b/translations/en.json @@ -219,7 +219,7 @@ "record.metadata.formats": "Formats", "record.metadata.isOpenData": "Open Data", "record.metadata.keywords": "Keywords", - "record.metadata.lastUpdate": "Lasted updated on", + "record.metadata.lastUpdate": "Last updated on", "record.metadata.links": "Links", "record.metadata.noUsage": "No usage conditions specified for this record.", "record.metadata.origin": "About the data", From 5cd88027cd62a45c184c76b769926aaf86753769 Mon Sep 17 00:00:00 2001 From: Camille Moinier Date: Tue, 16 Jan 2024 16:34:45 +0100 Subject: [PATCH 13/18] feat(dh): change language switcher style --- .../src/app/record/header-record/header-record.component.html | 2 +- .../lib/language-switcher/language-switcher.component.html | 4 +--- 2 files changed, 2 insertions(+), 4 deletions(-) diff --git a/apps/datahub/src/app/record/header-record/header-record.component.html b/apps/datahub/src/app/record/header-record/header-record.component.html index f5a9eca454..02fbfa37a7 100644 --- a/apps/datahub/src/app/record/header-record/header-record.component.html +++ b/apps/datahub/src/app/record/header-record/header-record.component.html @@ -22,7 +22,7 @@ [style.--star-toggle-disabled-color]="foregroundColor" >
diff --git a/libs/ui/catalog/src/lib/language-switcher/language-switcher.component.html b/libs/ui/catalog/src/lib/language-switcher/language-switcher.component.html index 1d0d2ab2e5..6922b307ad 100644 --- a/libs/ui/catalog/src/lib/language-switcher/language-switcher.component.html +++ b/libs/ui/catalog/src/lib/language-switcher/language-switcher.component.html @@ -5,8 +5,6 @@ [selected]="currentLang" ariaName="languages" [showTitle]="false" - [extraBtnClass]=" - 'flex justify-items-center border border-white bg-primary text-white !pl-2 !py-1' - " + [extraBtnClass]="'flex justify-items-center text-white !pl-2 !py-1'" > From bb37024ae236bbcc0f7bd73a63f6b30cc4fde6fe Mon Sep 17 00:00:00 2001 From: Camille Moinier Date: Tue, 16 Jan 2024 16:35:02 +0100 Subject: [PATCH 14/18] feat(dh): improve lastUpdate getter --- .../record/header-record/header-record.component.ts | 13 +++++-------- 1 file changed, 5 insertions(+), 8 deletions(-) diff --git a/apps/datahub/src/app/record/header-record/header-record.component.ts b/apps/datahub/src/app/record/header-record/header-record.component.ts index 57c241deb3..af7bc0e6bb 100644 --- a/apps/datahub/src/app/record/header-record/header-record.component.ts +++ b/apps/datahub/src/app/record/header-record/header-record.component.ts @@ -4,6 +4,7 @@ import { getThemeConfig } from '@geonetwork-ui/util/app-config' import { CatalogRecord } from '@geonetwork-ui/common/domain/model/record' import { MdViewFacade } from '@geonetwork-ui/feature/record' import { combineLatest, map } from 'rxjs' +import { TranslateService } from '@ngx-translate/core' @Component({ selector: 'datahub-header-record', @@ -20,7 +21,8 @@ export class HeaderRecordComponent { constructor( private searchService: SearchService, - public facade: MdViewFacade + public facade: MdViewFacade, + private translateService: TranslateService ) {} isGeodata$ = combineLatest([ @@ -34,13 +36,8 @@ export class HeaderRecordComponent { ) get lastUpdate() { - const date = this.metadata.recordUpdated - return ( - ('0' + date.getDate()).slice(-2) + - '.' + - ('0' + (date.getMonth() + 1)).slice(-2) + - '.' + - date.getFullYear() + return this.metadata.recordUpdated.toLocaleDateString( + this.translateService.currentLang ) } From b76468fc95e956b19a4ab51e97a9559927d25a91 Mon Sep 17 00:00:00 2001 From: Camille Moinier Date: Tue, 16 Jan 2024 16:38:02 +0100 Subject: [PATCH 15/18] feat(dh): change metadata model type in record header --- .../src/app/record/header-record/header-record.component.ts | 4 ++-- libs/common/domain/src/lib/model/record/metadata.model.ts | 1 - 2 files changed, 2 insertions(+), 3 deletions(-) diff --git a/apps/datahub/src/app/record/header-record/header-record.component.ts b/apps/datahub/src/app/record/header-record/header-record.component.ts index af7bc0e6bb..e96559666d 100644 --- a/apps/datahub/src/app/record/header-record/header-record.component.ts +++ b/apps/datahub/src/app/record/header-record/header-record.component.ts @@ -1,7 +1,7 @@ import { ChangeDetectionStrategy, Component, Input } from '@angular/core' import { SearchService } from '@geonetwork-ui/feature/search' import { getThemeConfig } from '@geonetwork-ui/util/app-config' -import { CatalogRecord } from '@geonetwork-ui/common/domain/model/record' +import { DatasetRecord } from '@geonetwork-ui/common/domain/model/record' import { MdViewFacade } from '@geonetwork-ui/feature/record' import { combineLatest, map } from 'rxjs' import { TranslateService } from '@ngx-translate/core' @@ -13,7 +13,7 @@ import { TranslateService } from '@ngx-translate/core' changeDetection: ChangeDetectionStrategy.OnPush, }) export class HeaderRecordComponent { - @Input() metadata: CatalogRecord + @Input() metadata: DatasetRecord backgroundCss = getThemeConfig().HEADER_BACKGROUND || `center /cover url('assets/img/header_bg.webp')` diff --git a/libs/common/domain/src/lib/model/record/metadata.model.ts b/libs/common/domain/src/lib/model/record/metadata.model.ts index 6c2143f5b3..38ebcd6e1e 100644 --- a/libs/common/domain/src/lib/model/record/metadata.model.ts +++ b/libs/common/domain/src/lib/model/record/metadata.model.ts @@ -84,7 +84,6 @@ export interface BaseRecord { extras?: Record landingPage?: URL updateFrequency?: UpdateFrequency - status?: RecordStatus // to add: iso19139.topicCategory // to add: canonical url From 9ce8fbc913bd6b812489b9c37f4f073f930f7e81 Mon Sep 17 00:00:00 2001 From: Camille Moinier Date: Thu, 18 Jan 2024 17:28:04 +0100 Subject: [PATCH 16/18] feat(dh): change header elements colors, condition to language switcher and remove braces --- apps/datahub-e2e/src/e2e/datasetDetailPage.cy.ts | 9 +++++++++ .../record/header-record/header-record.component.html | 11 +++++------ .../record/header-record/header-record.component.ts | 3 ++- .../src/lib/star-toggle/star-toggle.component.css | 1 + 4 files changed, 17 insertions(+), 7 deletions(-) diff --git a/apps/datahub-e2e/src/e2e/datasetDetailPage.cy.ts b/apps/datahub-e2e/src/e2e/datasetDetailPage.cy.ts index 91714f9a94..3fcb5d5295 100644 --- a/apps/datahub-e2e/src/e2e/datasetDetailPage.cy.ts +++ b/apps/datahub-e2e/src/e2e/datasetDetailPage.cy.ts @@ -73,6 +73,15 @@ describe('dataset pages', () => { .children('header') .find('gn-ui-navigation-button') }) + it('should display the data type, last update and status', () => { + cy.visit('/dataset/01491630-78ce-49f3-b479-4b30dabc4c69') + cy.get('datahub-header-record') + .children('header') + .find('.font-title') + .next() + .as('infoBar') + cy.get('@infoBar').children('div').should('have.length', 3) + }) it('should return to the dataset list', () => { cy.get('datahub-header-record') .children('header') diff --git a/apps/datahub/src/app/record/header-record/header-record.component.html b/apps/datahub/src/app/record/header-record/header-record.component.html index 02fbfa37a7..127d2fb5f2 100644 --- a/apps/datahub/src/app/record/header-record/header-record.component.html +++ b/apps/datahub/src/app/record/header-record/header-record.component.html @@ -22,6 +22,7 @@ [style.--star-toggle-disabled-color]="foregroundColor" >
@@ -33,10 +34,10 @@ > {{ metadata.title }}
-
+
my_location @@ -49,13 +50,11 @@ {{ lastUpdate }}

-
+

diff --git a/apps/datahub/src/app/record/header-record/header-record.component.ts b/apps/datahub/src/app/record/header-record/header-record.component.ts index e96559666d..9d92672674 100644 --- a/apps/datahub/src/app/record/header-record/header-record.component.ts +++ b/apps/datahub/src/app/record/header-record/header-record.component.ts @@ -1,6 +1,6 @@ import { ChangeDetectionStrategy, Component, Input } from '@angular/core' import { SearchService } from '@geonetwork-ui/feature/search' -import { getThemeConfig } from '@geonetwork-ui/util/app-config' +import { getGlobalConfig, getThemeConfig } from '@geonetwork-ui/util/app-config' import { DatasetRecord } from '@geonetwork-ui/common/domain/model/record' import { MdViewFacade } from '@geonetwork-ui/feature/record' import { combineLatest, map } from 'rxjs' @@ -18,6 +18,7 @@ export class HeaderRecordComponent { getThemeConfig().HEADER_BACKGROUND || `center /cover url('assets/img/header_bg.webp')` foregroundColor = getThemeConfig().HEADER_FOREGROUND_COLOR || '#ffffff' + showLanguageSwitcher = getGlobalConfig().LANGUAGES?.length > 0 constructor( private searchService: SearchService, diff --git a/libs/ui/inputs/src/lib/star-toggle/star-toggle.component.css b/libs/ui/inputs/src/lib/star-toggle/star-toggle.component.css index 37815a4641..efc5d63ed2 100644 --- a/libs/ui/inputs/src/lib/star-toggle/star-toggle.component.css +++ b/libs/ui/inputs/src/lib/star-toggle/star-toggle.component.css @@ -11,6 +11,7 @@ mat-icon { font-size: 1.5em; margin-top: -0.1em; font-variation-settings: 'opsz' 40; + stroke: var(--color-primary-darker); } .star-filled { From cb3aa8f3f9f454ea71a4fba384f8df265d300e4c Mon Sep 17 00:00:00 2001 From: Camille Moinier Date: Fri, 19 Jan 2024 10:40:14 +0100 Subject: [PATCH 17/18] fix(dh): fix failing unit test --- .../app/record/header-record/header-record.component.spec.ts | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/apps/datahub/src/app/record/header-record/header-record.component.spec.ts b/apps/datahub/src/app/record/header-record/header-record.component.spec.ts index c04cb850fa..69c0334ddb 100644 --- a/apps/datahub/src/app/record/header-record/header-record.component.spec.ts +++ b/apps/datahub/src/app/record/header-record/header-record.component.spec.ts @@ -13,6 +13,11 @@ jest.mock('@geonetwork-ui/util/app-config', () => ({ HEADER_BACKGROUND: 'red', HEADER_FOREGROUND_COLOR: 'white', }), + getGlobalConfig() { + return { + LANGUAGES: ['en', 'es'], + } + }, })) const searchServiceMock = { From b1d76bb1b50f575943a574252a56ac279fb8452d Mon Sep 17 00:00:00 2001 From: Camille Moinier <132347903+cmoinier@users.noreply.github.com> Date: Mon, 22 Jan 2024 09:35:35 +0100 Subject: [PATCH 18/18] Update apps/datahub/src/app/record/header-record/header-record.component.html Co-authored-by: tkohr --- .../src/app/record/header-record/header-record.component.html | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/apps/datahub/src/app/record/header-record/header-record.component.html b/apps/datahub/src/app/record/header-record/header-record.component.html index 127d2fb5f2..7cf866be08 100644 --- a/apps/datahub/src/app/record/header-record/header-record.component.html +++ b/apps/datahub/src/app/record/header-record/header-record.component.html @@ -18,7 +18,7 @@ [displayCount]="false" class="flex text-background content-center" [style.color]="foregroundColor" - [style.--star-toggle-enabled-color]="'var(--color-primary)'" + [style.--star-toggle-enabled-color]="foregroundColor" [style.--star-toggle-disabled-color]="foregroundColor" >