restructuration des fichiers (pour pouvoir passer plus facilement plusieurs fronts)

This commit is contained in:
MiharyR 2021-11-11 17:02:27 +01:00
parent 48fb0845f1
commit ef5dd96747
86 changed files with 1343 additions and 335 deletions

View file

@ -0,0 +1,126 @@
<div [class]="themeService.getClassTheme()">
<div class="myContainer">
<app-navbar-advertiser></app-navbar-advertiser><br><br>
<!-- ---------------------------------------------------------------------------------- -->
<div style="text-align: center">
<input (keyup)="applyFilter($event)" placeholder="Filtre...">
</div>
<br>
<!-- ---------------------------------------------------------------------------------- -->
<button mat-button class="btnAjouter" (click)="onAdd()">
<mat-icon>add_circle</mat-icon> Ajouter une annonce
</button>
<br>
<!-- ---------------------------------------------------------------------------------- -->
<table mat-table [dataSource]="dataSource" matSort class="mat-elevation-z8">
<!-- Name Column -->
<ng-container matColumnDef="title">
<th mat-header-cell *matHeaderCellDef mat-sort-header> Titre </th>
<td mat-cell *matCellDef="let advert">
{{advert.title}}
</td>
</ng-container>
<!-- Tags Column -->
<ng-container matColumnDef="tags">
<th mat-header-cell *matHeaderCellDef mat-sort-header> Tags </th>
<td mat-cell *matCellDef="let advert">
<span *ngFor="let tag of advert.tags; let isLast = last;">
<span *ngIf="!isLast"> {{tag}}, </span>
<span *ngIf="isLast"> {{tag}} </span>
</span>
</td>
</ng-container>
<!-- Comment Column -->
<ng-container matColumnDef="comment">
<th mat-header-cell *matHeaderCellDef mat-sort-header> Commentaire </th>
<td mat-cell *matCellDef="let advert">
{{advert.comment}}
</td>
</ng-container>
<!-- CreatedAt Column -->
<ng-container matColumnDef="createdAt">
<th mat-header-cell *matHeaderCellDef mat-sort-header> Date de création </th>
<td mat-cell *matCellDef="let advert">
{{ advert.createdAt | date:'dd/LL/YYYY à HH:mm:ss' }}
</td>
</ng-container>
<!-- LastUpdate Column -->
<ng-container matColumnDef="lastUpdate">
<th mat-header-cell *matHeaderCellDef mat-sort-header> Dernière modification </th>
<td mat-cell *matCellDef="let advert">
{{ advert.lastUpdate | date:'dd/LL/YYYY à HH:mm:ss' }}
</td>
</ng-container>
<!-- Views Column -->
<ng-container matColumnDef="views">
<th mat-header-cell *matHeaderCellDef mat-sort-header> Vues </th>
<td mat-cell *matCellDef="let advert">
{{advert.views}}
</td>
</ng-container>
<!-- IsVisible Column -->
<ng-container matColumnDef="isVisible">
<th mat-header-cell *matHeaderCellDef mat-sort-header> Visible </th>
<td mat-cell *matCellDef="let advert">
<span *ngIf="advert.isVisible"> <mat-icon>check</mat-icon> </span>
<span *ngIf="!advert.isVisible"></span>
</td>
</ng-container>
<!-- Update Column -->
<ng-container matColumnDef="update">
<th mat-header-cell *matHeaderCellDef mat-sort-header> Modifier </th>
<td mat-cell *matCellDef="let advert">
<button mat-icon-button (click)="onUpdate(advert)">
<mat-icon>settings</mat-icon>
</button>
</td>
</ng-container>
<!-- Delete Column -->
<ng-container matColumnDef="delete">
<th mat-header-cell *matHeaderCellDef mat-sort-header> Supprimer </th>
<td mat-cell *matCellDef="let advert">
<button mat-icon-button (click)="onDelete(advert)">
<mat-icon>delete</mat-icon>
</button>
</td>
</ng-container>
<!-- Visualisation Column -->
<ng-container matColumnDef="visualisation">
<th mat-header-cell *matHeaderCellDef mat-sort-header> Visualisation </th>
<td mat-cell *matCellDef="let advert">
<button mat-icon-button (click)="onVisualize(advert)">
<mat-icon>aspect_ratio</mat-icon>
</button>
</td>
</ng-container>
<!-- Directives -->
<tr mat-header-row *matHeaderRowDef="displayedColumns"></tr>
<tr mat-row *matRowDef="let row; columns: displayedColumns;"></tr>
<tr class="mat-row" *matNoDataRow>
<td class="mat-cell" colspan="4"> Aucune vidéo ne correspond au filtre: "{{input.value}}" </td>
</tr>
</table>
<br><br>
</div>
</div>