Add publication edition form.

This commit is contained in:
Florian THIERRY
2024-08-04 15:54:00 +02:00
parent 42c4f76c0d
commit 32ab1d79c8
10 changed files with 4040 additions and 1978 deletions
@@ -0,0 +1,63 @@
@if ((isLoading$ | async) == true) {
<mat-spinner></mat-spinner>
}
@else {
<!-- <ng-template #afterLoadingPart> -->
@if (publication) {
<form [formGroup]="publicationEditionForm" (submit)="save()" ngNativeValidate>
<header>
<h1>Modification de l'article {{ publication.title }}</h1>
</header>
<mat-tab-group dynamicHeight>
<mat-tab label="Edition">
<div class="form-content">
<mat-form-field class="example-form-field">
<mat-label>Title</mat-label>
<input matInput type="text" formControlName="title" />
</mat-form-field>
<mat-form-field class="example-form-field">
<mat-label>Picture</mat-label>
<input matInput type="text" formControlName="illustrationId" />
</mat-form-field>
<mat-form-field class="example-form-field">
<mat-label>Description</mat-label>
<input matInput type="text" formControlName="description" />
</mat-form-field>
<mat-form-field class="example-form-field">
<mat-label>Content</mat-label>
<textarea matInput formControlName="text"></textarea>
</mat-form-field>
</div>
</mat-tab>
<mat-tab label="Previewing">
</mat-tab>
</mat-tab-group>
<footer>
<button type="submit">
Save
</button>
<button type="button" class="secondary" (click)="goPreviousLocation()">
Cancel
</button>
</footer>
</form>
}
@else {
<div class="loading-failed">
<h1>Publication failed to load...</h1>
</div>
}
<!-- <ng-template #loadingFailedMessage>
</ng-template> -->
<!-- </ng-template> -->
}