Skip to content

Commit

Permalink
feat: add link to taxon sheet in synthese list
Browse files Browse the repository at this point in the history
  • Loading branch information
edelclaux committed Sep 17, 2024
1 parent d5cca73 commit 4568149
Show file tree
Hide file tree
Showing 2 changed files with 25 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -82,11 +82,27 @@
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"
>
<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%);
}

0 comments on commit 4568149

Please sign in to comment.