Skip to content

Commit

Permalink
Merge pull request #95 from camptocamp/detailed-file-button
Browse files Browse the repository at this point in the history
[Dataset page]: Add "detailed file" button
  • Loading branch information
cmoinier authored Jul 10, 2024
2 parents 6dc3151 + 9032562 commit 1f4423d
Show file tree
Hide file tree
Showing 5 changed files with 25 additions and 2 deletions.
8 changes: 8 additions & 0 deletions apps/datahub-e2e/src/e2e/dataset.cy.ts
Original file line number Diff line number Diff line change
Expand Up @@ -193,6 +193,14 @@ describe('datasets', () => {
.find('a')
.should('have.length', 4)
})
it('should display the detailed file link and lead to it', () => {
cy.get('@mainInfo')
.children('div')
.eq(4)
.find('a')
.invoke('attr', 'href')
.should('include', '/geonetwork/srv/fre/catalog.search#/metadata')
})
})

describe('API block', () => {
Expand Down
2 changes: 1 addition & 1 deletion apps/datahub-e2e/src/e2e/search.cy.ts
Original file line number Diff line number Diff line change
Expand Up @@ -224,7 +224,7 @@ describe('search', () => {
)
})
})
describe.only('pagination', () => {
describe('pagination', () => {
beforeEach(() => {
cy.visit('/search')
})
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
mel.dataset.informations
</div>
</div>
<div class="flex flex-col gap-8 border-b-[1px] border-gray-3 pb-6">
<div class="flex flex-col gap-8 border-b-[1px] border-gray-3 pb-2">
@if(lastUpdate){
<div class="flex flex-row gap-2">
<span class="font-semibold" translate="">mel.dataset.updatedOn</span>
Expand Down Expand Up @@ -47,6 +47,19 @@
<span class="mr-1" translate="">mel.dataset.owner</span>
<span>{{ record.ownerOrganization?.name }}</span>
</div>
} @if(record.landingPage) {
<div class="flex flex-row gap-1">
<a
class="underline text-gray-2 text-sm"
[href]="record.landingPage"
translate
>mel.dataset.details
</a>
<mat-icon
class="material-symbols-outlined !w-[12px] !h-[14px] !text-[14px] opacity-75 mt-1"
>open_in_new</mat-icon
>
</div>
}
</div>
<div class="flex flex-col gap-2 pt-4">
Expand Down
1 change: 1 addition & 0 deletions resources/translations/en_MEL.json
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,7 @@
"mel.dataset.back": "Back",
"mel.dataset.categories": "Categories :",
"mel.dataset.copy.cliboard": "",
"mel.dataset.details": "",
"mel.dataset.download": "Download",
"mel.dataset.favorite": "Favorites",
"mel.dataset.informations": "Information",
Expand Down
1 change: 1 addition & 0 deletions resources/translations/fr_MEL.json
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,7 @@
"mel.dataset.back": "Retour",
"mel.dataset.categories": "Catégories :",
"mel.dataset.copy.cliboard": "Copier le lien",
"mel.dataset.details": "Fiche détaillée",
"mel.dataset.download": "Télécharger",
"mel.dataset.favorite": "Favoris",
"mel.dataset.informations": "Informations",
Expand Down

0 comments on commit 1f4423d

Please sign in to comment.