-
Notifications
You must be signed in to change notification settings - Fork 103
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat: add taxonomy tab + status badges to species page
- Loading branch information
Showing
25 changed files
with
405 additions
and
673 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
86 changes: 86 additions & 0 deletions
86
...nd/src/app/shared/syntheseSharedModule/synthese-info-obs/taxonomy/taxonomy.component.html
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,86 @@ | ||
<div class="Taxonomy"> | ||
<h5 class="Taxonomy__subtitle">Classification</h5> | ||
<table class="Classification font-xs table table-striped table-sm"> | ||
<tbody> | ||
<tr> | ||
<td class="Classification__name">Groupe taxonomique</td> | ||
<td class="Classification__value">{{ taxon?.classe }}</td> | ||
</tr> | ||
<tr> | ||
<td class="Classification__name">Ordre</td> | ||
<td class="Classification__value">{{ taxon?.ordre }}</td> | ||
</tr> | ||
<tr> | ||
<td class="Classification__name">Famille</td> | ||
<td | ||
class="Classification__value" | ||
data-qa="synthese-obs-detail-taxo-familly" | ||
> | ||
{{ taxon?.famille }} | ||
</td> | ||
</tr> | ||
</tbody> | ||
</table> | ||
|
||
<!-- <h5 class="underlined underlined-sm main-color">Attribut(s) Taxonomique(s) locaux</h5> | ||
<table class="font-xs table table-striped table-sm"> | ||
<tr | ||
class="font-xs" | ||
*ngFor="let attr of taxon?.attributs" | ||
> | ||
<td> | ||
<b>{{ attr.label_attribut }}</b> | ||
</td> | ||
<td>{{ attr.valeur_attribut }}</td> | ||
</tr> | ||
</table> --> | ||
|
||
<h5 class="Taxonomy__subtitle">Statuts</h5> | ||
<table | ||
class="font-xs table table-sm" | ||
*ngIf="taxon?.status; else noStatus" | ||
> | ||
<ng-container *ngFor="let status of taxon?.status | keyvalue"> | ||
<tr class="table-primary"> | ||
<th>{{ status.value.display }}</th> | ||
</tr> | ||
<tr *ngFor="let text of status.value.text | keyvalue"> | ||
<td> | ||
<ul class="list-unstyled mt-2"> | ||
<li | ||
*ngIf="text.value.full_citation" | ||
class="d-flex w-100 justify-content-between" | ||
> | ||
<span class="flex-shrink-1 w-75"> | ||
<strong [innerHtml]="text.value.full_citation | safeHTML"></strong> | ||
<br /> | ||
({{ text.value.lb_adm_tr }} - {{ text.value.cd_sig }}) | ||
</span> | ||
<a | ||
*ngIf="text.value.doc_url" | ||
class="btn align-self-start" | ||
href="{{ text.value.doc_url }}" | ||
mat-stroked-button | ||
color="primary" | ||
target="_blank" | ||
> | ||
Voir / Télécharger | ||
<mat-icon aria-hidden="true">launch</mat-icon> | ||
</a> | ||
</li> | ||
<li> | ||
<span *ngFor="let value of text.value.values | keyvalue"> | ||
<strong *ngIf="value.value.code != 'true'"> | ||
{{ value.value.code_statut }} | ||
</strong> | ||
{{ value.value.label_statut }} | ||
{{ value.value.rq_statut }} | ||
</span> | ||
</li> | ||
</ul> | ||
</td> | ||
</tr> | ||
</ng-container> | ||
</table> | ||
<ng-template #noStatus><p>Aucun</p></ng-template> | ||
</div> |
23 changes: 23 additions & 0 deletions
23
...nd/src/app/shared/syntheseSharedModule/synthese-info-obs/taxonomy/taxonomy.component.scss
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,23 @@ | ||
.Taxonomy { | ||
display: flex; | ||
flex-flow: column; | ||
justify-content: flex-start; | ||
row-gap: 0.5rem; | ||
|
||
&__subtitle { | ||
text-decoration: underline; | ||
text-decoration-color: currentColor; | ||
text-underline-offset: 0.4rem; | ||
text-decoration-thickness: 2px; | ||
} | ||
.Classification { | ||
&__name { | ||
font-weight: bold; | ||
white-space: nowrap; | ||
} | ||
&__value { | ||
width: 100%; | ||
padding-left: 1rem; | ||
} | ||
} | ||
} |
15 changes: 15 additions & 0 deletions
15
...tend/src/app/shared/syntheseSharedModule/synthese-info-obs/taxonomy/taxonomy.component.ts
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
import { Component, Input, OnInit } from '@angular/core'; | ||
import { GN2CommonModule } from '@geonature_common/GN2Common.module'; | ||
import { CommonModule } from '@angular/common'; | ||
import { Taxon } from '@geonature_common/form/taxonomy/taxonomy.component'; | ||
|
||
@Component({ | ||
selector: 'pnx-synthese-taxonomy', | ||
templateUrl: 'taxonomy.component.html', | ||
styleUrls: ['taxonomy.component.scss'], | ||
}) | ||
export class TaxonomyComponent { | ||
@Input() | ||
taxon: Taxon | null = null; | ||
constructor() {} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.