[Trunk|Connect]: Curators page has created.
git-svn-id: https://svn.driver.research-infrastructures.eu/driver/dnet40/modules/uoa-connect-portal/trunk@56018 d315682c-612b-4755-9ff5-7f18f6832af3
This commit is contained in:
parent
762c5cd506
commit
06ff12bafa
|
@ -14,6 +14,7 @@ const routes: Routes = [
|
|||
{ path: 'about', loadChildren: './htmlPages/about/aboutPage.module#AboutPageModule', resolve: { envSpecific: EnvironmentSpecificResolver }},
|
||||
{ path: 'content', loadChildren: './content/contentPage.module#ContentPageModule', resolve: { envSpecific: EnvironmentSpecificResolver }},
|
||||
{ path: 'organizations', loadChildren: './htmlPages/organizations/organizationsPage.module#OrganizationsPageModule', resolve: { envSpecific: EnvironmentSpecificResolver }},
|
||||
{ path: 'curators', loadChildren: './curators/curators.module#CuratorsModule', resolve: { envSpecific: EnvironmentSpecificResolver }},
|
||||
{ path: 'monitor', loadChildren: './statistics/statistics.module#StatisticsModule', resolve: { envSpecific: EnvironmentSpecificResolver }},
|
||||
{ path: 'search/publication', loadChildren: './landingPages/publication/libPublication.module#LibPublicationModule', resolve: { envSpecific: EnvironmentSpecificResolver }},
|
||||
{ path: 'search/dataset', loadChildren: './landingPages/dataset/libDataset.module#LibDatasetModule', resolve: { envSpecific: EnvironmentSpecificResolver }},
|
||||
|
|
|
@ -60,7 +60,7 @@
|
|||
<re-captcha #recaptcha (resolved)="handleRecaptcha($event)" [(siteKey)]="properties.reCaptchaSiteKey" required></re-captcha>
|
||||
</div>
|
||||
<div class="uk-width-1-1 uk-text-right">
|
||||
<button class="uk-button uk-button-default uk-margin-auto-top" (click)="reset()">Reset</button>
|
||||
<button class="uk-button uk-button-default uk-margin-small-right" (click)="reset()">Reset</button>
|
||||
<button class="uk-button portal-button" (click)="send()">Send</button>
|
||||
</div>
|
||||
</div>
|
||||
|
|
|
@ -0,0 +1,13 @@
|
|||
import { NgModule} from '@angular/core';
|
||||
import { RouterModule } from '@angular/router';
|
||||
import {CuratorsComponent} from "./curators.component";
|
||||
|
||||
@NgModule({
|
||||
imports: [
|
||||
RouterModule.forChild([
|
||||
{ path: '', component: CuratorsComponent}
|
||||
])
|
||||
]
|
||||
})
|
||||
export class CuratorsRoutingModule {
|
||||
}
|
|
@ -0,0 +1,161 @@
|
|||
<ng-container *ngIf="main else child">
|
||||
<div *ngIf="showLoading" class="uk-margin-large">
|
||||
<div class="uk-animation-fade uk-margin-top uk-width-1-1" role="alert"><span class="loading-gif uk-align-center" ></span></div>
|
||||
</div>
|
||||
<div *ngIf="!showLoading" class="image-front-topbar uk-section-default uk-position-relative" uk-scrollspy="{"target":"[uk-scrollspy-class]","cls":"uk-animation-fade","delay":false}" tm-header-transparent="light">
|
||||
<div style=" min-height: 650px;" class="uk-section uk-padding-remove-bottom uk-flex uk-flex-middle">
|
||||
<div class="uk-margin-top uk-align-center">
|
||||
<div class="uk-section uk-section-small">
|
||||
<div class="uk-container uk-container-small">
|
||||
<div *ngIf="curators.length > 0">
|
||||
<h4 class="uk-margin-auto-top uk-h4">
|
||||
<span class="uk-text-bold">Curators</span>
|
||||
<span> ({{curators.length}})</span>
|
||||
</h4>
|
||||
<div *ngFor="let curator of curators" class="uk-width-1-1 uk-card uk-card-default uk-card-body uk-margin-top uk-height-max-large uk-overflow-auto">
|
||||
<div [class]="(curator.affiliations.length <= 2)?'uk-grid-divider':''" uk-grid>
|
||||
<div class="uk-width-1-2 uk-first-column">
|
||||
<div class="uk-flex uk-flex-middle">
|
||||
<div>
|
||||
<img class="uk-border-circle curator-photo" src="{{downloadUrl + curator.photo}}" alt="Curator Photo">
|
||||
</div>
|
||||
<div class="uk-width-expand uk-margin-left uk-text-bold">
|
||||
{{curator.name}}
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div *ngIf="(curator.affiliations.length <= 2)" class="uk-width-1-2">
|
||||
<div class="uk-flex uk-flex-middle">
|
||||
<div *ngFor="let affiliation of curator.affiliations" class="uk-margin-left" title="{{affiliation.name}}">
|
||||
<a href="{{affiliation.website_url}}" target="_blank">
|
||||
<div class="uk-card-small uk-card-default uk-card-body">
|
||||
<img class="uk-border-rounded" src="{{affiliation.logo_url}}" width="80" height="80" alt="{{affiliation.name}}">
|
||||
</div>
|
||||
</a>
|
||||
</div>
|
||||
<div class="uk-width-expand uk-margin-left uk-text-meta uk-flex-first">
|
||||
Affiliations
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div *ngIf="(curator.affiliations.length > 2)" class="uk-width-1-1 uk-margin-top">
|
||||
<div class="uk-text-meta uk-margin-small-bottom">
|
||||
Affiliations
|
||||
</div>
|
||||
<div *ngIf="(curator.affiliations.length > 5)" class="uk-position-relative uk-visible-toggle" tabindex="-1" uk-slider="center: true">
|
||||
<ul class="uk-slider-items">
|
||||
<li *ngFor="let affiliation of curator.affiliations" class="uk-width-1-5">
|
||||
<div class="uk-panel">
|
||||
<div class="uk-card-small uk-card-default uk-card-body">
|
||||
<a href="{{affiliation.website_url}}" target="_blank">
|
||||
<img class="uk-border-rounded" src="{{affiliation.logo_url}}" width="80" height="80" alt="{{affiliation.name}}">
|
||||
</a>
|
||||
</div>
|
||||
</div>
|
||||
</li>
|
||||
</ul>
|
||||
<a class="uk-position-center-left uk-position-small uk-hidden-hover" href="#" uk-slidenav-previous uk-slider-item="previous"></a>
|
||||
<a class="uk-position-center-right uk-position-small uk-hidden-hover" href="#" uk-slidenav-next uk-slider-item="next"></a>
|
||||
</div>
|
||||
<div *ngIf="(curator.affiliations.length <= 5) "class="uk-position-relative uk-visible-toggle" tabindex="-1">
|
||||
<ul class="uk-slider-items" uk-height-match="target: > li > div > .uk-card" uk-grid>
|
||||
<li *ngFor="let affiliation of curator.affiliations" class="uk-width-1-5">
|
||||
<div class="uk-panel">
|
||||
<div class="uk-card uk-card-small uk-card-default uk-card-body uk-flex uk-flex-middle uk-flex-center">
|
||||
<a href="{{affiliation.website_url}}" target="_blank">
|
||||
<img class="uk-border-rounded" src="{{affiliation.logo_url}}" width="80" height="80" alt="{{affiliation.name}}">
|
||||
</a>
|
||||
</div>
|
||||
</div>
|
||||
</li>
|
||||
</ul>
|
||||
</div>
|
||||
</div>
|
||||
<div class="uk-width-1-1 uk-first-column uk-margin-top">
|
||||
<div class="uk-text-meta uk-margin-small-bottom">
|
||||
Biography
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</ng-container>
|
||||
<ng-template #child>
|
||||
|
||||
</ng-template>
|
||||
<!--
|
||||
<span *ngIf="authors != undefined">
|
||||
<div *ngIf="showAll && numberOfAuthors > authorsLimit">
|
||||
<a (click)="numberOfAuthors = authorsLimit;">View less authors</a>
|
||||
</div>
|
||||
|
||||
<span *ngFor="let author of authors.slice(0,numberOfAuthors) let i=index">
|
||||
<i *ngIf="!author.orcid || (properties.environment != 'beta' && properties.environment != 'development')">{{author.fullName}}</i
|
||||
><a *ngIf="author.orcid && (properties.environment == 'beta' || properties.environment == 'development')"><i>{{author.fullName}}</i></a
|
||||
><div *ngIf="author.orcid && (properties.environment == 'beta' || properties.environment == 'development')" class=" default-dropdown uk-margin-remove-top uk-padding-medium"
|
||||
uk-dropdown="pos: bottom-left; mode:hover" style="min-width: 70px !important;">
|
||||
<b class="uk-margin-top">{{author.fullName}}</b>
|
||||
|
||||
<div>
|
||||
<div class="uk-text-muted">ORCID</div>
|
||||
<span><code class="uk-padding-small" [id]="'orcid_clipboard_auhtor_'+i">{{author.orcid}}</code></span>
|
||||
<span>
|
||||
<button [class]="'uk-icon-clipboard uk-button uk-button-primary uk-button-small orcid_clipboard_btn_auhtor_'+i"
|
||||
[attr.data-clipboard-target]="'#orcid_clipboard_auhtor_'+i" title="Copy to clipboard">
|
||||
Copy
|
||||
</button>
|
||||
<a class="uk-button uk-button-primary uk-button-small" title="Visit author in Orcid"
|
||||
[href]="properties.orcidURL+author.orcid" target="_blank">
|
||||
Visit
|
||||
</a>
|
||||
</span>
|
||||
</div>
|
||||
|
||||
<hr>
|
||||
<div class="uk-margin-top">
|
||||
Search <b>{{author.fullName}}</b> by <b>ORCID</b> in OpenAIRE's
|
||||
</div>
|
||||
<div class="uk-text-center uk-margin-small uk-margin-large-left uk-margin-large-right">
|
||||
<a class="uk-button uk-button-small portal-button uk-padding uk-padding-remove-top uk-padding-remove-bottom uk-width-1-1"
|
||||
[queryParams]="routerHelper.createQueryParams(['orcid','oc'],[quote(author['orcid']),'and'])" routerLinkActive="router-link-active" routerLink="/search/advanced/publications">
|
||||
Publications
|
||||
</a>
|
||||
</div>
|
||||
<div class="uk-text-center uk-margin-small uk-margin-large-left uk-margin-large-right">
|
||||
<a class="uk-button uk-button-small portal-button uk-padding uk-padding-remove-top uk-padding-remove-bottom uk-width-1-1"
|
||||
[queryParams]="routerHelper.createQueryParams(['orcid','oc'],[quote(author['orcid']),'and'])" routerLinkActive="router-link-active" routerLink="/search/advanced/datasets">
|
||||
Research Data
|
||||
</a>
|
||||
</div>
|
||||
<div class="uk-text-center uk-margin-small uk-margin-large-left uk-margin-large-right">
|
||||
<a class="uk-button uk-button-small portal-button uk-padding uk-padding-remove-top uk-padding-remove-bottom uk-width-1-1"
|
||||
[queryParams]="routerHelper.createQueryParams(['orcid','oc'],[quote(author['orcid']),'and'])" routerLinkActive="router-link-active" routerLink="/search/advanced/software">
|
||||
Software
|
||||
</a>
|
||||
</div>
|
||||
<div class="uk-text-center uk-margin-small uk-margin-large-left uk-margin-large-right">
|
||||
<a class="uk-button uk-button-small portal-button uk-padding uk-padding-remove-top uk-padding-remove-bottom uk-width-1-1"
|
||||
[queryParams]="routerHelper.createQueryParams(['orcid','oc'],[quote(author['orcid']),'and'])" routerLinkActive="router-link-active" routerLink="/search/advanced/other">
|
||||
Other Research Products
|
||||
</a>
|
||||
</div>
|
||||
</div
|
||||
><span>;{{" "}}</span>
|
||||
</span>
|
||||
<span *ngIf="numberOfAuthors == authorsLimit && authors.length > authorsLimit"> ... </span>
|
||||
<span *ngIf="showAll && numberOfAuthors == authorsLimit && authors.length > authorsLimit">
|
||||
<a (click)="numberOfAuthors = authors.length;">
|
||||
view all {{authors.length | number}} authors
|
||||
</a>
|
||||
</span>
|
||||
<span *ngIf="showAll && numberOfAuthors > authorsLimit">
|
||||
<a (click)="numberOfAuthors = authorsLimit; scroll()">View less authors</a>
|
||||
</span>
|
||||
</span>
|
||||
-->
|
|
@ -0,0 +1,77 @@
|
|||
import {Component, Input} from '@angular/core';
|
||||
import {EnvProperties} from '../openaireLibrary/utils/properties/env-properties';
|
||||
import {CuratorService} from "../openaireLibrary/connect/curators/curator.service";
|
||||
import {Curator} from "../openaireLibrary/utils/entities/CuratorInfo";
|
||||
import {ActivatedRoute} from "@angular/router";
|
||||
import {CommunitiesService} from "../openaireLibrary/connect/communities/communities.service";
|
||||
import {ConnectHelper} from "../openaireLibrary/connect/connectHelper";
|
||||
|
||||
@Component({
|
||||
selector: 'showAuthors',
|
||||
templateUrl: './curators.component.html'
|
||||
|
||||
})
|
||||
|
||||
export class CuratorsComponent {
|
||||
@Input() managers: string[];
|
||||
@Input() communityId = null;
|
||||
@Input() main = true;
|
||||
public downloadUrl = null;
|
||||
public showLoading = true;
|
||||
|
||||
public curators: Curator[];
|
||||
|
||||
public properties: EnvProperties;
|
||||
|
||||
constructor (private route: ActivatedRoute,
|
||||
private curatorsService: CuratorService,
|
||||
private communitiesService: CommunitiesService) {}
|
||||
|
||||
ngOnInit() {
|
||||
this.route.data.subscribe((data: { envSpecific: EnvProperties }) => {
|
||||
this.showLoading = true;
|
||||
this.properties = data.envSpecific;
|
||||
this.downloadUrl = this.properties.downloadUrl;
|
||||
console.log(this.downloadUrl)
|
||||
if(!this.main) {
|
||||
let emails = this.managers.join();
|
||||
console.log(emails);
|
||||
this.curatorsService.getCurators(this.properties,
|
||||
this.properties.adminToolsAPIURL + 'curator?emails=' + emails).subscribe(curators => {
|
||||
this.curators = curators;
|
||||
this.showLoading = false;
|
||||
})
|
||||
} else {
|
||||
if(this.properties.environment == "development") {
|
||||
this.route.queryParams.subscribe(data => {
|
||||
this.communityId = data['communityId'];
|
||||
this.communitiesService.getCommunities(this.properties,
|
||||
this.properties.communityAPI + this.communityId).subscribe(community => {
|
||||
this.managers = community[0].managers;
|
||||
let emails = this.managers.join();
|
||||
this.curatorsService.getCurators(this.properties,
|
||||
this.properties.adminToolsAPIURL + '/curator?emails=' + emails).subscribe(curators => {
|
||||
this.curators = curators;
|
||||
console.log(this.curators);
|
||||
this.showLoading = false;
|
||||
})
|
||||
})
|
||||
});
|
||||
} else {
|
||||
this.communityId = ConnectHelper.getCommunityFromDomain(this.properties.domain);
|
||||
this.communitiesService.getCommunities(this.properties,
|
||||
this.properties.communityAPI + this.communityId).subscribe(community => {
|
||||
this.managers = community[0].managers;
|
||||
let emails = this.managers.join();
|
||||
this.curatorsService.getCurators(this.properties,
|
||||
this.properties.adminToolsAPIURL + 'curator?emails=' + emails).subscribe(curators => {
|
||||
this.curators = curators;
|
||||
this.showLoading = false;
|
||||
})
|
||||
})
|
||||
}
|
||||
}
|
||||
});
|
||||
|
||||
}
|
||||
}
|
|
@ -0,0 +1,38 @@
|
|||
import { NgModule} from '@angular/core';
|
||||
import { CommonModule } from '@angular/common';
|
||||
import { FormsModule } from '@angular/forms';
|
||||
import { RouterModule } from '@angular/router';
|
||||
|
||||
import {CuratorsComponent} from './curators.component';
|
||||
import {CuratorService} from "../openaireLibrary/connect/curators/curator.service";
|
||||
import {CuratorsRoutingModule} from "./curators-routing.module";
|
||||
|
||||
@NgModule({
|
||||
imports: [
|
||||
CommonModule, FormsModule, RouterModule,
|
||||
CuratorsRoutingModule
|
||||
],
|
||||
declarations: [
|
||||
CuratorsComponent
|
||||
],
|
||||
providers: [CuratorService],
|
||||
exports: [
|
||||
CuratorsComponent
|
||||
]
|
||||
})
|
||||
export class CuratorsModule {
|
||||
static forChild(): NgModule {
|
||||
return {
|
||||
imports: [
|
||||
CommonModule, FormsModule,
|
||||
],
|
||||
declarations: [
|
||||
CuratorsComponent
|
||||
],
|
||||
providers: [CuratorService],
|
||||
exports: [
|
||||
CuratorsComponent
|
||||
]
|
||||
}
|
||||
}
|
||||
}
|
|
@ -33,6 +33,7 @@
|
|||
"ercGuidlines" : "http://erc.europa.eu/sites/default/files/document/file/ERC_Open_Access_Guidelines-revised_2014.pdf",
|
||||
"helpdesk" : "https://www.openaire.eu/support/helpdesk",
|
||||
"uploadService" : "http://scoobydoo.di.uoa.gr:8000/upload",
|
||||
"downloadUrl" : "http://mpagasas.di.uoa.gr:8000/download/",
|
||||
|
||||
"vocabulariesAPI" :"https://beta.services.openaire.eu/provision/mvc/vocabularies/",
|
||||
|
||||
|
@ -53,7 +54,7 @@
|
|||
|
||||
"cacheUrl" :"http://scoobydoo.di.uoa.gr:3000/get?url=",
|
||||
|
||||
"adminToolsAPIURL" :"http://scoobydoo.di.uoa.gr:8080/uoa-admin-tools",
|
||||
"adminToolsAPIURL" :"http://mpagasas.di.uoa.gr:8080/uoa-admin-tools",
|
||||
|
||||
"adminToolsCommunity" :"openaire",
|
||||
"datasourcesAPI": "https://beta.services.openaire.eu/openaire/ds/search/",
|
||||
|
|
|
@ -48,8 +48,8 @@
|
|||
// console.log(errorMsg + " __" + url + " __" + lineNumber + " __" + column + " __" + errorObj);
|
||||
if((errorMsg && errorMsg.indexOf("uikit.js") != -1) || url.indexOf("uikit.js") != -1 ){
|
||||
console.log("********UIKIT Error ***********");
|
||||
$.getScript("assets/common-assets/common/uikit.js");
|
||||
$.getScript("assets/common-assets/common/uikit-icons-max.js");
|
||||
$.getScript("assets/common-assets/common/uikit.min.js");
|
||||
$.getScript("assets/common-assets/common/uikit-icons-min.js");
|
||||
}
|
||||
|
||||
}
|
||||
|
@ -58,13 +58,13 @@
|
|||
<script src="assets/common-assets/common/jquery.js"></script>
|
||||
<script src="assets/common-assets/citeproc.js"></script>
|
||||
<!-- <script src="assets/common-assets/common/uikit.js"></script> -->
|
||||
<script src="assets/common-assets/common/uikit-icons-max.js"></script>
|
||||
<script src="assets/common-assets/common/uikit-icons-min.js"></script>
|
||||
<script src="https://cdn.ckeditor.com/4.5.11/full-all/ckeditor.js"></script>
|
||||
<script>
|
||||
$(document).ready(function(){
|
||||
console.log("Is ready - load uikit ***")
|
||||
$.getScript("assets/common-assets/common/uikit.js");
|
||||
$.getScript("assets/common-assets/common/uikit-icons-max.js");
|
||||
$.getScript("assets/common-assets/common/uikit.min.js");
|
||||
$.getScript("assets/common-assets/common/uikit-icons-min.js");
|
||||
});
|
||||
|
||||
</script>
|
||||
|
|
Loading…
Reference in New Issue