Skip to content

Commit

Permalink
Merge pull request #299 from geonetwork/fix-downloads-block
Browse files Browse the repository at this point in the history
Fix downloads block
  • Loading branch information
akhelouat authored Sep 5, 2022
2 parents 9fb65e0 + 6879bb3 commit 66c435b
Show file tree
Hide file tree
Showing 9 changed files with 36 additions and 5 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,8 @@
<gn-ui-metadata-contact
(contact)="onContactClick($event)"
[metadata]="facade.metadata$ | async"
></gn-ui-metadata-contact>
>
</gn-ui-metadata-contact>
<gn-ui-metadata-catalog [sourceLabel]="sourceLabel$ | async">
</gn-ui-metadata-catalog>
</div>
Expand Down Expand Up @@ -89,10 +90,12 @@
</div>
</div>

<div id="access" class="container-lg px-4 lg:mx-auto">
<div *ngIf="displayDownload$ | async">
<gn-ui-data-downloads class="block mt-5"></gn-ui-data-downloads>
</div>
<div
id="access"
class="container-lg px-4 lg:mx-auto"
*ngIf="displayDownload$ | async"
>
<gn-ui-data-downloads class="block mt-5"></gn-ui-data-downloads>
</div>

<div id="links" class="container-lg px-4 lg:mx-auto">
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -80,6 +80,20 @@ describe('DownloadsListComponent', () => {
expect(items.length).toBe(3)
})
})

describe('when a list of downloads is empty', () => {
let item: DebugElement

beforeEach(() => {
component.links = []
fixture.detectChanges()
item = de.query(By.directive(DownloadsListComponent))
})
it('should not display', () => {
expect(item).toBeNull()
})
})

describe('when link format is unknown', () => {
let items: DebugElement[]

Expand Down
2 changes: 2 additions & 0 deletions translations/de.json
Original file line number Diff line number Diff line change
Expand Up @@ -86,6 +86,8 @@
"datahub.news.figures": "",
"datahub.search.back": "",
"datahub.search.filter.generatedByWfs": "",
"datahub.search.filter.all": "",
"datahub.search.filter.others": "",
"dataset.error.http": "",
"dataset.error.network": "",
"dataset.error.parse": "",
Expand Down
2 changes: 2 additions & 0 deletions translations/en.json
Original file line number Diff line number Diff line change
Expand Up @@ -86,6 +86,8 @@
"datahub.news.figures": "Indicators",
"datahub.search.back": "Back to results",
"datahub.search.filter.generatedByWfs": "generated by API (WFS)",
"datahub.search.filter.all": "All",
"datahub.search.filter.others": "Others",
"dataset.error.http": "The data could not be loaded because of an HTTP error",
"dataset.error.network": "The data could not be loaded because of a network error or CORS limitations",
"dataset.error.parse": "The data was loaded but could not be parsed",
Expand Down
2 changes: 2 additions & 0 deletions translations/es.json
Original file line number Diff line number Diff line change
Expand Up @@ -86,6 +86,8 @@
"datahub.news.figures": "",
"datahub.search.back": "",
"datahub.search.filter.generatedByWfs": "",
"datahub.search.filter.all": "",
"datahub.search.filter.others": "",
"dataset.error.http": "",
"dataset.error.network": "",
"dataset.error.parse": "",
Expand Down
2 changes: 2 additions & 0 deletions translations/fr.json
Original file line number Diff line number Diff line change
Expand Up @@ -86,6 +86,8 @@
"datahub.news.figures": "Quelques chiffres",
"datahub.search.back": "Retour aux résultats",
"datahub.search.filter.generatedByWfs": "généré par API (WFS)",
"datahub.search.filter.all": "Tout",
"datahub.search.filter.others": "Autres",
"dataset.error.http": "Le chargement des données a échoué en raison d'une erreur HTTP",
"dataset.error.network": "Le chargement des données a échoué en raison d'une erreur réseau ou de limitations CORS",
"dataset.error.parse": "Les données ont été chargées mais leur décodage a échoué",
Expand Down
2 changes: 2 additions & 0 deletions translations/it.json
Original file line number Diff line number Diff line change
Expand Up @@ -86,6 +86,8 @@
"datahub.news.figures": "",
"datahub.search.back": "",
"datahub.search.filter.generatedByWfs": "name",
"datahub.search.filter.all": "",
"datahub.search.filter.others": "",
"dataset.error.http": "",
"dataset.error.network": "",
"dataset.error.parse": "",
Expand Down
2 changes: 2 additions & 0 deletions translations/nl.json
Original file line number Diff line number Diff line change
Expand Up @@ -86,6 +86,8 @@
"datahub.news.figures": "",
"datahub.search.back": "",
"datahub.search.filter.generatedByWfs": "",
"datahub.search.filter.all": "",
"datahub.search.filter.others": "",
"dataset.error.http": "",
"dataset.error.network": "",
"dataset.error.parse": "",
Expand Down
2 changes: 2 additions & 0 deletions translations/pt.json
Original file line number Diff line number Diff line change
Expand Up @@ -86,6 +86,8 @@
"datahub.news.figures": "",
"datahub.search.back": "",
"datahub.search.filter.generatedByWfs": "",
"datahub.search.filter.all": "",
"datahub.search.filter.others": "",
"dataset.error.http": "",
"dataset.error.network": "",
"dataset.error.parse": "",
Expand Down

0 comments on commit 66c435b

Please sign in to comment.