Skip to content
Snippets Groups Projects
parameters-administration.component.html 3 KiB
Newer Older
  • Learn to ignore specific revisions
  • <div class="page-header">
    
        <h1>{{lang.administration}} {{lang.parameters}}
    
            <small>{{parameters.length}} {{lang.parameters}}</small>
    
        </h1>
    
    Alex ORLUC's avatar
    Alex ORLUC committed
    </div>
    <div *ngIf="loading">
    
        <mat-spinner style="margin:auto;"></mat-spinner>
    
    Alex ORLUC's avatar
    Alex ORLUC committed
    </div>
    <div *ngIf="!loading" class="container-fluid">
    
        <div class="row">
            <div class="col-md-2 col-xs-2">
                <button color="default" mat-mini-fab routerLink='/administration' matTooltip="{{lang.back}}" class="enableAtionTopLeftSmarpthone">
                    <mat-icon class="fa fa-chevron-left"></mat-icon>
                </button>
            </div>
            <div class="col-md-6 col-xs-6">
                <mat-form-field>
                    <input matInput (keyup)="applyFilter($event.target.value)" placeholder="{{lang.filterBy}}">
                </mat-form-field>
            </div>
            <div class="col-md-4 col-xs-4">
                <mat-paginator #paginator [length]="100" [pageSize]="10" [pageSizeOptions]="[10, 25, 50, 100]">
                </mat-paginator>
    
            </div>
    
    Alex ORLUC's avatar
    Alex ORLUC committed
        </div>
    
        <mat-table #table [dataSource]="dataSource" matSort matSortActive="id" matSortDirection="asc">
            <ng-container matColumnDef="id">
                <mat-header-cell *matHeaderCellDef mat-sort-header>{{lang.id}}</mat-header-cell>
                <mat-cell *matCellDef="let element"> {{element.id}} </mat-cell>
            </ng-container>
            <ng-container matColumnDef="description">
                <mat-header-cell *matHeaderCellDef mat-sort-header>{{lang.description}}</mat-header-cell>
                <mat-cell *matCellDef="let element"> {{element.description}} </mat-cell>
            </ng-container>
            <ng-container matColumnDef="value">
                <mat-header-cell *matHeaderCellDef mat-sort-header>{{lang.value}}</mat-header-cell>
                <mat-cell *matCellDef="let element"> {{element.value}} </mat-cell>
            </ng-container>
            <ng-container matColumnDef="actions">
                <mat-header-cell *matHeaderCellDef style="text-align: right;padding: 10px">
                    <button mat-mini-fab color="accent" class="enableAtionTopRightSmarpthone" matTooltip="{{lang.add}}" routerLink="/administration/parameters/new">
                        <mat-icon class="fa fa-plus" aria-hidden="true"></mat-icon>
                    </button>
                </mat-header-cell>
                <mat-cell *matCellDef="let element" style="text-align:right">
                    <button mat-icon-button color="primary" matTooltip="{{lang.update}}" routerLink="/administration/parameters/{{element.id}}">
                        <mat-icon class="fa fa-edit fa-2x" aria-hidden="true"></mat-icon>
                    </button>
                    <button mat-icon-button color="warn" matTooltip="{{lang.delete}}" (click)="deleteParameter(element.id)">
                        <mat-icon class="fa fa-trash fa-2x" aria-hidden="true"></mat-icon>
                    </button>
                </mat-cell>
            </ng-container>
            <mat-header-row *matHeaderRowDef="displayedColumns"></mat-header-row>
            <mat-row *matRowDef="let row; columns: displayedColumns;"></mat-row>
        </mat-table>
    
    Alex ORLUC's avatar
    Alex ORLUC committed
    </div>