opt-cc/static/src/app/statistic/war/scoreboard/scoreboard.component.html

74 lines
3.4 KiB
HTML

<div class="fade-in" style="overflow-x: auto">
<table mat-table [dataSource]="rows" class="mat-elevation-z8">
<ng-container matColumnDef="{{tableHead[0].prop}}">
<th mat-header-cell *matHeaderCellDef> {{tableHead[0].head}} </th>
<td mat-cell *matCellDef="let element"
[style.color]="element['fraction'] === 'BLUFOR' ? fraction.COLOR_BLUFOR : fraction.COLOR_OPFOR">
{{element.name}}
</td>
</ng-container>
<ng-container matColumnDef="{{tableHead[1].prop}}">
<th mat-header-cell *matHeaderCellDef> {{tableHead[1].head}} </th>
<td mat-cell *matCellDef="let element"> {{element.fraction}} </td>
</ng-container>
<ng-container *ngFor="let column of tableHead.slice(2, tableHead.length)" matColumnDef="{{column.prop}}">
<th mat-header-cell *matHeaderCellDef> <img src="../../../../assets/scoreboard/{{column.prop}}.png" alt="{{column.head}}"> </th>
<td mat-cell *matCellDef="let element"> {{element[column.prop]}} </td>
</ng-container>
<tr mat-header-row *matHeaderRowDef="displayedColumns"></tr>
<tr mat-row *matRowDef="let row; columns: displayedColumns;"></tr>
</table>
<!--<ngx-datatable-->
<!--[rows]="rows"-->
<!--[sorts]="[{prop: 'kill', dir: 'desc'}]"-->
<!--[reorderable]="reorderable"-->
<!--[messages]="{emptyMessage: 'Loading...'}"-->
<!--[headerHeight]="cellHeight"-->
<!--[rowHeight]="cellHeight"-->
<!--[cssClasses]='customClasses'-->
<!--[columnMode]="'force'"-->
<!--[scrollbarV]="true"-->
<!--[selectionType]="'single'">-->
<!--<ngx-datatable-column name="{{tableHead[0].head}}" prop="name" [width]="210" style="padding-left:10px">-->
<!--<ng-template ngx-datatable-cell-template let-row="row" let-value="value">-->
<!--<span class="player-name"-->
<!--[style.color]="row['fraction'] === 'BLUFOR' ? fraction.COLOR_BLUFOR : fraction.COLOR_OPFOR">-->
<!--{{value}}-->
<!--</span>-->
<!--</ng-template>-->
<!--</ngx-datatable-column>-->
<!--<ngx-datatable-column name="{{tableHead[1].head}}" prop="fraction" [width]="90">-->
<!--<ng-template ngx-datatable-cell-template let-value="value">-->
<!--{{value === 'BLUFOR' ? fraction.BLUFOR : fraction.OPFOR}}-->
<!--</ng-template>-->
<!--</ngx-datatable-column>-->
<!--<div *ngFor="let column of tableHead.slice(2, tableHead.length) ">-->
<!--<ngx-datatable-column [width]="columnWidth" prop="{{column.prop}}">-->
<!--<ng-template ngx-datatable-header-template let-sort="sortFn">-->
<!--<span class="datatable-header-cell-wrapper">-->
<!--<span class="datatable-header-cell-label text-truncate" title="{{column.head}}" (click)="sort()">-->
<!--<img src="../../../../assets/scoreboard/{{column.prop}}.png" alt="{{column.head}}">-->
<!--</span>-->
<!--</span>-->
<!--</ng-template>-->
<!--</ngx-datatable-column>-->
<!--</div>-->
<!--<ngx-datatable-column [width]="80">-->
<!--<ng-template ngx-datatable-cell-template let-row="row">-->
<!--<span class="btn btn-sm btn-default in-table-btn"-->
<!--(click)="selectPlayerDetail(1, isSteamUUID(row['steamUUID']) ? row['steamUUID'] : row['name'])">-->
<!--Gesamt-->
<!--</span>-->
<!--</ng-template>-->
<!--</ngx-datatable-column>-->
<!--</ngx-datatable>-->
</div>