Added editing categories (Fixes #6)
This commit is contained in:
@ -1,11 +1,11 @@
|
||||
<div class="container-fluid" style="background-color: #53709f;">
|
||||
<div class="container">
|
||||
<div class="row py-5">
|
||||
<div class="ml-auto mr-3 mb-3">
|
||||
<button *ngIf="app.user" mat-raised-button (click)="create()">
|
||||
<div *ngIf="app.user" class="ml-auto mr-3 mb-3">
|
||||
<button mat-raised-button (click)="create()">
|
||||
<mat-icon>playlist_add</mat-icon> Category
|
||||
</button>
|
||||
<button *ngIf="app.user" mat-raised-button class="ml-3">
|
||||
<button mat-raised-button class="ml-3">
|
||||
<mat-icon>note_add</mat-icon> Item
|
||||
</button>
|
||||
</div>
|
||||
@ -17,12 +17,22 @@
|
||||
</ol>
|
||||
</nav>
|
||||
<ng-container *ngFor="let c of categories | async">
|
||||
<mat-card class="m-3" (click)="navigate(c.name)">
|
||||
<img *ngIf="c.image" mat-card-image [src]="c.image" [alt]="c.name" style="width: 200px; height: 200px;">
|
||||
<mat-divider *ngIf="c.image" class="custom-line"></mat-divider>
|
||||
<mat-card-content>
|
||||
<h5>{{c.name}}</h5>
|
||||
</mat-card-content>
|
||||
<mat-card class="m-3">
|
||||
<div (click)="navigate(c.name)">
|
||||
<img *ngIf="c.image" mat-card-image [src]="c.image" [alt]="c.name" style="width: 200px; height: 200px;">
|
||||
<mat-divider *ngIf="c.image" class="custom-line"></mat-divider>
|
||||
<mat-card-content>
|
||||
<h5>{{c.name}}</h5>
|
||||
</mat-card-content>
|
||||
</div>
|
||||
<mat-card-actions *ngIf="app.user">
|
||||
<button mat-raised-button (click)="create(c)">
|
||||
<mat-icon>edit</mat-icon>
|
||||
</button>
|
||||
<button mat-raised-button class="ml-3">
|
||||
<mat-icon>delete</mat-icon>
|
||||
</button>
|
||||
</mat-card-actions>
|
||||
</mat-card>
|
||||
</ng-container>
|
||||
</div>
|
||||
|
Reference in New Issue
Block a user