Add check for communityId = '' in community.component.ts and hide subscribe in community.component.html
git-svn-id: https://svn.driver.research-infrastructures.eu/driver/dnet40/modules/uoa-connect-portal/trunk@51296 d315682c-612b-4755-9ff5-7f18f6832af3
This commit is contained in:
parent
db9ae6b5f4
commit
5d38eb892b
|
@ -3,8 +3,10 @@
|
||||||
<div class="uk-container uk-margin-bottom">
|
<div class="uk-container uk-margin-bottom">
|
||||||
|
|
||||||
<article class="uk-article ">
|
<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"> No community chosen </div>
|
<div *ngIf="communityId == null || communityId == ''" 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">
|
||||||
<subscribe *ngIf="communityId != null" [communityId]="communityId" class=" uk-align-right"></subscribe>
|
No community chosen
|
||||||
|
</div>
|
||||||
|
<subscribe *ngIf="communityId != null && communityId != ''" [communityId]="communityId" class=" uk-align-right"></subscribe>
|
||||||
<div *ngIf="communityId != null && communityId != '' && community != null">
|
<div *ngIf="communityId != null && communityId != '' && community != null">
|
||||||
<blockquote>
|
<blockquote>
|
||||||
<div *ngIf="community.title != null">
|
<div *ngIf="community.title != null">
|
||||||
|
@ -33,7 +35,7 @@
|
||||||
</p>
|
</p>
|
||||||
|
|
||||||
</div>
|
</div>
|
||||||
<div *ngIf="communityId != null && communityId != '' " 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 && communityId != ''" 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-first-column">
|
||||||
<div class="uk-card uk-card-default uk-card-small uk-card-body">
|
<div class="uk-card uk-card-default uk-card-small uk-card-body">
|
||||||
<div *ngIf="publicationTotal != null">
|
<div *ngIf="publicationTotal != null">
|
||||||
|
@ -84,7 +86,7 @@
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div *ngIf="communityId != null && communityId != '' " class="uk-grid-small uk-margin-medium uk-grid" uk-grid="">
|
<div *ngIf="communityId != null && communityId != ''" class="uk-grid-small uk-margin-medium uk-grid" uk-grid="">
|
||||||
<div class="uk-width-expand@m uk-first-column">
|
<div class="uk-width-expand@m uk-first-column">
|
||||||
<h3 class="uk-margin-small uk-h3 uk-heading-line uk-text-primary">
|
<h3 class="uk-margin-small uk-h3 uk-heading-line uk-text-primary">
|
||||||
<span>Most recent publications</span>
|
<span>Most recent publications</span>
|
||||||
|
|
|
@ -75,7 +75,7 @@ export class CommunityComponent {
|
||||||
this.communityId = communityId['communityId'];
|
this.communityId = communityId['communityId'];
|
||||||
});
|
});
|
||||||
|
|
||||||
if (this.communityId != null) {
|
if (this.communityId != null && this.communityId != '') {
|
||||||
this._communityService.getCommunity(this.properties.communityAPI+this.communityId).subscribe (
|
this._communityService.getCommunity(this.properties.communityAPI+this.communityId).subscribe (
|
||||||
community => {
|
community => {
|
||||||
this.community = community;
|
this.community = community;
|
||||||
|
|
Loading…
Reference in New Issue