Add button to edit publications on publication view page.
This commit is contained in:
@@ -1,14 +1,17 @@
|
||||
<ng-container *ngIf="isLoading; else afterLoadingPart">
|
||||
@if (isLoading) {
|
||||
<mat-spinner></mat-spinner>
|
||||
</ng-container>
|
||||
|
||||
<ng-template #afterLoadingPart>
|
||||
<ng-container *ngIf="publication; else loadingFailedMessage">
|
||||
} @else {
|
||||
@if (publication) {
|
||||
<div class="card">
|
||||
<img src="/pictures/{{ publication.illustrationId }}" />
|
||||
<header>
|
||||
<h1>{{ publication.title }}</h1>
|
||||
<h2>{{ publication.description }}</h2>
|
||||
@if (isAuthorAndUserEquals) {
|
||||
<a [routerLink]="['edit']" class="button action" matTooltip="Click to edit the publication">
|
||||
<mat-icon>edit</mat-icon>
|
||||
</a>
|
||||
}
|
||||
</header>
|
||||
<main [innerHTML]="publication.parsedText"></main>
|
||||
<footer>
|
||||
@@ -19,11 +22,9 @@
|
||||
</span>
|
||||
</footer>
|
||||
</div>
|
||||
</ng-container>
|
||||
|
||||
<ng-template #loadingFailedMessage>
|
||||
} @else {
|
||||
<div class="loading-failed">
|
||||
<h1>Publication failed to load...</h1>
|
||||
</div>
|
||||
</ng-template>
|
||||
</ng-template>
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user