[Trunk|Connect]: Curators section on community page. Should check if route is enabled.
git-svn-id: https://svn.driver.research-infrastructures.eu/driver/dnet40/modules/uoa-connect-portal/trunk@56031 d315682c-612b-4755-9ff5-7f18f6832af3
This commit is contained in:
parent
5267641363
commit
b31ab356f5
|
@ -69,7 +69,7 @@
|
|||
<!-- </div>-->
|
||||
<!-- uk-slider="center: true"-->
|
||||
|
||||
<div *ngIf="(!fullView)" class="uk-position-relative uk-visible-toggle" tabindex="-1" uk-slider>
|
||||
<div *ngIf="(!fullView)" class="uk-position-relative uk-visible-toggle" tabindex="-1" [attr.uk-slider]="sliderOptions">
|
||||
<ul class="uk-slider-items uk-grid-small" uk-height-match="target: > li > .uk-card" uk-grid>
|
||||
<li *ngFor="let affiliation of affiliations" [class]="'uk-width-1-'+affiliationsInSlider">
|
||||
<div class="uk-card uk-card-small uk-card-default uk-flex uk-flex-middle uk-flex-center"
|
||||
|
@ -83,13 +83,13 @@
|
|||
</div>
|
||||
</li>
|
||||
</ul>
|
||||
<a *ngIf="(affiliations.length > affiliationsInSlider)"
|
||||
<a *ngIf="(affiliations.length > affiliationsInSlider) && arrows"
|
||||
class="uk-position-center-left uk-position-small uk-hidden-hover" href="#" uk-slidenav-previous uk-slider-item="previous"></a>
|
||||
<a *ngIf="(affiliations.length > affiliationsInSlider)"
|
||||
<a *ngIf="(affiliations.length > affiliationsInSlider) && arrows"
|
||||
class="uk-position-center-right uk-position-small uk-hidden-hover" href="#" uk-slidenav-next uk-slider-item="next"></a>
|
||||
</div>
|
||||
</ng-container>
|
||||
|
||||
<div *ngIf="affiliations.length == 0 && fullView" class="uk-animation-fade uk-alert uk-alert-primary" role="alert">
|
||||
No affiliations available
|
||||
</div>
|
||||
<!--<div *ngIf="affiliations.length == 0 && fullView" class="uk-animation-fade uk-alert uk-alert-primary" role="alert">-->
|
||||
<!-- No affiliations available-->
|
||||
<!--</div>-->
|
||||
|
|
|
@ -15,6 +15,8 @@ export class AffiliationsComponent {
|
|||
@Input() fullView: boolean = false;
|
||||
@Input() affiliationsInSlider: number = 5;
|
||||
@Input() affiliations: Affiliation[] = [];
|
||||
@Input() sliderOptions = '';
|
||||
@Input() arrows = true;
|
||||
|
||||
communityId: string;
|
||||
properties:EnvProperties;
|
||||
|
|
|
@ -304,20 +304,14 @@
|
|||
<a [queryParams]=params routerLinkActive="router-link-active" routerLink="/participate/share-zenodo" >
|
||||
<span class="lowOpacityColor">Zenodo communities </span> <span>
|
||||
{{zenodoCommunityIdS.length + ((masterZenodoCommunity)?1:0)}}</span>{{" "}}
|
||||
<span class="uk-icon" uk-tooltip="title:<div class='uk-pargin'>Zenodo is a catch-all repository for OpenAIRE<hr>A zenodo community is created and curated by Zenodo users</div>">
|
||||
<span class="uk-icon" uk-tooltip="title:<div class='uk-margin'>Zenodo is a catch-all repository for OpenAIRE<hr>A zenodo community is created and curated by Zenodo users</div>">
|
||||
<svg width="20" height="20" viewBox="0 0 20 20" xmlns="http://www.w3.org/2000/svg" icon="question" ratio="1"><circle fill="none" stroke="#000" stroke-width="1.1" cx="10" cy="10" r="9"></circle><circle cx="10.44" cy="14.42" r="1.05"></circle><path fill="none" stroke="#000" stroke-width="1.2" d="M8.17,7.79 C8.17,4.75 12.72,4.73 12.72,7.72 C12.72,8.67 11.81,9.15 11.23,9.75 C10.75,10.24 10.51,10.73 10.45,11.4 C10.44,11.53 10.43,11.64 10.43,11.75"></path></svg>
|
||||
</span>
|
||||
</a>
|
||||
</div>
|
||||
</div>
|
||||
<div class="uk-width-3-5@m uk-width-1-1@s">
|
||||
<div>
|
||||
Cuartors Section
|
||||
<div *ngIf="community.managers != null && community.managers[0] != '' && community.managers[0] != null"><span class="uk-text-bold"> Curated by:</span>
|
||||
<span *ngFor='let manager of community.managers; let i = index' >{{manager.substr(0, manager.indexOf('@'))}}<span *ngIf="manager.includes('@') == 0">{{manager}}</span><span *ngIf="i<(community.managers.length-1)">,</span>
|
||||
</span>
|
||||
</div>
|
||||
</div>
|
||||
<div *ngIf="!isRouteEnabled('/curators')" class="uk-width-3-5@m uk-width-1-1@s uk-margin-top">
|
||||
<curators [main]="false" [managers]="community.managers" [communityId]="communityId"></curators>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
|
|
|
@ -22,6 +22,7 @@ import {SearchDataprovidersServiceModule} from "../openaireLibrary/connect/conte
|
|||
import {SearchProjectsServiceModule} from '../openaireLibrary/connect/projects/searchProjectsService.module';
|
||||
import {SearchResearchResultsServiceModule} from "../openaireLibrary/services/searchResearchResultsService.module";
|
||||
import {SearchResultsModule} from "../openaireLibrary/searchPages/searchUtils/searchResults.module";
|
||||
import {CuratorsModule} from "../curators/curators.module";
|
||||
import {AffiliationsModule} from "../affiliations/affiliations.module";
|
||||
|
||||
@NgModule({
|
||||
|
@ -29,7 +30,7 @@ import {AffiliationsModule} from "../affiliations/affiliations.module";
|
|||
CommonModule, FormsModule, RouterModule,
|
||||
SubscribeModule, StatisticsModule, ManageModule, InviteModule,
|
||||
SearchZenodoCommunitiesServiceModule, ZenodoCommunitiesServiceModule, SearchFormModule, SearchDataprovidersServiceModule, SearchProjectsServiceModule,
|
||||
SearchResearchResultsServiceModule, SearchResultsModule, AffiliationsModule
|
||||
SearchResearchResultsServiceModule, SearchResultsModule, CuratorsModule, AffiliationsModule
|
||||
|
||||
],
|
||||
declarations: [
|
||||
|
|
|
@ -1,11 +1,14 @@
|
|||
import { NgModule} from '@angular/core';
|
||||
import { RouterModule } from '@angular/router';
|
||||
import {CuratorsComponent} from "./curators.component";
|
||||
import {FreeGuard} from "../openaireLibrary/login/freeGuard.guard";
|
||||
import {IsRouteEnabled} from "../openaireLibrary/error/isRouteEnabled.guard";
|
||||
import {PreviousRouteRecorder} from "../openaireLibrary/utils/piwik/previousRouteRecorder.guard";
|
||||
|
||||
@NgModule({
|
||||
imports: [
|
||||
RouterModule.forChild([
|
||||
{ path: '', component: CuratorsComponent}
|
||||
{ path: '', component: CuratorsComponent, canActivate: [FreeGuard/*, IsRouteEnabled*/], canDeactivate: [PreviousRouteRecorder]}
|
||||
])
|
||||
]
|
||||
})
|
||||
|
|
|
@ -1,19 +1,19 @@
|
|||
<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 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">
|
||||
<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 && curators.length > 0">
|
||||
<h4 class="uk-margin-top uk-h4">
|
||||
<span class="uk-text-bold">Curators</span>
|
||||
<span> ({{curators.length}})</span>
|
||||
</h4>
|
||||
<div *ngFor="let curator of curators let i=index;" class="uk-width-1-1 uk-card uk-card-default uk-card-body uk-margin-top">
|
||||
<div [class]="(curator.affiliations.length > 0 && curator.affiliations.length <= 2)?'uk-grid-divider':''" uk-grid>
|
||||
<div *ngFor="let curator of curators let i=index;" class="uk-width-1-1 uk-card uk-card-default uk-card-body uk-margin-top uk-animation-slide-top">
|
||||
<div [class]="(curator.affiliations.length > 0 && curator.affiliations.length <= 2)?'uk-grid-divider uk-flex uk-flex-middle':''" uk-grid>
|
||||
|
||||
<div class="uk-width-1-2 uk-first-column">
|
||||
<div class="uk-flex uk-flex-middle">
|
||||
|
@ -70,75 +70,48 @@
|
|||
</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>
|
||||
<div uk-grid>
|
||||
<span class="lowOpacityColor uk-width-1-1">
|
||||
Curators
|
||||
</span>
|
||||
<div *ngFor="let curator of curators let i=index;" class="uk-flex uk-flex-middle uk-width-1-2">
|
||||
<div>
|
||||
<img *ngIf="curator.photo && curator.photo !== ''" class="uk-border-circle curator-photo" src="{{downloadUrl + curator.photo}}" alt="Curator Photo">
|
||||
<img *ngIf="!curator.photo || curator.photo == ''" class="uk-border-circle curator-photo" src="../../assets/common-assets/curator-default.png" alt="Curator Photo">
|
||||
</div>
|
||||
<span class="uk-width-expand uk-margin-left">
|
||||
<a>{{curator.name}}</a>
|
||||
<div class="default-dropdown uk-margin-remove-top uk-padding-medium uk-width-medium communityPanelBackground"
|
||||
uk-dropdown="pos: bottom-left; mode:click; animation: uk-animation-slide-top-small; duration: 1000">
|
||||
<div uk-grid>
|
||||
<div class="uk-first-column uk-flex uk-flex-middle" uk-grid>
|
||||
<div>
|
||||
<img *ngIf="curator.photo && curator.photo !== ''" class="uk-border-circle curator-photo" src="{{downloadUrl + curator.photo}}" alt="Curator Photo">
|
||||
<img *ngIf="!curator.photo || curator.photo == ''" class="uk-border-circle curator-photo" src="../../assets/common-assets/curator-default.png" alt="Curator Photo">
|
||||
</div>
|
||||
<div class="uk-width-expand uk-h5">
|
||||
{{curator.name}}
|
||||
</div>
|
||||
</div>
|
||||
<div *ngIf="curator.affiliations.length > 0" class="uk-width-1-1">
|
||||
<span class="uk-text-left lowOpacityColor uk-margin">
|
||||
Affiliations
|
||||
</span>
|
||||
<div class="uk-width-1-1">
|
||||
<affiliations [affiliations]="curator.affiliations"
|
||||
[affiliationsInSlider]="2"
|
||||
[arrows]="false"
|
||||
[sliderOptions]="'autoplay: true; autoplay-interval: 2000'"></affiliations>
|
||||
</div>
|
||||
</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
|
||||
<div class="uk-width-1-1">
|
||||
<a routerLink="/curators" class="uk-align-right uk-link">
|
||||
Show all details
|
||||
</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>
|
||||
</div>
|
||||
</div>
|
||||
</span>
|
||||
-->
|
||||
</div>
|
||||
</div>
|
||||
</ng-template>
|
||||
|
|
|
@ -8,7 +8,7 @@ import {ConnectHelper} from "../openaireLibrary/connect/connectHelper";
|
|||
import {HelperFunctions} from "../openaireLibrary/utils/HelperFunctions.class";
|
||||
|
||||
@Component({
|
||||
selector: 'showAuthors',
|
||||
selector: 'curators',
|
||||
templateUrl: './curators.component.html'
|
||||
|
||||
})
|
||||
|
@ -36,12 +36,11 @@ export class CuratorsComponent {
|
|||
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.properties.adminToolsAPIURL + '/curator?emails=' + emails).subscribe(curators => {
|
||||
this.curators = curators;
|
||||
for(let i = 0; i < this.curators.length; i++) {
|
||||
this.showMore[i]= false;
|
||||
|
@ -75,7 +74,7 @@ export class CuratorsComponent {
|
|||
this.managers = community[0].managers;
|
||||
let emails = this.managers.join();
|
||||
this.curatorsService.getCurators(this.properties,
|
||||
this.properties.adminToolsAPIURL + 'curator?emails=' + emails).subscribe(curators => {
|
||||
this.properties.adminToolsAPIURL + '/curator?emails=' + emails).subscribe(curators => {
|
||||
this.curators = curators;
|
||||
for(let i = 0; i < this.curators.length; i++) {
|
||||
this.showMore[i]= false;
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
import { NgModule} from '@angular/core';
|
||||
import { NgModule} from '@angular/core';
|
||||
import { CommonModule } from '@angular/common';
|
||||
import { FormsModule } from '@angular/forms';
|
||||
import { RouterModule } from '@angular/router';
|
||||
|
@ -21,19 +21,4 @@ import {AffiliationsModule} from "../affiliations/affiliations.module";
|
|||
CuratorsComponent
|
||||
]
|
||||
})
|
||||
export class CuratorsModule {
|
||||
static forChild(): NgModule {
|
||||
return {
|
||||
imports: [
|
||||
CommonModule, FormsModule,
|
||||
],
|
||||
declarations: [
|
||||
CuratorsComponent
|
||||
],
|
||||
providers: [CuratorService],
|
||||
exports: [
|
||||
CuratorsComponent
|
||||
]
|
||||
}
|
||||
}
|
||||
}
|
||||
export class CuratorsModule {}
|
||||
|
|
Loading…
Reference in New Issue