Skip to content

Commit

Permalink
fix: source defaut logo header and dora footer
Browse files Browse the repository at this point in the history
  • Loading branch information
abelkhay committed Mar 27, 2024
1 parent 7fff9e5 commit 5f29e47
Show file tree
Hide file tree
Showing 5 changed files with 21 additions and 12 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -64,8 +64,12 @@ <h1 class="h2 fw-bold mb-0 text-first-letter-uppercase">
</span>
</a>
<ng-template #noLogo>
<span class="circle-wrapper">
<span role="img" class="ri-lg ri-database-2-line text-primary" aria-hidden="true"></span>
<span class="circle-wrapper mt-1">
<span
role="img"
class="ri-lg ri-database-2-line text-primary"
title="{{ source.label }}"
aria-hidden="true"></span>
</span>
</ng-template>
</div>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -153,7 +153,7 @@ <h2 class="h5 text-muted text-uppercase mt-1 flex-grow-1">Une erreur sur les don
Vous travaillez dans cette structure ou 锚tes habilit茅s 脿 mettre 脿 jour les donn茅es de cette fiche ?
<br />
Si besoin, nous organisons des webinaires mensuels pour vous accompagner dans cette mise 脿 jour.
<div class="mt-2 row g-3">
<div #source class="mt-2 row g-3">
<div class="col-sm-6 col-12">
<app-source-footer [sources]="lieuMediationNumerique.source"></app-source-footer>
</div>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,14 +8,17 @@
<div class="col-auto d-flex g-2">
<span *ngFor="let source of sources" class="circle-wrapper-light square-xl me-2">
<img
*ngIf="source.logo as logo; else noLogo"
*ngIf="source.update_link as update_link; else noUpdateLink"
class="img-fluid p-2"
[src]="assetsConfiguration.path + '/img/logo/source-update/' + logo + '.svg'"
[src]="assetsConfiguration.path + '/img/logo/source-update/' + source.logo + '.svg'"
alt="{{ source.label }}" />
<ng-template #noUpdateLink>
<img
class="img-fluid p-2"
[src]="assetsConfiguration.path + '/img/logo/source-update/' + 'dora.svg'"
alt="{{ source.label }}" />
</ng-template>
</span>
<ng-template #noLogo>
<span role="img" class="ri-lg ri-database-2-line text-primary" aria-hidden="true"></span>
</ng-template>
</div>
<div class="col">
<div [ngClass]="sources?.[0]?.label === 'France Services' ? 'text-muted' : 'text-primary'" class="fw-bold">
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,9 @@ export class SourceFooterComponent {
public constructor(@Inject(ASSETS_TOKEN) public assetsConfiguration: AssetsConfiguration) {}

public getFirstUpdateLink(sources: SourcePresentation[] | undefined): string {
return sources?.find((source) => source.update_link)?.update_link || '';
return (
sources?.find((source) => source.update_link)?.update_link ||
'https://dora.inclusion.beta.gouv.fr/auth/connexion?next=%2F'
);
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -108,9 +108,8 @@ const availableSourcesMap: Map<string, SourcePresentation> = new Map<string, Sou
'Mairie Aix en Provence',
{
label: 'Ville Aix en Provence',
link: '',
detail: '',
update_link: '',
link: 'https://www.data.gouv.fr/fr/datasets/lieux-de-mediation-numerique-sur-le-territoire-bouches-du-rhone-fournis-par-mairie-aix-en-provence/',
detail: "Ces donn茅es sont int茅gr茅es via l'outil DORA",
logo: ''
}
],
Expand Down

0 comments on commit 5f29e47

Please sign in to comment.