Browse Source
Merge pull request #11527 from ChantsovaEkaterina/improvement/recent-dashboards-widget-translatable-dashboard-titles
Recent dashboards widget - apply custom translation for dashboard titles
pull/11592/head
Igor Kulikov
2 years ago
committed by
GitHub
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
2 changed files with
4 additions and
4 deletions
-
ui-ngx/src/app/modules/home/components/widget/lib/home-page/recent-dashboards-widget.component.html
-
ui-ngx/src/app/shared/components/dashboard-autocomplete.component.html
|
|
|
@ -48,7 +48,7 @@ |
|
|
|
{{ 'widgets.recent-dashboards.name' | translate }} |
|
|
|
</mat-header-cell> |
|
|
|
<mat-cell class="title" *matCellDef="let lastVisitedDashboard"> |
|
|
|
<a [routerLink]="createDashboardUrl(lastVisitedDashboard.id)">{{ lastVisitedDashboard.title }}</a> |
|
|
|
<a [routerLink]="createDashboardUrl(lastVisitedDashboard.id)">{{ lastVisitedDashboard.title | customTranslate }}</a> |
|
|
|
</mat-cell> |
|
|
|
</ng-container> |
|
|
|
<ng-container matColumnDef="lastVisited"> |
|
|
|
@ -78,7 +78,7 @@ |
|
|
|
class="star" [ngClass]="{'starred': dashboard.starred}">{{ dashboard.starred ? 'star' : 'star_border' }}</mat-icon> |
|
|
|
</div> |
|
|
|
<div class="tb-cell title"> |
|
|
|
<a [routerLink]="createDashboardUrl(dashboard.id)">{{ dashboard.title }}</a> |
|
|
|
<a [routerLink]="createDashboardUrl(dashboard.id)">{{ dashboard.title | customTranslate }}</a> |
|
|
|
</div> |
|
|
|
</div> |
|
|
|
</div> |
|
|
|
|
|
|
|
@ -32,7 +32,7 @@ |
|
|
|
[matAutocomplete]="dashboardAutocomplete" |
|
|
|
[fxShow]="!useDashboardLink || !disabled || !selectDashboardFormGroup.get('dashboard').value"> |
|
|
|
<a *ngIf="useDashboardLink && selectDashboardFormGroup.get('dashboard').value && disabled" aria-label="Open device profile" [routerLink]=dashboardURL> |
|
|
|
{{ displayDashboardFn(selectDashboardFormGroup.get('dashboard').value) }} |
|
|
|
{{ displayDashboardFn(selectDashboardFormGroup.get('dashboard').value) | customTranslate }} |
|
|
|
</a> |
|
|
|
<button *ngIf="selectDashboardFormGroup.get('dashboard').value && !disabled" |
|
|
|
type="button" |
|
|
|
@ -54,7 +54,7 @@ |
|
|
|
#dashboardAutocomplete="matAutocomplete" |
|
|
|
[displayWith]="displayDashboardFn"> |
|
|
|
<mat-option *ngFor="let dashboard of filteredDashboards | async" [value]="dashboard"> |
|
|
|
<span [innerHTML]="dashboard.title | highlight:searchText"></span> |
|
|
|
<span [innerHTML]="dashboard.title | customTranslate | highlight:searchText"></span> |
|
|
|
</mat-option> |
|
|
|
<mat-option *ngIf="!(filteredDashboards | async)?.length" [value]="null"> |
|
|
|
<div (click)="$event.stopPropagation()"> |
|
|
|
|