Add check if communityId is null in component.ts and in html and Add error message
git-svn-id: https://svn.driver.research-infrastructures.eu/driver/dnet40/modules/uoa-connect-portal/trunk@51278 d315682c-612b-4755-9ff5-7f18f6832af3
This commit is contained in:
parent
2e8e71691b
commit
6a2feeea02
|
@ -3,7 +3,7 @@
|
|||
<div class="uk-container uk-margin-bottom">
|
||||
|
||||
<article class="uk-article ">
|
||||
|
||||
<div *ngIf="communityId == null" class="uk-child-width-1-6@l uk-child-width-1-6@m uk-child-width-1-3@s uk-text-center uk-alert uk-alert-primary"> Empty community id </div>
|
||||
<subscribe *ngIf="communityId != null" [communityId]="communityId" class=" uk-align-right"></subscribe>
|
||||
<div *ngIf="communityId != null && community != null">
|
||||
<blockquote>
|
||||
|
@ -33,7 +33,7 @@
|
|||
</p>
|
||||
|
||||
</div>
|
||||
<div class="uk-child-width-1-6@l uk-child-width-1-6@m uk-child-width-1-3@s uk-text-center uk-grid" uk-grid="">
|
||||
<div *ngIf="communityId != null" class="uk-child-width-1-6@l uk-child-width-1-6@m uk-child-width-1-3@s uk-text-center uk-grid" uk-grid="">
|
||||
<div class="uk-first-column">
|
||||
<div class="uk-card uk-card-default uk-card-small uk-card-body">
|
||||
<div *ngIf="publicationTotal != null">
|
||||
|
@ -84,7 +84,7 @@
|
|||
</div>
|
||||
</div>
|
||||
|
||||
<div class="uk-grid-small uk-margin-medium uk-grid" uk-grid="">
|
||||
<div *ngIf="communityId != null" class="uk-grid-small uk-margin-medium uk-grid" uk-grid="">
|
||||
<div class="uk-width-expand@m uk-first-column">
|
||||
<h3 class="uk-margin-small uk-h3 uk-heading-line uk-text-primary">
|
||||
<span>Most recent publications</span>
|
||||
|
|
|
@ -75,6 +75,7 @@ export class CommunityComponent {
|
|||
this.communityId = communityId['communityId'];
|
||||
});
|
||||
|
||||
if (this.communityId != null) {
|
||||
this._communityService.getCommunity(this.properties.communityAPI+this.communityId).subscribe (
|
||||
community => {
|
||||
this.community = community;
|
||||
|
@ -137,6 +138,7 @@ export class CommunityComponent {
|
|||
softwareResults => {
|
||||
this.softwareResults = softwareResults;
|
||||
});
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue