Use i18n for public components

pull/46/head
HardiReady 2018-10-02 12:28:14 +02:00
parent 6b43057328
commit 6259fdd766
2 changed files with 10 additions and 7 deletions

View File

@ -1,5 +1,5 @@
<div class="decoration-overview-container"> <div class="decoration-overview-container">
<h1>Übersicht über alle Auszeichnungen</h1> <h1>{{'public.decorations.headline' | translate}}</h1>
<div class="fraction-side-bar"> <div class="fraction-side-bar">
<div [ngClass]="{active: active === 'BLUFOR'}" (click)="switchFraction('BLUFOR')">{{fraction.BLUFOR}}</div> <div [ngClass]="{active: active === 'BLUFOR'}" (click)="switchFraction('BLUFOR')">{{fraction.BLUFOR}}</div>
@ -8,7 +8,7 @@
</div> </div>
<mat-tab-group [selectedIndex]="selectedType" (selectedIndexChange)="switchTab($event)"> <mat-tab-group [selectedIndex]="selectedType" (selectedIndexChange)="switchTab($event)">
<mat-tab label="Orden"> <mat-tab label="{{'public.decorations.medal' | translate}}">
<ng-template matTabContent> <ng-template matTabContent>
<cc-decoration-panel *ngFor="let decoration of medals" <cc-decoration-panel *ngFor="let decoration of medals"
[decoration]="decoration" [decoration]="decoration"
@ -16,7 +16,7 @@
</cc-decoration-panel> </cc-decoration-panel>
</ng-template> </ng-template>
</mat-tab> </mat-tab>
<mat-tab label="Ordensbänder"> <mat-tab label="{{'public.decorations.ribbons' | translate}}">
<ng-template matTabContent> <ng-template matTabContent>
<cc-decoration-panel *ngFor="let decoration of ribbons" <cc-decoration-panel *ngFor="let decoration of ribbons"
[decoration]="decoration" [decoration]="decoration"

View File

@ -6,13 +6,16 @@
</div> </div>
<div *ngIf="data.decoration"> <div *ngIf="data.decoration">
<img src="resource/decoration/{{data.decoration._id}}.png" <img class="pull-left"
height="{{data.decoration.isMedal ? 65 : 32}}" src="resource/decoration/{{data.decoration._id}}.png"
style="float:left;"> height="{{data.decoration.isMedal ? 65 : 32}}">
<h4 style="text-align: center;" <h4 style="text-align: center;"
[style.height]="data.decoration.isMedal ? '65px' : 'inherit'" [style.height]="data.decoration.isMedal ? '65px' : 'inherit'"
[style.padding-top]="data.decoration.isMedal ? '20px' : 'inherit'"> [style.padding-top]="data.decoration.isMedal ? '20px' : 'inherit'">
{{'public.list.users.headline' | translate}} {{data.decoration.isMedal ? 'Orden' : 'Ordensband'}} : {{data.decoration.name}} {{'public.list.users.headline' | translate}}
<span *ngIf="data.decoration.isMedal">{{'public.list.user.decorations.medal' | translate}}</span>
<span *ngIf="!data.decoration.isMedal">{{'public.list.user.decorations.ribbon' | translate}}</span>
{{data.decoration.name}}
</h4> </h4>
</div> </div>