Added translation for short role name position
This commit is contained in:
parent
9bbfe498cc
commit
f972055ebf
@ -3,7 +3,8 @@
|
|||||||
</h1>
|
</h1>
|
||||||
<div class="content-wrapper">
|
<div class="content-wrapper">
|
||||||
<div class="content">
|
<div class="content">
|
||||||
<p-table #dt [value]="shortRoleNames" [responsive]="true" responsiveLayout="stack" [breakpoint]="'720px'" dataKey="id" editMode="row" [rowHover]="true" [rows]="10"
|
<p-table #dt [value]="shortRoleNames" [responsive]="true" responsiveLayout="stack" [breakpoint]="'720px'"
|
||||||
|
dataKey="id" editMode="row" [rowHover]="true" [rows]="10"
|
||||||
[rowsPerPageOptions]="[10,25,50]" [paginator]="true" [loading]="loading" [totalRecords]="totalRecords"
|
[rowsPerPageOptions]="[10,25,50]" [paginator]="true" [loading]="loading" [totalRecords]="totalRecords"
|
||||||
[lazy]="true" (onLazyLoad)="nextPage($event)">
|
[lazy]="true" (onLazyLoad)="nextPage($event)">
|
||||||
|
|
||||||
@ -17,12 +18,14 @@
|
|||||||
{{'view.server.short_role_names.short_role_names' | translate}}
|
{{'view.server.short_role_names.short_role_names' | translate}}
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<app-multi-select-columns [table]="name" [columns]="columns" [(hiddenColumns)]="hiddenColumns"></app-multi-select-columns>
|
<app-multi-select-columns [table]="name" [columns]="columns"
|
||||||
|
[(hiddenColumns)]="hiddenColumns"></app-multi-select-columns>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div class="table-caption-btn-wrapper btn-wrapper">
|
<div class="table-caption-btn-wrapper btn-wrapper">
|
||||||
<button pButton label="{{'common.add' | translate}}" class="icon-btn btn"
|
<button pButton label="{{'common.add' | translate}}" class="icon-btn btn"
|
||||||
icon="pi pi-plus" (click)="addShortRoleName(dt)" [disabled]="isEditingNew || user?.isModerator && !user?.isAdmin">
|
icon="pi pi-plus" (click)="addShortRoleName(dt)"
|
||||||
|
[disabled]="isEditingNew || user?.isModerator && !user?.isAdmin">
|
||||||
</button>
|
</button>
|
||||||
<button pButton label="{{'common.reset_filters' | translate}}" icon="pi pi-undo"
|
<button pButton label="{{'common.reset_filters' | translate}}" icon="pi pi-undo"
|
||||||
class="icon-btn btn" (click)="resetFilters()">
|
class="icon-btn btn" (click)="resetFilters()">
|
||||||
@ -102,7 +105,8 @@
|
|||||||
</th>
|
</th>
|
||||||
<th hideable-th="position" [parent]="this">
|
<th hideable-th="position" [parent]="this">
|
||||||
<form [formGroup]="filterForm">
|
<form [formGroup]="filterForm">
|
||||||
<p-dropdown formControlName="position" [options]="positions" placeholder="{{'common.position' | translate}}"></p-dropdown>
|
<p-dropdown formControlName="position" [options]="positions"
|
||||||
|
placeholder="{{'common.position' | translate}}"></p-dropdown>
|
||||||
</form>
|
</form>
|
||||||
</th>
|
</th>
|
||||||
<th class="table-header-small-dropdown"></th>
|
<th class="table-header-small-dropdown"></th>
|
||||||
@ -158,7 +162,7 @@
|
|||||||
placeholder="{{'common.position' | translate}}"></p-dropdown>
|
placeholder="{{'common.position' | translate}}"></p-dropdown>
|
||||||
</ng-template>
|
</ng-template>
|
||||||
<ng-template pTemplate="output">
|
<ng-template pTemplate="output">
|
||||||
{{shortRoleName.position}}
|
{{ 'common.positions.' + shortRoleName.position | translate }}
|
||||||
</ng-template>
|
</ng-template>
|
||||||
</p-cellEditor>
|
</p-cellEditor>
|
||||||
</td>
|
</td>
|
||||||
@ -187,7 +191,8 @@
|
|||||||
</td>
|
</td>
|
||||||
<td>
|
<td>
|
||||||
<div class="btn-wrapper">
|
<div class="btn-wrapper">
|
||||||
<app-history-btn *ngIf="!isEditingNew" [id]="shortRoleName.id" [query]="query" translationKey="view.server.short_role_names.header"></app-history-btn>
|
<app-history-btn *ngIf="!isEditingNew" [id]="shortRoleName.id" [query]="query"
|
||||||
|
translationKey="view.server.short_role_names.header"></app-history-btn>
|
||||||
<button *ngIf="!editing" pButton pInitEditableRow class="btn icon-btn" icon="pi pi-pencil"
|
<button *ngIf="!editing" pButton pInitEditableRow class="btn icon-btn" icon="pi pi-pencil"
|
||||||
(click)="onRowEditInit(dt, shortRoleName, ri)"></button>
|
(click)="onRowEditInit(dt, shortRoleName, ri)"></button>
|
||||||
<button *ngIf="!editing" pButton class="btn icon-btn danger-icon-btn" icon="pi pi-trash"
|
<button *ngIf="!editing" pButton class="btn icon-btn danger-icon-btn" icon="pi pi-trash"
|
||||||
|
@ -102,7 +102,7 @@ export class ShortRoleNamesComponent extends ComponentWithTable implements OnIni
|
|||||||
if (data.shortRoleNamePositions) {
|
if (data.shortRoleNamePositions) {
|
||||||
this.positions = data.shortRoleNamePositions
|
this.positions = data.shortRoleNamePositions
|
||||||
.map(x => {
|
.map(x => {
|
||||||
return { label: x, value: x };
|
return { label: this.translate.instant(`common.positions.${x}`), value: x };
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
this.spinner.hideSpinner();
|
this.spinner.hideSpinner();
|
||||||
|
Loading…
Reference in New Issue
Block a user