54472: Create community/collection with parent community + error messages

This commit is contained in:
Kristof De Langhe
2018-08-20 16:09:42 +02:00
parent 2a01838941
commit dfa42acab5
8 changed files with 103 additions and 25 deletions

View File

@@ -1,8 +1,15 @@
<div class="container">
<div class="row">
<div class="col-12 pb-4">
<h2 id="header" class="border-bottom pb-2">{{ 'collection.create.head' | translate }}</h2>
<ng-container *ngVar="(communityRDObs | async).payload as community">
<h2 *ngIf="!community" id="header" class="border-bottom pb-2">{{ 'collection.create.head' | translate }}</h2>
<h2 *ngIf="community" id="sub-header" class="border-bottom pb-2">{{ 'collection.create.sub-head' | translate:{ parent: community.name } }}</h2>
</ng-container>
</div>
</div>
<div *ngIf="(error$ | async) as error" class="alert alert-danger">
<strong>{{error.statusCode}}</strong>
<p class="mb-0">{{error.errorMessage}}</p>
</div>
<ds-collection-form (submitted)="onSubmit($event)"></ds-collection-form>
</div>