[Admin]: Fix bug when you just logged in and no commutnities appeared on wellcome page. Add mining profiles order by date on mining tool

git-svn-id: https://svn.driver.research-infrastructures.eu/driver/dnet40/modules/uoa-admin-portal/trunk@57020 d315682c-612b-4755-9ff5-7f18f6832af3
This commit is contained in:
k.triantafyllou 2019-09-10 12:27:29 +00:00
parent be434dc75f
commit 07b827f6e9
2 changed files with 41 additions and 34 deletions

Binary file not shown.

View File

@ -15,33 +15,36 @@ import {HelperFunctions} from '../../openaireLibrary/utils/HelperFunctions.class
uk-scrollspy="{"target":"[uk-scrollspy-class]","cls":"uk-animation-fade","delay":false}"
tm-header-transparent="light" tm-header-transparent-placeholder=""
uk-height-viewport="offset-top: true">
<div *ngIf="communities.length == 0" class="uk-container uk-container-large uk-section uk-margin-large-top">
<div class="uk-width-1-2@m uk-width-1-1@s">
<div class="uk-h1">Build an Open Research <b>Gateway</b> for your <b>Community</b></div>
<h4 class="uk-margin-remove-top">Turn Open Science into practice</h4>
<div class="uk-h5 uk-margin-top">Share and link your research results.<br>
Across organizations, across borders.<br>Customized to your needs.
<div class="uk-container uk-container-large uk-section">
<div *ngIf="showLoading" class="uk-animation-fade uk-margin-top uk-width-1-1" role="alert"><span>
class="loading-gif uk-align-center"></span></div>
<div *ngIf="communities.length == 0 && !showLoading" class="uk-container uk-container-large uk-section uk-margin-top">
<div class="uk-width-1-2@m uk-width-1-1@s">
<div class="uk-h1">Build an Open Research <b>Gateway</b> for your <b>Community</b></div>
<h4 class="uk-margin-remove-top">Turn Open Science into practice</h4>
<div class="uk-h5 uk-margin-top">Share and link your research results.<br>
Across organizations, across borders.<br>Customized to your needs.
</div>
</div>
<div class="uk-width-1-1 uk-inline uk-margin-large-top uk-margin-large-bottom">
<a class="uk-button portal-button" href="https://beta.connect.openaire.eu/about"> LEARN
HOW</a>
</div>
</div>
<div class="uk-width-1-1 uk-inline uk-margin-large-top uk-margin-large-bottom">
<a class="uk-button portal-button" href="https://beta.connect.openaire.eu/about"> LEARN
HOW</a>
</div>
</div>
<div *ngIf="communities.length > 0" class="uk-container uk-container-large uk-section">
<div class="uk-container">
<div class="uk-grid-match uk-grid-small uk-child-width-1-4@m uk-child-width-1-2@s uk-child-width-1-1@xs
<div *ngIf="communities.length > 0 && !showLoading" class="uk-container uk-container-large uk-section-small">
<div class="uk-container">
<div class="uk-grid-match uk-grid-small uk-child-width-1-4@m uk-child-width-1-2@s uk-child-width-1-1@xs
uk-text-center uk-margin-large-top" uk-grid uk-height-match="div > div > .uk-card-media-top">
<div *ngFor="let community of communities;">
<div class="uk-padding-small uk-card uk-card-small uk-card-default communityCard">
<div class="uk-container uk-text-small" *ngIf="community">
<div class="uk-card-media-top uk-padding uk-padding-remove-vertical target uk-flex uk-flex-center uk-flex-middle">
<a [queryParams]="{communityId: community.communityId}" routerLinkActive="router-link-active"
routerLink="/dashboard">
<div>
<img *ngIf="community.logoUrl != null && community.logoUrl != '' " src="{{community.logoUrl}}"
alt="{{(community.title)?community.title:community.shortTitle}} logo">
<span *ngIf="community.logoUrl == null || community.logoUrl == '' " class="uk-icon">
<div *ngFor="let community of communities;">
<div class="uk-padding-small uk-card uk-card-small uk-card-default communityCard">
<div class="uk-container uk-text-small" *ngIf="community">
<div class="uk-card-media-top uk-padding uk-padding-remove-vertical target uk-flex uk-flex-center uk-flex-middle">
<a [queryParams]="{communityId: community.communityId}" routerLinkActive="router-link-active"
routerLink="/dashboard">
<div>
<img *ngIf="community.logoUrl != null && community.logoUrl != '' " src="{{community.logoUrl}}"
alt="{{(community.title)?community.title:community.shortTitle}} logo">
<span *ngIf="community.logoUrl == null || community.logoUrl == '' " class="uk-icon">
<svg viewBox="0 0 20 20" xmlns="http://www.w3.org/2000/svg" ratio="2.5"> <circle fill="none"
stroke="#000"
stroke-width="1.1"
@ -54,21 +57,22 @@ import {HelperFunctions} from '../../openaireLibrary/utils/HelperFunctions.class
stroke-width="1.1"
d="M11.4,4 C12.8,2.4 15.4,2.8 16.3,4.7 C17.2,6.6 15.7,8.9 13.6,8.9 C16.5,8.9 18.8,11.3 19.2,14.1"></path></svg>
</span>
</div>
</a>
</div>
<div class="uk-card-body uk-padding-remove-horizontal uk-padding-remove-top uk-margin-small-top target">
<a [queryParams]="{communityId: community.communityId}" routerLinkActive="router-link-active"
routerLink="/dashboard">
<div class="uk-text-center uk-text-bold">
</div>
</a>
</div>
<div class="uk-card-body uk-padding-remove-horizontal uk-padding-remove-top uk-margin-small-top target">
<a [queryParams]="{communityId: community.communityId}" routerLinkActive="router-link-active"
routerLink="/dashboard">
<div class="uk-text-center uk-text-bold">
<span class="uk-text-small uk-margin-small" *ngIf="community.title">
{{community.title}}
</span>
<span class="uk-text-small uk-margin-small" *ngIf="!community.title && community.shortTitle">
<span class="uk-text-small uk-margin-small" *ngIf="!community.title && community.shortTitle">
{{community.shortTitle}}
</span>
</div>
</a>
</div>
</a>
</div>
</div>
</div>
</div>
@ -83,11 +87,13 @@ import {HelperFunctions} from '../../openaireLibrary/utils/HelperFunctions.class
export class WellcomeComponent implements OnInit {
properties: EnvProperties = null;
public communities: CommunityInfo[] = [];
showLoading: boolean;
constructor(private route: ActivatedRoute, private propertiesService: EnvironmentSpecificService, private _communitiesService: CommunitiesService) {
}
ngOnInit() {
this.showLoading = true;
this.propertiesService.loadEnvironment().then(es => {
this.propertiesService.setEnvProperties(es);
this.properties = this.propertiesService.envSpecific;
@ -116,6 +122,7 @@ export class WellcomeComponent implements OnInit {
}
}
}
this.showLoading = false;
});
});
}