Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: add link to taxon sheet in synthese list #3175

Open
wants to merge 3 commits into
base: develop
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion backend/geonature/core/gn_synthese/synthese_config.py
Original file line number Diff line number Diff line change
Expand Up @@ -91,7 +91,7 @@
]

# Mandatory columns for the frontend in Synthese API
MANDATORY_COLUMNS = ["id_synthese", "entity_source_pk_value", "url_source", "cd_nom"]
MANDATORY_COLUMNS = ["id_synthese", "entity_source_pk_value", "url_source", "cd_nom", "id_dataset"]

# CONFIG MAP-LIST
DEFAULT_LIST_COLUMN = [
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -82,11 +82,38 @@
let-row="row"
ngx-datatable-cell-template
>
<span [title]="row[col.prop]">
{{
col.prop == 'date_max' || col.prop == 'date_min' ? getDate(row[col.prop]) : row[col.prop]
}}
<span
[title]="row[col.prop]"
[ngSwitch]="col.prop"
>
<div *ngSwitchCase="'date_min' || 'date_max'">
{{ getDate(row[col.prop]) }}
</div>
<div *ngSwitchCase="'nom_vern_or_lb_nom'">
<a
class="Link"
[routerLink]="['taxon/' + row.cd_nom]"
*ngIf="row.hasOwnProperty('cd_nom'); else cellDefault"
matTooltip="Afficher la fiche du taxon"
>
<ng-container *ngTemplateOutlet="cellDefault"></ng-container>
</a>
</div>
<div *ngSwitchCase="'dataset_name'">
<a
class="Link"
[routerLink]="['/metadata/dataset_detail/' + row.id_dataset]"
*ngIf="row.hasOwnProperty('id_dataset'); else cellDefault"
matTooltip="Afficher la fiche du jeu de données"
>
<ng-container *ngTemplateOutlet="cellDefault"></ng-container>
</a>
</div>
<ng-container *ngSwitchDefault>
<ng-container *ngTemplateOutlet="cellDefault"></ng-container>
</ng-container>
</span>
<ng-template #cellDefault>{{ row[col.prop] }}</ng-template>
</ng-template>
</ngx-datatable-column>
</ngx-datatable>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -49,3 +49,8 @@ button[disabled] {
height: 20px !important;
font-size: 10px !important;
}

.Link {
color: var(--purple);
filter: brightness(70%);
}
Loading