[Trunk|Library]: Add Helper on search Page, landings and deposit first page.

git-svn-id: https://svn.driver.research-infrastructures.eu/driver/dnet40/modules/uoa-services-library/trunk/ng-openaire-library/src/app@56644 d315682c-612b-4755-9ff5-7f18f6832af3
This commit is contained in:
k.triantafyllou 2019-07-22 09:16:50 +00:00
parent 1d64ec947a
commit 11cf47ac5a
28 changed files with 4563 additions and 3864 deletions

View File

@ -1,8 +1,9 @@
import {Component, Input} from '@angular/core'; import {Component, Input} from '@angular/core';
import {ZenodoInformationClass} from './utils/zenodoInformation.class'; import {ZenodoInformationClass} from './utils/zenodoInformation.class';
import {EnvProperties} from "../utils/properties/env-properties"; import {EnvProperties} from "../utils/properties/env-properties";
import {ActivatedRoute} from "@angular/router"; import {ActivatedRoute, Router} from "@angular/router";
import {PiwikService} from "../utils/piwik/piwik.service"; import {PiwikService} from "../utils/piwik/piwik.service";
import {HelperService} from "../utils/helper/helper.service";
@Component({ @Component({
selector: 'deposit-first-page', selector: 'deposit-first-page',
@ -134,11 +135,11 @@ import {PiwikService} from "../utils/piwik/piwik.service";
<!– grey-background–> <!– grey-background–>
<div class="uk-margin-top uk-padding-small"> <div class="uk-margin-top uk-padding-small">
<div class="uk-align-center uk-container uk-container-large uk-margin-top uk-margin-bottom"> <div class="uk-align-center uk-container uk-container-large uk-margin-top uk-margin-bottom">
<helper *ngIf="pageContents && pageContents['bottom']" [texts]="pageContents['bottom']"></helper> <helper *ngIf="pageContents && pageContents['bottom'] && pageContents['bottom'].length > 0" [texts]="pageContents['bottom']"></helper>
</div> </div>
</div> </div>
</div>--> </div>-->
<helper *ngIf="pageContents && pageContents['bottom']" [texts]="pageContents['bottom']"></helper> <helper *ngIf="pageContents && pageContents['bottom'] && pageContents['bottom'].length > 0" [texts]="pageContents['bottom']"></helper>
` `
}) })
@ -147,20 +148,27 @@ export class DepositFirstPageComponent {
@Input() piwikSiteId = null; @Input() piwikSiteId = null;
piwiksub:any; piwiksub:any;
@Input() pageContents = null; @Input() communityId = null;
@Input() divContents = null;
public pageContents = null;
public divContents = null;
public keyword: string; public keyword: string;
public depositRoute = "/search-deposit"; public depositRoute = "/search-deposit";
public searchPlaceHolder = "Search for repositories by title, country, organization, subject..."; public searchPlaceHolder = "Search for repositories by title, country, organization, subject...";
properties:EnvProperties; properties:EnvProperties;
constructor (private route: ActivatedRoute, private _piwikService:PiwikService) {} constructor (private route: ActivatedRoute, private _piwikService:PiwikService,
private helper: HelperService,
private _router: Router) {}
ngOnInit() { ngOnInit() {
this.route.data this.route.data
.subscribe((data: { envSpecific: EnvProperties }) => { .subscribe((data: { envSpecific: EnvProperties }) => {
this.properties = data.envSpecific; this.properties = data.envSpecific;
//this.getDivContents();
this.getPageContents();
if (!this.zenodoInformation) { if (!this.zenodoInformation) {
this.zenodoInformation = new ZenodoInformationClass(); this.zenodoInformation = new ZenodoInformationClass();
} }
@ -177,6 +185,18 @@ export class DepositFirstPageComponent {
}); });
} }
public getPageContents() {
this.helper.getPageHelpContents(this._router.url, this.properties, this.communityId).subscribe(contents => {
this.pageContents = contents;
})
}
public getDivContents() {
this.helper.getDivHelpContents(this._router.url, this.properties, this.communityId).subscribe(contents => {
this.divContents = contents;
})
}
ngOnDestroy() { ngOnDestroy() {
if(this.piwiksub){ if(this.piwiksub){
this.piwiksub.unsubscribe(); this.piwiksub.unsubscribe();

View File

@ -3,12 +3,17 @@
<div class="tm-main uk-width-1-1@s uk-width-1-1@m uk-width-1-1@l uk-row-first "> <div class="tm-main uk-width-1-1@s uk-width-1-1@m uk-width-1-1@l uk-row-first ">
<div class="uk-container uk-margin-top datasource"> <div class="uk-container uk-margin-top datasource">
<div *ngIf="warningMessage.length > 0" class="uk-alert uk-alert-warning uk-margin-large-top" role="alert">{{warningMessage}}</div> <div *ngIf="warningMessage.length > 0" class="uk-alert uk-alert-warning uk-margin-large-top"
<div *ngIf="errorMessage.length > 0" class="uk-alert uk-alert-danger uk-margin-large-top" role="alert">{{errorMessage}}</div> role="alert">{{warningMessage}}</div>
<div [style.display]="showLoading ? 'inline' : 'none'" class="uk-animation-fade uk-margin-large-top uk-width-1-1" role="alert"><span class="loading-gif uk-align-center" ></span></div> <div *ngIf="errorMessage.length > 0" class="uk-alert uk-alert-danger uk-margin-large-top"
role="alert">{{errorMessage}}</div>
<div [style.display]="showLoading ? 'inline' : 'none'"
class="uk-animation-fade uk-margin-large-top uk-width-1-1" role="alert"><span
class="loading-gif uk-align-center"></span></div>
<div *ngIf="dataProviderInfo != null" uk-grid class="uk-grid-large"> <div *ngIf="dataProviderInfo != null" uk-grid class="uk-grid-large">
<helper *ngIf="pageContents && pageContents['top'] && pageContents['top'].length > 0"
[texts]="pageContents['top']" styleName="uk-width-1-1"></helper>
<div class="uk-width-expand@m uk-width-1-1@s"> <div class="uk-width-expand@m uk-width-1-1@s">
<!--h3 *ngIf="dataProviderInfo.title != null"> <!--h3 *ngIf="dataProviderInfo.title != null">
<a *ngIf="dataProviderInfo.title['url'] != undefined && dataProviderInfo.title['url'] != null" <a *ngIf="dataProviderInfo.title['url'] != undefined && dataProviderInfo.title['url'] != null"
@ -19,24 +24,30 @@
{{dataProviderInfo.title['name']}} {{dataProviderInfo.title['name']}}
</p> </p>
</h3--> </h3-->
<schema2jsonld *ngIf="dataProviderInfo" [data]=dataProviderInfo [URL]="properties.baseLink+'/search/dataprovider?datasourceId='+datasourceId" <schema2jsonld *ngIf="dataProviderInfo" [data]=dataProviderInfo
type="datasource" [otherURL]="(dataProviderInfo.openDoarId)?(properties.openDoarURL+dataProviderInfo.openDoarId):((dataProviderInfo.r3DataId)?properties.r3DataURL+dataProviderInfo.r3DataId:nul)"></schema2jsonld> [URL]="properties.baseLink+'/search/dataprovider?datasourceId='+datasourceId"
type="datasource"
[otherURL]="(dataProviderInfo.openDoarId)?(properties.openDoarURL+dataProviderInfo.openDoarId):((dataProviderInfo.r3DataId)?properties.r3DataURL+dataProviderInfo.r3DataId:nul)"></schema2jsonld>
<showTitle [title]="dataProviderInfo.title"></showTitle> <showTitle [title]="dataProviderInfo.title"></showTitle>
<div class="uk-text-large " *ngIf="dataProviderInfo.officialName && this.dataProviderInfo.title.name != dataProviderInfo.officialName ">{{dataProviderInfo.officialName}}</div> <div class="uk-text-large "
*ngIf="dataProviderInfo.officialName && this.dataProviderInfo.title.name != dataProviderInfo.officialName ">{{dataProviderInfo.officialName}}</div>
<span *ngIf="dataProviderInfo.type" class="uk-label custom-label label-type label-dataprovider " <span *ngIf="dataProviderInfo.type" class="uk-label custom-label label-type label-dataprovider "
title="Type">{{dataProviderInfo.type}}</span>{{" "}} title="Type">{{dataProviderInfo.type}}</span>{{" "}}
<span *ngIf="dataProviderInfo.compatibility" class="uk-label custom-label label-compatibility " title="Compatibility"> <span *ngIf="dataProviderInfo.compatibility" class="uk-label custom-label label-compatibility "
title="Compatibility">
<a *ngIf="!dataProviderInfo.compatibility.name && dataProviderInfo.compatibility.id" <a *ngIf="!dataProviderInfo.compatibility.name && dataProviderInfo.compatibility.id"
[queryParams]="{datasourceId: dataProviderInfo.compatibility.id}" routerLinkActive="router-link-active" routerLink="/search/dataprovider"> [queryParams]="{datasourceId: dataProviderInfo.compatibility.id}" routerLinkActive="router-link-active"
routerLink="/search/dataprovider">
{{dataProviderInfo.compatibility.info}} {{dataProviderInfo.compatibility.info}}
</a> </a>
<span *ngIf="dataProviderInfo.compatibility.name || !dataProviderInfo.compatibility.id"> <span *ngIf="dataProviderInfo.compatibility.name || !dataProviderInfo.compatibility.id">
{{dataProviderInfo.compatibility.info}} {{dataProviderInfo.compatibility.info}}
</span> </span>
<a *ngIf="dataProviderInfo.compatibility.name && dataProviderInfo.compatibility.id" <a *ngIf="dataProviderInfo.compatibility.name && dataProviderInfo.compatibility.id"
[queryParams]="{datasourceId: dataProviderInfo.compatibility.id}" routerLinkActive="router-link-active" routerLink="/search/dataprovider"> [queryParams]="{datasourceId: dataProviderInfo.compatibility.id}" routerLinkActive="router-link-active"
routerLink="/search/dataprovider">
{{dataProviderInfo.compatibility.name}} {{dataProviderInfo.compatibility.name}}
</a> </a>
<span *ngIf="dataProviderInfo.compatibility.name && !dataProviderInfo.compatibility.id"> <span *ngIf="dataProviderInfo.compatibility.name && !dataProviderInfo.compatibility.id">
@ -47,10 +58,14 @@
<ul class="uk-list"> <ul class="uk-list">
<showPublisher [properties]="properties" <showPublisher [properties]="properties"
[journal]="dataProviderInfo.journal"></showPublisher> [journal]="dataProviderInfo.journal"></showPublisher>
<li *ngIf="dataProviderInfo.aggregationStatus && dataProviderInfo.aggregationStatus.fundedContent && dataProviderInfo.aggregationStatus.fundedContent != -1"><span class="uk-text-bold">Results with funding information: </span> <li
*ngIf="dataProviderInfo.aggregationStatus && dataProviderInfo.aggregationStatus.fundedContent && dataProviderInfo.aggregationStatus.fundedContent != -1">
<span class="uk-text-bold">Results with funding information: </span>
{{dataProviderInfo.aggregationStatus.fundedContent | number}} {{dataProviderInfo.aggregationStatus.fundedContent | number}}
</li> </li>
<li *ngIf="dataProviderInfo.aggregationStatus && dataProviderInfo.aggregationStatus.fulltexts && dataProviderInfo.aggregationStatus.fulltexts != -1"><span class="uk-text-bold">Collected full-texts: </span> <li
*ngIf="dataProviderInfo.aggregationStatus && dataProviderInfo.aggregationStatus.fulltexts && dataProviderInfo.aggregationStatus.fulltexts != -1">
<span class="uk-text-bold">Collected full-texts: </span>
{{dataProviderInfo.aggregationStatus.fulltexts | number}} {{dataProviderInfo.aggregationStatus.fulltexts | number}}
</li> </li>
<li *ngIf="dataProviderInfo.oaiPmhURL"><span class="uk-text-bold">OAI-PMH: </span> <li *ngIf="dataProviderInfo.oaiPmhURL"><span class="uk-text-bold">OAI-PMH: </span>
@ -78,13 +93,15 @@
</li> </li>
<li *ngIf="dataProviderInfo.countries != undefined && dataProviderInfo.countries.length > 0"><span class="uk-text-bold">Countries: </span>{{dataProviderInfo.countries.join(", ")}}</li> <li *ngIf="dataProviderInfo.countries != undefined && dataProviderInfo.countries.length > 0"><span
class="uk-text-bold">Countries: </span>{{dataProviderInfo.countries.join(", ")}}</li>
</ul> </ul>
<div *ngIf="showTabs"> <div *ngIf="showTabs">
<ul class="custom-accordion" uk-accordion *ngIf="dataProviderInfo.tabs2 != undefined"> <ul class="custom-accordion" uk-accordion *ngIf="dataProviderInfo.tabs2 != undefined">
<li *ngIf="dataProviderInfo.tabs2.indexOf('Publications') != -1" (click)="search('publicationsTab', 1, 10); activeTab='Publications'"> <li *ngIf="dataProviderInfo.tabs2.indexOf('Publications') != -1"
(click)="search('publicationsTab', 1, 10); activeTab='Publications'">
<a class="uk-accordion-title" href="#">Publications <a class="uk-accordion-title" href="#">Publications
<!-- <span class="uk-badge uk-badge-notification"> --> <!-- <span class="uk-badge uk-badge-notification"> -->
({{fetchPublications.searchUtils.totalResults | number}}) ({{fetchPublications.searchUtils.totalResults | number}})
@ -97,7 +114,8 @@
</publicationsTab> </publicationsTab>
</div> </div>
</li> </li>
<li *ngIf="dataProviderInfo.tabs2.indexOf('Research Data') != -1" (click)="search('datasetsTab', 1, 10); activeTab='Research Data'"> <li *ngIf="dataProviderInfo.tabs2.indexOf('Research Data') != -1"
(click)="search('datasetsTab', 1, 10); activeTab='Research Data'">
<a class="uk-accordion-title" href="#">Research Data <a class="uk-accordion-title" href="#">Research Data
<!-- <span class="uk-badge uk-badge-notification"> --> <!-- <span class="uk-badge uk-badge-notification"> -->
({{fetchDatasets.searchUtils.totalResults | number}}) ({{fetchDatasets.searchUtils.totalResults | number}})
@ -113,7 +131,8 @@
</div> </div>
</li> </li>
<li *ngIf="dataProviderInfo.tabs2.indexOf('Software') != -1" (click)="search('softwareTab', 1, 10); activeTab='Software'"> <li *ngIf="dataProviderInfo.tabs2.indexOf('Software') != -1"
(click)="search('softwareTab', 1, 10); activeTab='Software'">
<a class="uk-accordion-title" href="#">Software <a class="uk-accordion-title" href="#">Software
<!-- <span class="uk-badge uk-badge-notification"> --> <!-- <span class="uk-badge uk-badge-notification"> -->
({{fetchSoftware.searchUtils.totalResults | number}}) ({{fetchSoftware.searchUtils.totalResults | number}})
@ -127,7 +146,8 @@
</div> </div>
</li> </li>
<li *ngIf="dataProviderInfo.tabs2.indexOf('Other Research Products') != -1" (click)="search('orpsTab', 1, 10); activeTab='Other Research Products'"> <li *ngIf="dataProviderInfo.tabs2.indexOf('Other Research Products') != -1"
(click)="search('orpsTab', 1, 10); activeTab='Other Research Products'">
<a class="uk-accordion-title" href="#">Other Research Products <a class="uk-accordion-title" href="#">Other Research Products
<!-- <span class="uk-badge uk-badge-notification"> --> <!-- <span class="uk-badge uk-badge-notification"> -->
({{fetchOrps.searchUtils.totalResults | number}}) ({{fetchOrps.searchUtils.totalResults | number}})
@ -141,7 +161,8 @@
</div> </div>
</li> </li>
<li *ngIf="dataProviderInfo.tabs2.indexOf('Projects') != -1" (click)="search('projectsTab', 1, 10); activeTab='Projects'"> <li *ngIf="dataProviderInfo.tabs2.indexOf('Projects') != -1"
(click)="search('projectsTab', 1, 10); activeTab='Projects'">
<a class="uk-accordion-title" href="#">Projects <a class="uk-accordion-title" href="#">Projects
<!-- <span class="uk-badge uk-badge-notification"> --> <!-- <span class="uk-badge uk-badge-notification"> -->
({{fetchProjects.searchUtils.totalResults | number}}) ({{fetchProjects.searchUtils.totalResults | number}})
@ -154,7 +175,8 @@
</projectsTab> </projectsTab>
</div> </div>
</li> </li>
<li *ngIf="dataProviderInfo.tabs2.indexOf('Content Providers') != -1" (click)="search('datasourcesTab', 1, 10); activeTab='Content Providers'"> <li *ngIf="dataProviderInfo.tabs2.indexOf('Content Providers') != -1"
(click)="search('datasourcesTab', 1, 10); activeTab='Content Providers'">
<a class="uk-accordion-title" href="#">Content Providers <a class="uk-accordion-title" href="#">Content Providers
<!-- <span class="uk-badge uk-badge-notification"> --> <!-- <span class="uk-badge uk-badge-notification"> -->
({{fetchDataproviders.searchUtils.totalResults | number}}) ({{fetchDataproviders.searchUtils.totalResults | number}})
@ -167,7 +189,8 @@
</datasourcesTab> </datasourcesTab>
</div> </div>
</li> </li>
<li *ngIf="dataProviderInfo.tabs2.indexOf('Organizations') != -1" (click)="search('organizationsTab', 1, 10); activeTab='Organizations'"> <li *ngIf="dataProviderInfo.tabs2.indexOf('Organizations') != -1"
(click)="search('organizationsTab', 1, 10); activeTab='Organizations'">
<a class="uk-accordion-title" href="#">Organizations <a class="uk-accordion-title" href="#">Organizations
<!-- <span class="uk-badge uk-badge-notification"> --> <!-- <span class="uk-badge uk-badge-notification"> -->
({{dataProviderInfo.organizations.length | number}}) ({{dataProviderInfo.organizations.length | number}})
@ -179,7 +202,8 @@
</organizationsTab> </organizationsTab>
</div> </div>
</li> </li>
<li *ngIf="dataProviderInfo.tabs2.indexOf('Related Content Providers') != -1" (click)="search('relatedDatasourcesTab', 1, 10); activeTab='Related Content Providers'"> <li *ngIf="dataProviderInfo.tabs2.indexOf('Related Content Providers') != -1"
(click)="search('relatedDatasourcesTab', 1, 10); activeTab='Related Content Providers'">
<a class="uk-accordion-title" href="#">Related Content Providers</a> <a class="uk-accordion-title" href="#">Related Content Providers</a>
<div class="uk-accordion-content"> <div class="uk-accordion-content">
<relatedDatasourcesTab *ngIf="activeTab=='Related Content Providers'" <relatedDatasourcesTab *ngIf="activeTab=='Related Content Providers'"
@ -194,7 +218,8 @@
</relatedDatasourcesTab> </relatedDatasourcesTab>
</div> </div>
</li> </li>
<li *ngIf="dataProviderInfo.tabs2.indexOf('Statistics') != -1" (click)="search('statisticsTab', 1, 10); activeTab='Statistics'"> <li *ngIf="dataProviderInfo.tabs2.indexOf('Statistics') != -1"
(click)="search('statisticsTab', 1, 10); activeTab='Statistics'">
<a class="uk-accordion-title" href="#">Statistics</a> <a class="uk-accordion-title" href="#">Statistics</a>
<div class="uk-accordion-content"> <div class="uk-accordion-content">
<div *ngIf="activeTab=='Statistics' && statsClicked"> <div *ngIf="activeTab=='Statistics' && statsClicked">
@ -225,14 +250,15 @@
<i-frame [url]=dataProjectsUrl width="100%" height="350"></i-frame> <i-frame [url]=dataProjectsUrl width="100%" height="350"></i-frame>
</div> </div>
</div> --> </div> -->
<statisticsTab [fetchPublications]="fetchPublications" [fetchDatasets]="fetchDatasets" [datasourceId]="datasourceId"></statisticsTab> <statisticsTab [fetchPublications]="fetchPublications" [fetchDatasets]="fetchDatasets"
[datasourceId]="datasourceId"></statisticsTab>
</div> </div>
</div> </div>
</li> </li>
<li *ngIf="dataProviderInfo.tabs2.indexOf('Metrics') != -1"
<li *ngIf="dataProviderInfo.tabs2.indexOf('Metrics') != -1" (click)="search('metricsTab', 1, 10); activeTab='Metrics'"> (click)="search('metricsTab', 1, 10); activeTab='Metrics'">
<a class="uk-accordion-title" href="#">Metrics</a> <a class="uk-accordion-title" href="#">Metrics</a>
<div class="uk-accordion-content"> <div class="uk-accordion-content">
<metrics *ngIf="activeTab=='Metrics'" [pageViews]="pageViews" <metrics *ngIf="activeTab=='Metrics'" [pageViews]="pageViews"
@ -255,7 +281,8 @@
<div class="uk-width-large@m uk-width-1-1@s"> <div class="uk-width-large@m uk-width-1-1@s">
<div class="uk-card uk-card-default uk-padding-small"> <div class="uk-card uk-card-default uk-padding-small">
<div> <div>
Share - Bookmark<addThis ></addThis> Share - Bookmark
<addThis></addThis>
</div> </div>
<metrics [pageViews]="pageViews" shortView=true <metrics [pageViews]="pageViews" shortView=true
[id]="datasourceId" [entityType]="'datasources'" [entity]="'Content Provider'" [id]="datasourceId" [entityType]="'datasources'" [entity]="'Content Provider'"
@ -263,9 +290,10 @@
</metrics> </metrics>
</div> </div>
</div> </div>
</div> <helper *ngIf="pageContents && pageContents['bottom'] && pageContents['bottom'].length > 0"
</div> [texts]="pageContents['bottom']" styleName="uk-width-1-1"></helper>
</div>
</div>
</div> </div>
</div> </div>
</div> </div>

View File

@ -1,11 +1,7 @@
import {merge as observableMerge} from 'rxjs';
import {merge as observableMerge, Observable} from 'rxjs'; import {Component, Input} from '@angular/core';
import {Component, ViewChild} from '@angular/core';
import {Input} from '@angular/core';
import {ActivatedRoute, Router} from '@angular/router'; import {ActivatedRoute, Router} from '@angular/router';
import {Title, Meta} from '@angular/platform-browser'; import {Meta, Title} from '@angular/platform-browser';
import {EnvProperties} from '../../utils/properties/env-properties'; import {EnvProperties} from '../../utils/properties/env-properties';
@ -24,12 +20,12 @@ import {FetchProjects} from '../../utils/fetchEntitiesClass
import {SearchProjectsService} from '../../services/searchProjects.service'; import {SearchProjectsService} from '../../services/searchProjects.service';
import {FetchDataproviders} from '../../utils/fetchEntitiesClasses/fetchDataproviders.class'; import {FetchDataproviders} from '../../utils/fetchEntitiesClasses/fetchDataproviders.class';
import {SearchDataprovidersService} from '../../services/searchDataproviders.service'; import {SearchDataprovidersService} from '../../services/searchDataproviders.service';
import {RelatedDatasourcesTabComponent} from './relatedDatasourcesTab.component';
import {ErrorCodes} from '../../utils/properties/errorCodes'; import {ErrorCodes} from '../../utils/properties/errorCodes';
import {RouterHelper} from '../../utils/routerHelper.class'; import {RouterHelper} from '../../utils/routerHelper.class';
import {PiwikService} from '../../utils/piwik/piwik.service'; import {PiwikService} from '../../utils/piwik/piwik.service';
import {SEOService} from '../../sharedComponents/SEO/SEO.service'; import {SEOService} from '../../sharedComponents/SEO/SEO.service';
import {HelperFunctions} from "../../utils/HelperFunctions.class"; import {HelperFunctions} from "../../utils/HelperFunctions.class";
import {HelperService} from "../../utils/helper/helper.service";
@Component({ @Component({
@ -39,6 +35,7 @@ import {HelperFunctions} from "../../utils/HelperFunctions.class";
export class DataProviderComponent { export class DataProviderComponent {
@Input() piwikSiteId = null; @Input() piwikSiteId = null;
@Input() communityId = null;
public dataProviderInfo: DataProviderInfo; public dataProviderInfo: DataProviderInfo;
public datasourceId: string; public datasourceId: string;
@ -86,6 +83,8 @@ export class DataProviderComponent {
public routerHelper: RouterHelper = new RouterHelper(); public routerHelper: RouterHelper = new RouterHelper();
public errorCodes: ErrorCodes = new ErrorCodes(); public errorCodes: ErrorCodes = new ErrorCodes();
public pageContents = null;
public divContents = null;
// Request results of each tab only the one time (first time tab is clicked) // Request results of each tab only the one time (first time tab is clicked)
private reloadPublications: boolean = true; private reloadPublications: boolean = true;
@ -114,7 +113,8 @@ export class DataProviderComponent {
private _searchOrpsService: SearchOrpsService, private _searchOrpsService: SearchOrpsService,
private _searchProjectsService: SearchProjectsService, private _searchProjectsService: SearchProjectsService,
private _searchDataprovidersService: SearchDataprovidersService, private _searchDataprovidersService: SearchDataprovidersService,
private seoService: SEOService) { private seoService: SEOService,
private helper: HelperService) {
this.fetchPublications = new FetchPublications(this._searchPublicationsService); this.fetchPublications = new FetchPublications(this._searchPublicationsService);
this.fetchDatasets = new FetchDatasets(this._searchDatasetsService); this.fetchDatasets = new FetchDatasets(this._searchDatasetsService);
this.fetchSoftware = new FetchSoftware(this._searchSoftwareService); this.fetchSoftware = new FetchSoftware(this._searchSoftwareService);
@ -128,6 +128,8 @@ export class DataProviderComponent {
this.route.data this.route.data
.subscribe((data: { envSpecific: EnvProperties }) => { .subscribe((data: { envSpecific: EnvProperties }) => {
this.properties = data.envSpecific; this.properties = data.envSpecific;
//this.getDivContents();
this.getPageContents();
this.updateUrl(data.envSpecific.baseLink + this._router.url); this.updateUrl(data.envSpecific.baseLink + this._router.url);
}); });
@ -143,6 +145,18 @@ export class DataProviderComponent {
}); });
} }
private getPageContents() {
this.helper.getPageHelpContents(this._router.url, this.properties, this.communityId).subscribe(contents => {
this.pageContents = contents;
})
}
private getDivContents() {
this.helper.getDivHelpContents(this._router.url, this.properties, this.communityId).subscribe(contents => {
this.divContents = contents;
})
}
ngOnDestroy() { ngOnDestroy() {
if (this.sub) { if (this.sub) {
this.sub.unsubscribe(); this.sub.unsubscribe();
@ -158,6 +172,7 @@ export class DataProviderComponent {
this.relatedDatasourcesSub.unsubscribe(); this.relatedDatasourcesSub.unsubscribe();
} }
} }
private getDataProviderInfo(id: string) { private getDataProviderInfo(id: string) {
this.warningMessage = ''; this.warningMessage = '';
this.errorMessage = "" this.errorMessage = ""
@ -218,12 +233,14 @@ export class DataProviderComponent {
this._meta.updateTag({content: description}, "name='description'"); this._meta.updateTag({content: description}, "name='description'");
this._meta.updateTag({content: description}, "property='og:description'"); this._meta.updateTag({content: description}, "property='og:description'");
} }
private updateTitle(title: string) { private updateTitle(title: string) {
var _prefix = "OpenAIRE | "; var _prefix = "OpenAIRE | ";
var _title = _prefix + ((title.length > 50) ? title.substring(0, 50) : title); var _title = _prefix + ((title.length > 50) ? title.substring(0, 50) : title);
this._title.setTitle(_title); this._title.setTitle(_title);
this._meta.updateTag({content: _title}, "property='og:title'"); this._meta.updateTag({content: _title}, "property='og:title'");
} }
private updateUrl(url: string) { private updateUrl(url: string) {
this._meta.updateTag({content: url}, "property='og:url'"); this._meta.updateTag({content: url}, "property='og:url'");
} }
@ -422,9 +439,13 @@ export class DataProviderComponent {
this.fetchAggregatorsOrps.searchUtils.status == this.errorCodes.DONE)) { this.fetchAggregatorsOrps.searchUtils.status == this.errorCodes.DONE)) {
this.relatedDatasourcesSub = observableMerge(this.fetchAggregatorsPublications.requestComplete, this.fetchAggregatorsDatasets.requestComplete, this.fetchAggregatorsSoftware.requestComplete, this.fetchAggregatorsOrps.requestComplete) this.relatedDatasourcesSub = observableMerge(this.fetchAggregatorsPublications.requestComplete, this.fetchAggregatorsDatasets.requestComplete, this.fetchAggregatorsSoftware.requestComplete, this.fetchAggregatorsOrps.requestComplete)
.subscribe( .subscribe(
data => {}, data => {
err => {}, },
() => { this.preprocessRelatedDatasources(); } err => {
},
() => {
this.preprocessRelatedDatasources();
}
) )
this.fetchAggregatorsPublications.getAggregatorResults(this.datasourceId, page, size, this.properties); this.fetchAggregatorsPublications.getAggregatorResults(this.datasourceId, page, size, this.properties);
@ -456,7 +477,13 @@ export class DataProviderComponent {
} }
for (let result of this.fetchAggregatorsPublications.results) { for (let result of this.fetchAggregatorsPublications.results) {
if (!this.dataProviderInfo.relatedDatasources.has(result.id)) { if (!this.dataProviderInfo.relatedDatasources.has(result.id)) {
this.dataProviderInfo.relatedDatasources.set(result.id, {"name": result.name, "countPublications": result.count, "countDatasets": "0", "countSoftware": "0", "countOrps": "0"}); this.dataProviderInfo.relatedDatasources.set(result.id, {
"name": result.name,
"countPublications": result.count,
"countDatasets": "0",
"countSoftware": "0",
"countOrps": "0"
});
} else { } else {
this.dataProviderInfo.relatedDatasources.get(result.id).countPublications = parseInt(this.dataProviderInfo.relatedDatasources.get(result.id).countPublications + result.count) + ""; this.dataProviderInfo.relatedDatasources.get(result.id).countPublications = parseInt(this.dataProviderInfo.relatedDatasources.get(result.id).countPublications + result.count) + "";
} }
@ -464,7 +491,13 @@ export class DataProviderComponent {
for (let result of this.fetchAggregatorsDatasets.results) { for (let result of this.fetchAggregatorsDatasets.results) {
if (!this.dataProviderInfo.relatedDatasources.has(result.id)) { if (!this.dataProviderInfo.relatedDatasources.has(result.id)) {
this.dataProviderInfo.relatedDatasources.set(result.id, {"name": result.name, "countPublications": "0", "countDatasets": result.count, "countSoftware": "0", "countOrps": "0"}); this.dataProviderInfo.relatedDatasources.set(result.id, {
"name": result.name,
"countPublications": "0",
"countDatasets": result.count,
"countSoftware": "0",
"countOrps": "0"
});
} else { } else {
this.dataProviderInfo.relatedDatasources.get(result.id).countDatasets = parseInt(this.dataProviderInfo.relatedDatasources.get(result.id).countDatasets + result.count) + ""; this.dataProviderInfo.relatedDatasources.get(result.id).countDatasets = parseInt(this.dataProviderInfo.relatedDatasources.get(result.id).countDatasets + result.count) + "";
} }
@ -472,7 +505,13 @@ export class DataProviderComponent {
for (let result of this.fetchAggregatorsSoftware.results) { for (let result of this.fetchAggregatorsSoftware.results) {
if (!this.dataProviderInfo.relatedDatasources.has(result.id)) { if (!this.dataProviderInfo.relatedDatasources.has(result.id)) {
this.dataProviderInfo.relatedDatasources.set(result.id, {"name": result.name, "countPublications": "0", "countDatasets": "0", "countSoftware": result.count, "countOrps": "0"}); this.dataProviderInfo.relatedDatasources.set(result.id, {
"name": result.name,
"countPublications": "0",
"countDatasets": "0",
"countSoftware": result.count,
"countOrps": "0"
});
} else { } else {
this.dataProviderInfo.relatedDatasources.get(result.id).countSoftware = parseInt(this.dataProviderInfo.relatedDatasources.get(result.id).countSoftware + result.count) + ""; this.dataProviderInfo.relatedDatasources.get(result.id).countSoftware = parseInt(this.dataProviderInfo.relatedDatasources.get(result.id).countSoftware + result.count) + "";
} }
@ -480,7 +519,13 @@ export class DataProviderComponent {
for (let result of this.fetchAggregatorsOrps.results) { for (let result of this.fetchAggregatorsOrps.results) {
if (!this.dataProviderInfo.relatedDatasources.has(result.id)) { if (!this.dataProviderInfo.relatedDatasources.has(result.id)) {
this.dataProviderInfo.relatedDatasources.set(result.id, {"name": result.name, "countPublications": "0", "countDatasets": "0", "countSoftware": "0", "countOrps": result.count}); this.dataProviderInfo.relatedDatasources.set(result.id, {
"name": result.name,
"countPublications": "0",
"countDatasets": "0",
"countSoftware": "0",
"countOrps": result.count
});
} else { } else {
this.dataProviderInfo.relatedDatasources.get(result.id).countOrps = parseInt(this.dataProviderInfo.relatedDatasources.get(result.id).countOrps + result.count) + ""; this.dataProviderInfo.relatedDatasources.get(result.id).countOrps = parseInt(this.dataProviderInfo.relatedDatasources.get(result.id).countOrps + result.count) + "";
} }

View File

@ -31,19 +31,19 @@ import {PublicationsServiceModule} from '../../services/publicationsService.modu
import {SoftwareServiceModule} from '../../services/softwareService.module'; import {SoftwareServiceModule} from '../../services/softwareService.module';
import {OrpsServiceModule} from '../../services/orpsService.module'; import {OrpsServiceModule} from '../../services/orpsService.module';
// import { DataProviderRoutingModule } from './dataProvider-routing.module';
import {FreeGuard} from'../../login/freeGuard.guard'; import {FreeGuard} from'../../login/freeGuard.guard';
import {IsRouteEnabled} from '../../error/isRouteEnabled.guard'; import {IsRouteEnabled} from '../../error/isRouteEnabled.guard';
import {Schema2jsonldModule} from '../../sharedComponents/schema2jsonld/schema2jsonld.module'; import {Schema2jsonldModule} from '../../sharedComponents/schema2jsonld/schema2jsonld.module';
import { SEOServiceModule } from '../../sharedComponents/SEO/SEOService.module'; import { SEOServiceModule } from '../../sharedComponents/SEO/SEOService.module';
import {ShowPublisherModule} from "../landing-utils/showPublisher.module"; import {ShowPublisherModule} from "../landing-utils/showPublisher.module";
import {HelperModule} from "../../utils/helper/helper.module";
@NgModule({ @NgModule({
imports: imports:
[CommonModule, FormsModule, RouterModule, [CommonModule, FormsModule, RouterModule,
TabResultModule, IFrameModule, ErrorMessagesModule, MetricsModule, LandingModule, TabResultModule, IFrameModule, ErrorMessagesModule, MetricsModule, LandingModule,
DataProvidersServiceModule, DatasetsServiceModule, ProjectsServiceModule, PublicationsServiceModule, DataProvidersServiceModule, DatasetsServiceModule, ProjectsServiceModule, PublicationsServiceModule,
SoftwareServiceModule, OrpsServiceModule, PagingModule, Schema2jsonldModule, SEOServiceModule, ShowPublisherModule], SoftwareServiceModule, OrpsServiceModule, PagingModule, Schema2jsonldModule, SEOServiceModule, ShowPublisherModule, HelperModule],
declarations: declarations:
[PublicationsTabComponent, DatasetsTabComponent, StatisticsTabComponent, ProjectsTabComponent, DatasourcesTabComponent, OrganizationsTabComponent, [PublicationsTabComponent, DatasetsTabComponent, StatisticsTabComponent, ProjectsTabComponent, DatasourcesTabComponent, OrganizationsTabComponent,
RelatedDatasourcesTabComponent, DataProviderComponent, SoftwareTabComponent, OrpsTabComponent RelatedDatasourcesTabComponent, DataProviderComponent, SoftwareTabComponent, OrpsTabComponent

View File

@ -1,26 +1,36 @@
<div id="tm-main" class=" uk-section uk-margin-small-top tm-middle"> <div id="tm-main" class=" uk-section uk-margin-small-top tm-middle">
<div uk-grid uk-grid> <div uk-grid uk-grid>
<div class="tm-main uk-width-1-1@s uk-width-1-1@m uk-width-1-1@l uk-row-first "> <div class="tm-main uk-width-1-1@s uk-width-1-1@m uk-width-1-1@l uk-row-first ">
<div class="uk-container uk-margin-top dataset"> <div class="uk-container uk-margin-top dataset">
<div *ngIf="warningMessage.length > 0" class="uk-alert uk-alert-warning uk-margin-large-top"
<div *ngIf="warningMessage.length > 0" class="uk-alert uk-alert-warning uk-margin-large-top" role="alert">{{warningMessage}}</div> role="alert">{{warningMessage}}</div>
<div *ngIf="errorMessage.length > 0" class="uk-alert uk-alert-danger uk-margin-large-top" role="alert">{{errorMessage}}</div> <div *ngIf="errorMessage.length > 0" class="uk-alert uk-alert-danger uk-margin-large-top"
<div [style.display]="showLoading ? 'inline' : 'none'" class="uk-animation-fade uk-margin-large-top uk-width-1-1" role="alert"><span class="loading-gif uk-align-center" ></span></div> role="alert">{{errorMessage}}</div>
<div [style.display]="showLoading ? 'inline' : 'none'"
<div *ngIf="datasetInfo != null" uk-grid class="uk-grid-large"> class="uk-animation-fade uk-margin-large-top uk-width-1-1" role="alert"><span
class="loading-gif uk-align-center"></span></div>
<div *ngIf="datasetInfo != null" uk-grid>
<helper *ngIf="pageContents && pageContents['top'] && pageContents['top'].length > 0"
[texts]="pageContents['top']" styleName="uk-width-1-1"></helper>
<div class="uk-width-expand@m uk-width-1-1@s"> <div class="uk-width-expand@m uk-width-1-1@s">
<schema2jsonld *ngIf="datasetInfo.record" [data]=datasetInfo.record [URL]="properties.baseLink+'/search/dataset?datasetId='+datasetId"></schema2jsonld> <schema2jsonld *ngIf="datasetInfo.record" [data]=datasetInfo.record
[URL]="properties.baseLink+'/search/dataset?datasetId='+datasetId"></schema2jsonld>
<showTitle [titleName]="datasetInfo.title"></showTitle> <showTitle [titleName]="datasetInfo.title"></showTitle>
<p class="uk-text-large" *ngIf="datasetInfo.subtitle"> <p class="uk-text-large" *ngIf="datasetInfo.subtitle">
<span [innerHTML]="datasetInfo.subtitle"></span> <span [innerHTML]="datasetInfo.subtitle"></span>
</p> </p>
<span *ngIf="datasetInfo.types && datasetInfo.types.length > 0"class="uk-label custom-label label-dataset " title="Type">{{datasetInfo.types.join(", ")}}</span>{{" "}} <span *ngIf="datasetInfo.types && datasetInfo.types.length > 0" class="uk-label custom-label label-dataset "
<span *ngIf="datasetInfo.languages && datasetInfo.languages.length > 0" class="uk-label custom-label label-language " title="Language">{{datasetInfo.languages.join(", ")}}</span>{{" "}} title="Type">{{datasetInfo.types.join(", ")}}</span>{{" "}}
<span *ngIf="datasetInfo.countries && datasetInfo.countries.length > 0" class="uk-label custom-label label-country " title="Country">{{datasetInfo.countries.join(", ")}}</span>{{" "}} <span *ngIf="datasetInfo.languages && datasetInfo.languages.length > 0"
class="uk-label custom-label label-language "
title="Language">{{datasetInfo.languages.join(", ")}}</span>{{" "}}
<span *ngIf="datasetInfo.countries && datasetInfo.countries.length > 0"
class="uk-label custom-label label-country "
title="Country">{{datasetInfo.countries.join(", ")}}</span>{{" "}}
<!-- <span *ngIf="datasetInfo.title && datasetInfo.title.accessMode" [class]="'uk-label custom-label label-'+ datasetInfo.title.accessMode " title="Access Mode">{{datasetInfo.title.accessMode}}</span> --> <!-- <span *ngIf="datasetInfo.title && datasetInfo.title.accessMode" [class]="'uk-label custom-label label-'+ datasetInfo.title.accessMode " title="Access Mode">{{datasetInfo.title.accessMode}}</span> -->
<span *ngIf="datasetInfo.accessMode" [class]="'uk-label custom-label label-'+ datasetInfo.accessMode " title="Access Mode">{{datasetInfo.accessMode}}</span>{{" "}} <span *ngIf="datasetInfo.accessMode" [class]="'uk-label custom-label label-'+ datasetInfo.accessMode "
title="Access Mode">{{datasetInfo.accessMode}}</span>{{" "}}
<span *ngIf="datasetInfo.underCurationMessage" class="uk-label custom-label label-underCuration ">{{" "}} <span *ngIf="datasetInfo.underCurationMessage" class="uk-label custom-label label-underCuration ">{{" "}}
<span uk-tooltip="pos:right; delay:10" <span uk-tooltip="pos:right; delay:10"
title="{{buildCurationTooltip()}}"> title="{{buildCurationTooltip()}}">
@ -43,7 +53,8 @@
<ul class="uk-list"> <ul class="uk-list">
<showPublisher [publisher]="datasetInfo.publisher" <showPublisher [publisher]="datasetInfo.publisher"
[journal]="datasetInfo.journal" [properties]="properties"></showPublisher> [journal]="datasetInfo.journal" [properties]="properties"></showPublisher>
<li *ngIf="datasetInfo.embargoEndDate"><span class="uk-text-bold">Embargo end date:</span> {{datasetInfo.embargoEndDate}}</li> <li *ngIf="datasetInfo.embargoEndDate"><span
class="uk-text-bold">Embargo end date:</span> {{datasetInfo.embargoEndDate}}</li>
<li *ngIf="datasetInfo.identifiers && datasetInfo.identifiers.size > 0"> <li *ngIf="datasetInfo.identifiers && datasetInfo.identifiers.size > 0">
<showIdentifiers [identifiers]="datasetInfo.identifiers"></showIdentifiers> <showIdentifiers [identifiers]="datasetInfo.identifiers"></showIdentifiers>
</li> </li>
@ -55,16 +66,21 @@
</li> </li>
</ul> </ul>
<hr *ngIf="datasetInfo.description"> <hr *ngIf="datasetInfo.description">
<div *ngIf="datasetInfo.description" class="uk-text-justify descriptionText uk-height-max-medium uk-overflow-auto"> <div *ngIf="datasetInfo.description"
class="uk-text-justify descriptionText uk-height-max-medium uk-overflow-auto">
<span>{{datasetInfo.description.substring(0, showNumDescription)}}</span <span>{{datasetInfo.description.substring(0, showNumDescription)}}</span
><span *ngIf="showNumDescription == thresholdDescription && datasetInfo.description.length > thresholdDescription">...</span ><span
><span *ngIf="showNumDescription == thresholdDescription && datasetInfo.description.length > thresholdDescription" class="uk-text-right"> *ngIf="showNumDescription == thresholdDescription && datasetInfo.description.length > thresholdDescription">...</span
><span
*ngIf="showNumDescription == thresholdDescription && datasetInfo.description.length > thresholdDescription"
class="uk-text-right">
<a (click)="showNumDescription = datasetInfo.description.length;"> <a (click)="showNumDescription = datasetInfo.description.length;">
View more View more
</a> </a>
</span> </span>
</div> </div>
<div *ngIf="datasetInfo.description && showNumDescription > thresholdDescription" class="uk-width-1-1 uk-text-right"> <div *ngIf="datasetInfo.description && showNumDescription > thresholdDescription"
class="uk-width-1-1 uk-text-right">
<a (click)="showNumDescription = thresholdDescription;"> <a (click)="showNumDescription = thresholdDescription;">
View less View less
</a> </a>
@ -100,11 +116,16 @@
<div class="uk-accordion-content"> <div class="uk-accordion-content">
<div> <div>
<div *ngIf="datasetInfo.references.length > pageSize" class="uk-margin-bottom"> <div *ngIf="datasetInfo.references.length > pageSize" class="uk-margin-bottom">
<span class="uk-h6">{{datasetInfo.references.length | number}} references, page {{referencesPage | number}} of {{totalPages(datasetInfo.references.length) | number}}</span> <span class="uk-h6">{{datasetInfo.references.length | number}}
<paging-no-load class="uk-float-right" [currentPage]="referencesPage" [totalResults]="datasetInfo.references.length" [size]="pageSize" (pageChange)="updateReferencesPage($event)"></paging-no-load> references, page {{referencesPage | number}}
of {{totalPages(datasetInfo.references.length) | number}}</span>
<paging-no-load class="uk-float-right" [currentPage]="referencesPage"
[totalResults]="datasetInfo.references.length" [size]="pageSize"
(pageChange)="updateReferencesPage($event)"></paging-no-load>
</div> </div>
<div *ngFor="let item of datasetInfo.references.slice((referencesPage-1)*pageSize, referencesPage*pageSize)"> <div
*ngFor="let item of datasetInfo.references.slice((referencesPage-1)*pageSize, referencesPage*pageSize)">
<p *ngIf=" item && item['url']" <p *ngIf=" item && item['url']"
class="custom-external custom-icon"> class="custom-external custom-icon">
<a href="{{item['url']}}" target="_blank"> <a href="{{item['url']}}" target="_blank">
@ -139,7 +160,9 @@
<div *ngFor="let provenanceaction of getKeys(datasetInfo.relatedResearchResults)"> <div *ngFor="let provenanceaction of getKeys(datasetInfo.relatedResearchResults)">
<div class="uk-text-large">{{provenanceaction}}</div> <div class="uk-text-large">{{provenanceaction}}</div>
<tabTable [percentageName]="trust" [info]="datasetInfo.relatedResearchResults.get(provenanceaction)" [(properties)]=properties></tabTable> <tabTable [percentageName]="trust"
[info]="datasetInfo.relatedResearchResults.get(provenanceaction)"
[(properties)]=properties></tabTable>
</div> </div>
</div> </div>
</div> </div>
@ -163,7 +186,8 @@
<div *ngIf="datasetInfo.similarResearchResults"> --> <div *ngIf="datasetInfo.similarResearchResults"> -->
<div> <div>
<tabTable [percentageName]="similarity" [info]="datasetInfo.similarResearchResults" [(properties)]=properties></tabTable> <tabTable [percentageName]="similarity" [info]="datasetInfo.similarResearchResults"
[(properties)]=properties></tabTable>
</div> </div>
</div> </div>
</li> </li>
@ -186,13 +210,15 @@
</div> </div>
</li> </li>
<li (click)="activeTab='Other Versions'" *ngIf="properties.environment == 'development' && datasetInfo.deletedByInferenceIds"> <li (click)="activeTab='Other Versions'"
*ngIf="properties.environment == 'development' && datasetInfo.deletedByInferenceIds">
<a class="uk-accordion-title" href="#"> <a class="uk-accordion-title" href="#">
Other Versions Other Versions
({{datasetInfo.deletedByInferenceIds.length | number}}) ({{datasetInfo.deletedByInferenceIds.length | number}})
</a> </a>
<div *ngIf="activeTab=='Other Versions'" class="uk-accordion-content"> <div *ngIf="activeTab=='Other Versions'" class="uk-accordion-content">
<deletedByInference [id]="datasetId" [ids]="datasetInfo.deletedByInferenceIds" [type]="'research data'"></deletedByInference> <deletedByInference [id]="datasetId" [ids]="datasetInfo.deletedByInferenceIds"
[type]="'research data'"></deletedByInference>
</div> </div>
</li> </li>
</ul> </ul>
@ -256,30 +282,57 @@
</li> </li>
</ul> </ul>
<button *ngIf="isRouteAvailable('participate/direct-claim') " class=" uk-button portal-button uk-width-1-1 "> <button *ngIf="isRouteAvailable('participate/direct-claim') "
class=" uk-button portal-button uk-width-1-1 ">
<span class="uk-icon"> <span class="uk-icon">
<svg icon="link" ratio="1" xmlns="http://www.w3.org/2000/svg" width="25" viewBox="0 0 20 20" height="25"><path d="M10.625,12.375 L7.525,15.475 C6.825,16.175 5.925,16.175 5.225,15.475 L4.525,14.775 C3.825,14.074 3.825,13.175 4.525,12.475 L7.625,9.375" fill="none" stroke="#000" stroke-width="1.1"></path><path d="M9.325,7.375 L12.425,4.275 C13.125,3.575 14.025,3.575 14.724,4.275 L15.425,4.975 C16.125,5.675 16.125,6.575 15.425,7.275 L12.325,10.375" fill="none" stroke="#000" stroke-width="1.1"></path><path d="M7.925,11.875 L11.925,7.975" fill="none" stroke="#000" stroke-width="1.1"></path></svg> <svg icon="link" ratio="1" xmlns="http://www.w3.org/2000/svg" width="25" viewBox="0 0 20 20"
height="25"><path
d="M10.625,12.375 L7.525,15.475 C6.825,16.175 5.925,16.175 5.225,15.475 L4.525,14.775 C3.825,14.074 3.825,13.175 4.525,12.475 L7.625,9.375"
fill="none" stroke="#000" stroke-width="1.1"></path><path
d="M9.325,7.375 L12.425,4.275 C13.125,3.575 14.025,3.575 14.724,4.275 L15.425,4.975 C16.125,5.675 16.125,6.575 15.425,7.275 L12.325,10.375"
fill="none" stroke="#000" stroke-width="1.1"></path><path d="M7.925,11.875 L11.925,7.975"
fill="none" stroke="#000"
stroke-width="1.1"></path></svg>
</span> Link this dataset to... </span> Link this dataset to...
</button> </button>
<div *ngIf="isRouteAvailable('participate/direct-claim') " uk-dropdown="pos: bottom-left; mode:click" style="background: transparent !important;box-shadow: none; max-width: 70px !important; min-width: 70px !important;"> <div *ngIf="isRouteAvailable('participate/direct-claim') " uk-dropdown="pos: bottom-left; mode:click"
style="background: transparent !important;box-shadow: none; max-width: 70px !important; min-width: 70px !important;">
<ul class="uk-iconnav uk-iconnav-vertical"> <ul class="uk-iconnav uk-iconnav-vertical">
<li uk-tooltip="pos:right;" title="<div class='tooltip-custom-font-size '>Projects</div>"> <li uk-tooltip="pos:right;" title="<div class='tooltip-custom-font-size '>Projects</div>">
<a class=" uk-icon-button portal-button shadowBox" style="padding: 6px;" [queryParams]="routerHelper.createQueryParams(['id','type','linkTo'],[datasetId,'dataset','project'])" routerLinkActive="router-link-active" routerLink="/participate/direct-claim" > <a class=" uk-icon-button portal-button shadowBox" style="padding: 6px;"
[queryParams]="routerHelper.createQueryParams(['id','type','linkTo'],[datasetId,'dataset','project'])"
routerLinkActive="router-link-active" routerLink="/participate/direct-claim">
<span class="uk-icon"> <span class="uk-icon">
<svg width="20" height="20" viewBox="0 0 20 20" xmlns="http://www.w3.org/2000/svg" icon="album" ratio="1"><rect x="5" y="2" width="10" height="1"></rect><rect x="3" y="4" width="14" height="1"></rect><rect fill="none" stroke="#000" x="1.5" y="6.5" width="17" height="11"></rect></svg></span> <svg width="20" height="20" viewBox="0 0 20 20" xmlns="http://www.w3.org/2000/svg" icon="album"
ratio="1"><rect x="5" y="2" width="10" height="1"></rect><rect x="3" y="4" width="14"
height="1"></rect><rect
fill="none" stroke="#000" x="1.5" y="6.5" width="17" height="11"></rect></svg></span>
</a> </a>
</li> </li>
<li uk-tooltip="pos:right;" title="<div class='tooltip-custom-font-size '>Communities</div>"> <li uk-tooltip="pos:right;" title="<div class='tooltip-custom-font-size '>Communities</div>">
<a class=" uk-icon-button portal-button shadowBox" style="padding: 6px;" [queryParams]="routerHelper.createQueryParams(['id','type','linkTo'],[datasetId,'dataset','context'])" routerLinkActive="router-link-active" routerLink="/participate/direct-claim" > <a class=" uk-icon-button portal-button shadowBox" style="padding: 6px;"
[queryParams]="routerHelper.createQueryParams(['id','type','linkTo'],[datasetId,'dataset','context'])"
routerLinkActive="router-link-active" routerLink="/participate/direct-claim">
<span class="uk-icon"> <span class="uk-icon">
<svg width="20" height="20" viewBox="0 0 20 20" xmlns="http://www.w3.org/2000/svg" icon="users" ratio="1"><circle fill="none" stroke="#000" stroke-width="1.1" cx="7.7" cy="8.6" r="3.5"></circle><path fill="none" stroke="#000" stroke-width="1.1" d="M1,18.1 C1.7,14.6 4.4,12.1 7.6,12.1 C10.9,12.1 13.7,14.8 14.3,18.3"></path><path fill="none" stroke="#000" 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> <svg width="20" height="20" viewBox="0 0 20 20" xmlns="http://www.w3.org/2000/svg"
icon="users" ratio="1"><circle fill="none" stroke="#000" stroke-width="1.1" cx="7.7"
cy="8.6" r="3.5"></circle><path fill="none" stroke="#000"
stroke-width="1.1"
d="M1,18.1 C1.7,14.6 4.4,12.1 7.6,12.1 C10.9,12.1 13.7,14.8 14.3,18.3"></path><path
fill="none" stroke="#000" 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>
</a> </a>
</li> </li>
<li uk-tooltip="pos:right;" title="<div class='tooltip-custom-font-size uk-margin-small'>Other research results</div>"> <li uk-tooltip="pos:right;"
<a class=" uk-icon-button portal-button shadowBox" style="padding: 6px;" [queryParams]="routerHelper.createQueryParams(['id','type','linkTo'],[datasetId,'dataset','result'])" routerLinkActive="router-link-active" routerLink="/participate/direct-claim" > title="<div class='tooltip-custom-font-size uk-margin-small'>Other research results</div>">
<a class=" uk-icon-button portal-button shadowBox" style="padding: 6px;"
[queryParams]="routerHelper.createQueryParams(['id','type','linkTo'],[datasetId,'dataset','result'])"
routerLinkActive="router-link-active" routerLink="/participate/direct-claim">
<span class="uk-icon"> <span class="uk-icon">
<svg width="20" height="20" viewBox="0 0 20 20" xmlns="http://www.w3.org/2000/svg" icon="copy" ratio="1"><rect fill="none" stroke="#000" x="3.5" y="2.5" width="12" height="16"></rect><polyline fill="none" stroke="#000" points="5 0.5 17.5 0.5 17.5 17"></polyline></svg></span> <svg width="20" height="20" viewBox="0 0 20 20" xmlns="http://www.w3.org/2000/svg" icon="copy"
ratio="1"><rect fill="none" stroke="#000" x="3.5" y="2.5" width="12" height="16"></rect><polyline
fill="none" stroke="#000" points="5 0.5 17.5 0.5 17.5 17"></polyline></svg></span>
</a> </a>
</li> </li>
@ -288,8 +341,11 @@
</div> </div>
</div> </div>
<helper *ngIf="pageContents && pageContents['bottom'] && pageContents['bottom'].length > 0"
[texts]="pageContents['bottom']" styleName="uk-width-1-1"></helper>
</div> </div>
</div> </div>
</div> </div>
</div> </div>
</div>

View File

@ -1,9 +1,6 @@
import {Component, ViewChild} from '@angular/core'; import {Component, Input} from '@angular/core';
import {Input} from '@angular/core';
import {ActivatedRoute, Router} from '@angular/router'; import {ActivatedRoute, Router} from '@angular/router';
import {Title, Meta} from '@angular/platform-browser'; import {Meta, Title} from '@angular/platform-browser';
import {Observable} from 'rxjs';
import {DatasetInfo} from '../../utils/entities/datasetInfo'; import {DatasetInfo} from '../../utils/entities/datasetInfo';
import {EnvProperties} from '../../utils/properties/env-properties'; import {EnvProperties} from '../../utils/properties/env-properties';
@ -13,6 +10,7 @@ import {DatasetService} from './dataset.service';
import {PiwikService} from '../../utils/piwik/piwik.service'; import {PiwikService} from '../../utils/piwik/piwik.service';
import {SEOService} from '../../sharedComponents/SEO/SEO.service'; import {SEOService} from '../../sharedComponents/SEO/SEO.service';
import {HelperFunctions} from "../../utils/HelperFunctions.class"; import {HelperFunctions} from "../../utils/HelperFunctions.class";
import {HelperService} from "../../utils/helper/helper.service";
@Component({ @Component({
@ -22,6 +20,7 @@ import {HelperFunctions} from "../../utils/HelperFunctions.class";
export class DatasetComponent { export class DatasetComponent {
@Input() piwikSiteId = null; @Input() piwikSiteId = null;
@Input() communityId = null;
public datasetInfo: DatasetInfo; public datasetInfo: DatasetInfo;
public datasetId: string; public datasetId: string;
@ -55,11 +54,15 @@ export class DatasetComponent {
public warningMessage = ""; public warningMessage = "";
public errorMessage = ""; public errorMessage = "";
public showLoading: boolean = true; public showLoading: boolean = true;
public pageContents = null;
public divContents = null;
public routerHelper: RouterHelper = new RouterHelper(); public routerHelper: RouterHelper = new RouterHelper();
private result; private result;
sub: any; piwiksub: any; infoSub: any; sub: any;
piwiksub: any;
infoSub: any;
properties: EnvProperties; properties: EnvProperties;
constructor(private _datasetService: DatasetService, constructor(private _datasetService: DatasetService,
@ -69,13 +72,16 @@ export class DatasetComponent {
private _meta: Meta, private _meta: Meta,
private _title: Title, private _title: Title,
private _router: Router, private _router: Router,
private seoService: SEOService) { private seoService: SEOService,
private helper: HelperService) {
} }
ngOnInit() { ngOnInit() {
this.route.data this.route.data
.subscribe((data: { envSpecific: EnvProperties }) => { .subscribe((data: { envSpecific: EnvProperties }) => {
this.properties = data.envSpecific; this.properties = data.envSpecific;
//this.getDivContents();
this.getPageContents();
this.updateUrl(data.envSpecific.baseLink + this._router.url); this.updateUrl(data.envSpecific.baseLink + this._router.url);
}); });
@ -107,6 +113,18 @@ export class DatasetComponent {
} }
private getPageContents() {
this.helper.getPageHelpContents(this.router.url, this.properties, this.communityId).subscribe(contents => {
this.pageContents = contents;
})
}
private getDivContents() {
this.helper.getDivHelpContents(this.router.url, this.properties, this.communityId).subscribe(contents => {
this.divContents = contents;
})
}
ngOnDestroy() { ngOnDestroy() {
if (this.sub) { if (this.sub) {
this.sub.unsubscribe(); this.sub.unsubscribe();
@ -145,7 +163,16 @@ export class DatasetComponent {
} }
this.result = [] this.result = []
this.result = {id: id, type :"dataset", source : "openaire", title: this.datasetInfo.title,url: '', result: '', accessRights: /*this.datasetInfo.title.accessMode*/ this.datasetInfo.accessMode, embargoEndDate: ''}; this.result = {
id: id,
type: "dataset",
source: "openaire",
title: this.datasetInfo.title,
url: '',
result: '',
accessRights: /*this.datasetInfo.title.accessMode*/ this.datasetInfo.accessMode,
embargoEndDate: ''
};
let relatedResearchResultsNum = 0; let relatedResearchResultsNum = 0;
if (this.datasetInfo.relatedResearchResults != undefined) { if (this.datasetInfo.relatedResearchResults != undefined) {
@ -181,12 +208,14 @@ export class DatasetComponent {
this._meta.updateTag({content: description}, "name='description'"); this._meta.updateTag({content: description}, "name='description'");
this._meta.updateTag({content: description}, "property='og:description'"); this._meta.updateTag({content: description}, "property='og:description'");
} }
private updateTitle(title: string) { private updateTitle(title: string) {
var _prefix = "OpenAIRE | "; var _prefix = "OpenAIRE | ";
var _title = _prefix + ((title.length > 50) ? title.substring(0, 50) : title); var _title = _prefix + ((title.length > 50) ? title.substring(0, 50) : title);
this._title.setTitle(_title); this._title.setTitle(_title);
this._meta.updateTag({content: _title}, "property='og:title'"); this._meta.updateTag({content: _title}, "property='og:title'");
} }
private updateUrl(url: string) { private updateUrl(url: string) {
this._meta.updateTag({content: url}, "property='og:url'"); this._meta.updateTag({content: url}, "property='og:url'");
} }
@ -199,6 +228,7 @@ export class DatasetComponent {
return tooltipContent; return tooltipContent;
} }
public getKeys(map) { public getKeys(map) {
return Array.from(map.keys()); return Array.from(map.keys());
} }
@ -222,6 +252,7 @@ export class DatasetComponent {
public scroll() { public scroll() {
HelperFunctions.scroll(); HelperFunctions.scroll();
} }
isRouteAvailable(routeToCheck: string) { isRouteAvailable(routeToCheck: string) {
for (let i = 0; i < this.router.config.length; i++) { for (let i = 0; i < this.router.config.length; i++) {
let routePath: string = this.router.config[i].path; let routePath: string = this.router.config[i].path;

View File

@ -1,4 +1,3 @@
// import {MaterialModule} from '@angular/material';
import {NgModule} from '@angular/core'; import {NgModule} from '@angular/core';
import {CommonModule} from '@angular/common'; import {CommonModule} from '@angular/common';
import {FormsModule} from '@angular/forms'; import {FormsModule} from '@angular/forms';
@ -8,8 +7,7 @@ import {SharedModule} from '../../shared/shared.module';
import {DatasetComponent} from './dataset.component'; import {DatasetComponent} from './dataset.component';
import {CiteThisModule} from '../landing-utils/citeThis/citeThis.module'; import {CiteThisModule} from '../landing-utils/citeThis/citeThis.module';;
// import {DatasetRoutingModule} from './dataset-routing.module';
import {LandingModule} from '../landing-utils/landing.module'; import {LandingModule} from '../landing-utils/landing.module';
import {ResultLandingModule} from '../landing-utils/resultLanding.module'; import {ResultLandingModule} from '../landing-utils/resultLanding.module';
import {MetricsModule} from '../landing-utils/metrics.module'; import {MetricsModule} from '../landing-utils/metrics.module';
@ -27,14 +25,14 @@ import { SEOServiceModule } from '../../sharedComponents/SEO/SEOService.module';
import {ShowAuthorsModule} from "../../utils/authors/showAuthors.module"; import {ShowAuthorsModule} from "../../utils/authors/showAuthors.module";
import {DeletedByInferenceModule} from "../landing-utils/deletedByInference/deletedByInference.module"; import {DeletedByInferenceModule} from "../landing-utils/deletedByInference/deletedByInference.module";
import {HelperModule} from "../../utils/helper/helper.module";
@NgModule({ @NgModule({
imports: [ imports: [
//MaterialModule.forRoot(),
CommonModule, FormsModule, SharedModule, RouterModule, LandingModule, CommonModule, FormsModule, SharedModule, RouterModule, LandingModule,
CiteThisModule, ResultLandingModule, MetricsModule, IFrameModule, PagingModule, CiteThisModule, ResultLandingModule, MetricsModule, IFrameModule, PagingModule,
AltMetricsModule, ConfigurationServiceModule, Schema2jsonldModule, SEOServiceModule, AltMetricsModule, ConfigurationServiceModule, Schema2jsonldModule, SEOServiceModule,
ShowAuthorsModule, DeletedByInferenceModule ShowAuthorsModule, DeletedByInferenceModule, HelperModule
], ],
declarations: [ declarations: [
DatasetComponent DatasetComponent

View File

@ -1,8 +1,6 @@
import {Component, Input} from '@angular/core'; import {Component, Input} from '@angular/core';
import {ActivatedRoute, Params, Router} from '@angular/router'; import {ActivatedRoute, Router} from '@angular/router';
import {Title, Meta} from '@angular/platform-browser'; import {Meta, Title} from '@angular/platform-browser';
import {Observable} from 'rxjs';
import {EnvProperties} from '../../utils/properties/env-properties'; import {EnvProperties} from '../../utils/properties/env-properties';
@ -10,6 +8,7 @@ import {HtmlProjectReportService} from './htmlProjectReport.service';
import {ProjectService} from '../project/project.service'; import {ProjectService} from '../project/project.service';
import {PiwikService} from '../../utils/piwik/piwik.service'; import {PiwikService} from '../../utils/piwik/piwik.service';
import {SEOService} from '../../sharedComponents/SEO/SEO.service'; import {SEOService} from '../../sharedComponents/SEO/SEO.service';
import {HelperService} from "../../utils/helper/helper.service";
declare var UIkit: any; declare var UIkit: any;
@ -17,28 +16,35 @@ declare var UIkit: any;
selector: 'htmlProjectReport', selector: 'htmlProjectReport',
template: ` template: `
<div id="tm-main" class=" uk-section uk-margin-small-top tm-middle"> <div id="tm-main" class=" uk-section uk-margin-small-top tm-middle">
<div uk-grid uk-grid> <div uk-grid>
<div class="tm-main uk-width-1-1@s uk-width-1-1@m uk-width-1-1@l uk-row-first "> <div class="tm-main uk-width-1-1@s uk-width-1-1@m uk-width-1-1@l uk-row-first ">
<helper *ngIf="pageContents && pageContents['top'] && pageContents['top'].length > 0"
<div class="uk-container uk-margin-top"> [texts]="pageContents['top']" styleName="uk-width-1-1"></helper>
<div class="uk-container uk-margin-top uk-width-1-1">
<div *ngIf="warningMessage" class="uk-alert uk-alert-warning" role="alert">{{warningMessage}}</div> <div *ngIf="warningMessage" class="uk-alert uk-alert-warning" role="alert">{{warningMessage}}</div>
<div [style.display]="showLoading ? 'inline' : 'none'" class="uk-animation-fade uk-margin-large-top uk-width-1-1" role="alert"><span class="loading-gif uk-align-center" ></span></div> <div [style.display]="showLoading ? 'inline' : 'none'"
class="uk-animation-fade uk-margin-large-top uk-width-1-1" role="alert"><span
class="loading-gif uk-align-center"></span></div>
<div *ngIf="!showLoading && !warningMessage"> <div *ngIf="!showLoading && !warningMessage">
<h1 *ngIf="header1">{{header1}}</h1> <h1 *ngIf="header1">{{header1}}</h1>
<h2 *ngIf="header1 || htmlResult">{{header2}}</h2> <h2 *ngIf="header1 || htmlResult">{{header2}}</h2>
<div class="uk-clearfix uk-margin-bottom"> <div class="uk-clearfix uk-margin-bottom">
<button *ngIf="htmlResult" class="uk-icon-clipboard uk-button uk-button-primary clipBtn uk-float-right" (click)="copied()"> <button *ngIf="htmlResult" class="uk-icon-clipboard uk-button uk-button-primary clipBtn uk-float-right"
(click)="copied()">
Copy to clipboard Copy to clipboard
</button> </button>
</div> </div>
<!--div class="uk-panel-scrollable custom-html-table-height" *ngIf="htmlResult" id="clipboard" [innerHTML]="htmlResult"></div--> <!--div class="uk-panel-scrollable custom-html-table-height" *ngIf="htmlResult" id="clipboard" [innerHTML]="htmlResult"></div-->
<div class="uk-overflow-auto custom-html-table-height" *ngIf="htmlResult" id="clipboard" [innerHTML]="htmlResult"></div> <div class="uk-overflow-auto custom-html-table-height" *ngIf="htmlResult" id="clipboard"
[innerHTML]="htmlResult"></div>
<div *ngIf="errorMessage" class="uk-alert uk-alert-danger" role="alert">{{errorMessage}}</div> <div *ngIf="errorMessage" class="uk-alert uk-alert-danger" role="alert">{{errorMessage}}</div>
</div> </div>
</div> </div>
<helper *ngIf="pageContents && pageContents['bottom'] && pageContents['bottom'].length > 0"
[texts]="pageContents['bottom']" styleName="uk-width-1-1"></helper>
</div> </div>
</div> </div>
</div> </div>
@ -47,6 +53,7 @@ declare var UIkit: any;
}) })
export class HtmlProjectReportComponent { export class HtmlProjectReportComponent {
@Input() piwikSiteId = null; @Input() piwikSiteId = null;
@Input() communityId = null;
private projectId: string; private projectId: string;
private totalResults: number = 10; private totalResults: number = 10;
private resultsType: string = "publication"; private resultsType: string = "publication";
@ -55,7 +62,8 @@ export class HtmlProjectReportComponent{
public header2: string = ""; public header2: string = "";
public htmlResult: string = ""; public htmlResult: string = "";
public sub: any; piwiksub: any; public sub: any;
piwiksub: any;
public subHTML: any; public subHTML: any;
public subHTMLInfo: any; public subHTMLInfo: any;
@ -63,6 +71,8 @@ export class HtmlProjectReportComponent{
public errorMessage: string = ""; public errorMessage: string = "";
public showLoading: boolean = true; public showLoading: boolean = true;
properties: EnvProperties; properties: EnvProperties;
public pageContents = null;
public divContents = null;
constructor(private route: ActivatedRoute, constructor(private route: ActivatedRoute,
private htmlService: HtmlProjectReportService, private htmlService: HtmlProjectReportService,
@ -71,6 +81,7 @@ export class HtmlProjectReportComponent{
private _meta: Meta, private _meta: Meta,
private _title: Title, private _title: Title,
private _router: Router, private _router: Router,
private helper: HelperService,
private seoService: SEOService) { private seoService: SEOService) {
} }
@ -78,6 +89,8 @@ export class HtmlProjectReportComponent{
this.route.data this.route.data
.subscribe((data: { envSpecific: EnvProperties }) => { .subscribe((data: { envSpecific: EnvProperties }) => {
this.properties = data.envSpecific; this.properties = data.envSpecific;
//this.getDivContents();
this.getPageContents();
this.updateUrl(data.envSpecific.baseLink + this._router.url); this.updateUrl(data.envSpecific.baseLink + this._router.url);
this.seoService.createLinkForCanonicalURL(this.properties.baseLink + this._router.url); this.seoService.createLinkForCanonicalURL(this.properties.baseLink + this._router.url);
@ -126,6 +139,18 @@ export class HtmlProjectReportComponent{
}); });
} }
private getPageContents() {
this.helper.getPageHelpContents(this._router.url, this.properties, this.communityId).subscribe(contents => {
this.pageContents = contents;
})
}
private getDivContents() {
this.helper.getDivHelpContents(this._router.url, this.properties, this.communityId).subscribe(contents => {
this.divContents = contents;
})
}
ngOnDestroy() { ngOnDestroy() {
this.sub.unsubscribe(); this.sub.unsubscribe();
if (this.piwiksub) { if (this.piwiksub) {
@ -262,12 +287,14 @@ export class HtmlProjectReportComponent{
this._meta.updateTag({content: description}, "name='description'"); this._meta.updateTag({content: description}, "name='description'");
this._meta.updateTag({content: description}, "property='og:description'"); this._meta.updateTag({content: description}, "property='og:description'");
} }
private updateTitle(title: string) { private updateTitle(title: string) {
var _prefix = "OpenAIRE | "; var _prefix = "OpenAIRE | ";
var _title = _prefix + ((title.length > 50) ? title.substring(0, 50) : title); var _title = _prefix + ((title.length > 50) ? title.substring(0, 50) : title);
this._title.setTitle(_title); this._title.setTitle(_title);
this._meta.updateTag({content: _title}, "property='og:title'"); this._meta.updateTag({content: _title}, "property='og:title'");
} }
private updateUrl(url: string) { private updateUrl(url: string) {
this._meta.updateTag({content: url}, "property='og:url'"); this._meta.updateTag({content: url}, "property='og:url'");
} }

View File

@ -11,10 +11,13 @@ import {HtmlProjectReportComponent} from './htmlProjectReport.component';
import {FreeGuard} from'../../login/freeGuard.guard'; import {FreeGuard} from'../../login/freeGuard.guard';
import {PiwikServiceModule} from '../../utils/piwik/piwikService.module'; import {PiwikServiceModule} from '../../utils/piwik/piwikService.module';
import { SEOServiceModule } from '../../sharedComponents/SEO/SEOService.module'; import { SEOServiceModule } from '../../sharedComponents/SEO/SEOService.module';
import {HelperModule} from "../../utils/helper/helper.module";
import {RouterModule} from '@angular/router';
@NgModule({ @NgModule({
imports: [ imports: [
CommonModule, FormsModule, ProjectServiceModule,PiwikServiceModule, SEOServiceModule CommonModule, FormsModule, ProjectServiceModule, PiwikServiceModule, SEOServiceModule, HelperModule,
RouterModule
], ],
declarations: [ declarations: [
HtmlProjectReportComponent HtmlProjectReportComponent

View File

@ -3,22 +3,33 @@
<div class="tm-main uk-width-1-1@s uk-width-1-1@m uk-width-1-1@l uk-row-first "> <div class="tm-main uk-width-1-1@s uk-width-1-1@m uk-width-1-1@l uk-row-first ">
<div class="uk-container uk-margin-top organization"> <div class="uk-container uk-margin-top organization">
<div *ngIf="warningMessage.length > 0" class="uk-alert uk-alert-warning uk-margin-large-top" role="alert">{{warningMessage}}</div> <div *ngIf="warningMessage.length > 0" class="uk-alert uk-alert-warning uk-margin-large-top"
<div *ngIf="errorMessage.length > 0" class="uk-alert uk-alert-danger uk-margin-large-top" role="alert">{{errorMessage}}</div> role="alert">{{warningMessage}}</div>
<div [style.display]="showLoading ? 'inline' : 'none'"class="uk-animation-fade uk-margin-large-top uk-width-1-1" role="alert"><span class="loading-gif uk-align-center" ></span></div> <div *ngIf="errorMessage.length > 0" class="uk-alert uk-alert-danger uk-margin-large-top"
role="alert">{{errorMessage}}</div>
<div [style.display]="showLoading ? 'inline' : 'none'"
class="uk-animation-fade uk-margin-large-top uk-width-1-1" role="alert"><span
class="loading-gif uk-align-center"></span></div>
<div *ngIf="organizationInfo != null" uk-grid class="uk-grid-large"> <div *ngIf="organizationInfo != null" uk-grid class="uk-grid-large">
<helper *ngIf="pageContents && pageContents['top'] && pageContents['top'].length > 0"
[texts]="pageContents['top']" styleName="uk-width-1-1"></helper>
<div class="uk-width-expand@m uk-width-1-1@s"> <div class="uk-width-expand@m uk-width-1-1@s">
<schema2jsonld *ngIf="organizationInfo" [data]=organizationInfo [URL]="properties.baseLink+'/search/organization?organizationId='+organizationId" type="organization"></schema2jsonld> <schema2jsonld *ngIf="organizationInfo" [data]=organizationInfo
[URL]="properties.baseLink+'/search/organization?organizationId='+organizationId"
type="organization"></schema2jsonld>
<showTitle [title]="organizationInfo.title"></showTitle> <showTitle [title]="organizationInfo.title"></showTitle>
<div class="uk-text-large " *ngIf="organizationInfo.title.name && organizationInfo.title.name != organizationInfo.name ">{{organizationInfo.name}}</div> <div class="uk-text-large "
*ngIf="organizationInfo.title.name && organizationInfo.title.name != organizationInfo.name ">{{organizationInfo.name}}</div>
<span class="uk-label custom-label label-blue label-organization" title="Type">Organization</span>{{" "}} <span class="uk-label custom-label label-blue label-organization" title="Type">Organization</span>{{" "}}
<span *ngIf="organizationInfo.country" class="uk-label custom-label label-country " title="Country">{{organizationInfo.country}}</span>{{" "}} <span *ngIf="organizationInfo.country" class="uk-label custom-label label-country "
title="Country">{{organizationInfo.country}}</span>{{" "}}
<ul class="custom-accordion" uk-accordion> <ul class="custom-accordion" uk-accordion>
<li *ngIf="fetchPublications.searchUtils.totalResults > 0" (click)="activeTab='Publications'; searchPublicationsInit()"> <li *ngIf="fetchPublications.searchUtils.totalResults > 0"
(click)="activeTab='Publications'; searchPublicationsInit()">
<a class="uk-accordion-title" href="#"> <a class="uk-accordion-title" href="#">
Publications Publications
<!-- <span class="uk-badge uk-badge-notification"> --> <!-- <span class="uk-badge uk-badge-notification"> -->
@ -26,12 +37,14 @@
<!-- </span> --> <!-- </span> -->
</a> </a>
<div class="uk-accordion-content"> <div class="uk-accordion-content">
<errorMessages [status]="[fetchPublications.searchUtils.status]" [type]="'publications'" tab_error_class=true></errorMessages> <errorMessages [status]="[fetchPublications.searchUtils.status]" [type]="'publications'"
tab_error_class=true></errorMessages>
<div *ngIf="fetchPublications.searchUtils.status == errorCodes.DONE"> <div *ngIf="fetchPublications.searchUtils.status == errorCodes.DONE">
<div class="uk-text-right" *ngIf="fetchPublications.searchUtils.totalResults > 10"> <div class="uk-text-right" *ngIf="fetchPublications.searchUtils.totalResults > 10">
<a [queryParams]="routerHelper.createQueryParams(['organization', 'og'], [organizationId, 'and'])" <a [queryParams]="routerHelper.createQueryParams(['organization', 'og'], [organizationId, 'and'])"
routerLinkActive="router-link-active" [routerLink]="linkToSearchPublications" class="uk-button uk-button-text"> routerLinkActive="router-link-active" [routerLink]="linkToSearchPublications"
class="uk-button uk-button-text">
View all {{fetchPublications.searchUtils.totalResults | number}} results View all {{fetchPublications.searchUtils.totalResults | number}} results
</a> </a>
</div> </div>
@ -76,7 +89,9 @@
<!-- </span> --> <!-- </span> -->
</a> </a>
<div class="uk-accordion-content"> <div class="uk-accordion-content">
<searchingProjectsTab *ngIf="projectsClicked" [(fetchProjects)]="fetchProjects" [organizationId]="organizationId" [(properties)]=properties></searchingProjectsTab> <searchingProjectsTab *ngIf="projectsClicked" [(fetchProjects)]="fetchProjects"
[organizationId]="organizationId"
[(properties)]=properties></searchingProjectsTab>
</div> </div>
</li> </li>
@ -88,13 +103,15 @@
<!-- </span> --> <!-- </span> -->
</a> </a>
<div class="uk-accordion-content"> <div class="uk-accordion-content">
<errorMessages [status]="[fetchDataproviders.searchUtils.status]" [type]="'content providers'" tab_error_class=true></errorMessages> <errorMessages [status]="[fetchDataproviders.searchUtils.status]" [type]="'content providers'"
tab_error_class=true></errorMessages>
<div *ngIf="fetchDataproviders.searchUtils.status == errorCodes.DONE"> <div *ngIf="fetchDataproviders.searchUtils.status == errorCodes.DONE">
<div class="uk-text-right" *ngIf="fetchDataproviders.searchUtils.totalResults > 10"> <div class="uk-text-right" *ngIf="fetchDataproviders.searchUtils.totalResults > 10">
<a [queryParams]="routerHelper.createQueryParams(['organization', 'og'], [organizationId, 'and'])" <a [queryParams]="routerHelper.createQueryParams(['organization', 'og'], [organizationId, 'and'])"
routerLinkActive="router-link-active" [routerLink]="linkToSearchDataproviders" class="uk-button uk-button-text"> routerLinkActive="router-link-active" [routerLink]="linkToSearchDataproviders"
class="uk-button uk-button-text">
View all {{fetchDataproviders.searchUtils.totalResults | number}} results View all {{fetchDataproviders.searchUtils.totalResults | number}} results
</a> </a>
</div> </div>
@ -111,9 +128,12 @@
<div class="uk-width-large@m uk-width-1-1@s"> <div class="uk-width-large@m uk-width-1-1@s">
<div class="uk-card uk-card-default uk-padding-small"> <div class="uk-card uk-card-default uk-padding-small">
<div> <div>
Share - Bookmark<addThis ></addThis> Share - Bookmark
<addThis></addThis>
</div> </div>
<div *ngIf="fetchPublications.searchUtils.totalResults > 0 || (fetchProjects && fetchProjects.funders.length > 0)" class="uk-margin-medium-top uk-margin-medium-bottom"> <div
*ngIf="fetchPublications.searchUtils.totalResults > 0 || (fetchProjects && fetchProjects.funders.length > 0)"
class="uk-margin-medium-top uk-margin-medium-bottom">
<div class="uk-text-center uk-text-large"> <div class="uk-text-center uk-text-large">
Application Box Application Box
</div> </div>
@ -125,16 +145,28 @@
<!--a href="{{downloadURLAPI}}resources?size={{organizationInfo.projects.get(key).length}}&{{csvProjectParamsHead}}{{organizationInfo.projects.get(key)[0]['funderId']}}{{csvParamsTail}}"> <!--a href="{{downloadURLAPI}}resources?size={{organizationInfo.projects.get(key).length}}&{{csvProjectParamsHead}}{{organizationInfo.projects.get(key)[0]['funderId']}}{{csvParamsTail}}">
Download projects report (CSV) for {{key}} Download projects report (CSV) for {{key}}
</a--> </a-->
<a class="clickable" (click)="downloadFile(downloadURLAPI+'?'+csvProjectParamsHead+encodeURI(funder.id)+csvParamsTail, 'funder-projects-report')"> <a class="clickable"
(click)="downloadFile(downloadURLAPI+'?'+csvProjectParamsHead+encodeURI(funder.id)+csvParamsTail, 'funder-projects-report')">
<!--span class="clickable" (click)="downloadProjectsFile(downloadURLAPI+'organizations/'+organizationId+'/projects?fq=(funderid exact '+funder.id+')&size='+funder.number)"--> <!--span class="clickable" (click)="downloadProjectsFile(downloadURLAPI+'organizations/'+organizationId+'/projects?fq=(funderid exact '+funder.id+')&size='+funder.number)"-->
<span class="uk-icon"><svg width="20" height="20" viewBox="0 0 20 20" xmlns="http://www.w3.org/2000/svg" icon="download" ratio="1"><polyline fill="none" stroke="#000" points="14,10 9.5,14.5 5,10"></polyline><rect x="3" y="17" width="13" height="1"></rect><line fill="none" stroke="#000" x1="9.5" y1="13.91" x2="9.5" y2="3"></line></svg></span> <span class="uk-icon"><svg width="20" height="20" viewBox="0 0 20 20"
xmlns="http://www.w3.org/2000/svg" icon="download" ratio="1"><polyline
fill="none" stroke="#000" points="14,10 9.5,14.5 5,10"></polyline><rect x="3" y="17"
width="13"
height="1"></rect><line
fill="none" stroke="#000" x1="9.5" y1="13.91" x2="9.5" y2="3"></line></svg></span>
<span class="uk-icon-download"> Project list for {{funder.name}} (CSV)</span> <span class="uk-icon-download"> Project list for {{funder.name}} (CSV)</span>
</a> </a>
</li> </li>
<li *ngFor="let funder of fetchProjects.funders"> <li *ngFor="let funder of fetchProjects.funders">
<a class="clickable" (click)="confirmOpenApplyAll(funder.name,encodeURI(funder.id), funder.number)"> <a class="clickable"
<span class="uk-icon"><svg width="20" height="20" viewBox="0 0 20 20" xmlns="http://www.w3.org/2000/svg" icon="download" ratio="1"><polyline fill="none" stroke="#000" points="14,10 9.5,14.5 5,10"></polyline><rect x="3" y="17" width="13" height="1"></rect><line fill="none" stroke="#000" x1="9.5" y1="13.91" x2="9.5" y2="3"></line></svg></span> (click)="confirmOpenApplyAll(funder.name,encodeURI(funder.id), funder.number)">
<span class="uk-icon"><svg width="20" height="20" viewBox="0 0 20 20"
xmlns="http://www.w3.org/2000/svg" icon="download" ratio="1"><polyline
fill="none" stroke="#000" points="14,10 9.5,14.5 5,10"></polyline><rect x="3" y="17"
width="13"
height="1"></rect><line
fill="none" stroke="#000" x1="9.5" y1="13.91" x2="9.5" y2="3"></line></svg></span>
<span class="uk-icon-download"> Project Publications for {{funder.name}} (CSV)</span> <span class="uk-icon-download"> Project Publications for {{funder.name}} (CSV)</span>
</a> </a>
</li> </li>
@ -143,8 +175,14 @@
<!-- url = this.downloadURLAPI+"format=csv-special&type=publications&fq=(((oaftype exact result) and (resulttypeid exact publication)) and (relprojectid exact '"+projects[index].id+"'))"--> <!-- url = this.downloadURLAPI+"format=csv-special&type=publications&fq=(((oaftype exact result) and (resulttypeid exact publication)) and (relprojectid exact '"+projects[index].id+"'))"-->
<!-- <a class="clickable" (click)="downloadFile(downloadURLAPI+'/organizations/'+organizationId+'?type=publications&format=csv')"> --> <!-- <a class="clickable" (click)="downloadFile(downloadURLAPI+'/organizations/'+organizationId+'?type=publications&format=csv')"> -->
<a class="clickable" (click)="downloadFile(csvAffiliatedPublications, 'organization-publications-report')"> <a class="clickable"
<span class="uk-icon"><svg width="20" height="20" viewBox="0 0 20 20" xmlns="http://www.w3.org/2000/svg" icon="download" ratio="1"><polyline fill="none" stroke="#000" points="14,10 9.5,14.5 5,10"></polyline><rect x="3" y="17" width="13" height="1"></rect><line fill="none" stroke="#000" x1="9.5" y1="13.91" x2="9.5" y2="3"></line></svg></span> (click)="downloadFile(csvAffiliatedPublications, 'organization-publications-report')">
<span class="uk-icon"><svg width="20" height="20" viewBox="0 0 20 20"
xmlns="http://www.w3.org/2000/svg" icon="download" ratio="1"><polyline
fill="none" stroke="#000" points="14,10 9.5,14.5 5,10"></polyline><rect x="3" y="17"
width="13"
height="1"></rect><line
fill="none" stroke="#000" x1="9.5" y1="13.91" x2="9.5" y2="3"></line></svg></span>
<span class="uk-icon-download"> Publications of organization (CSV) - based on the affiliation information.</span> <span class="uk-icon-download"> Publications of organization (CSV) - based on the affiliation information.</span>
</a> </a>
</li> </li>
@ -154,6 +192,8 @@
</div> </div>
</div> </div>
<helper *ngIf="pageContents && pageContents['bottom'] && pageContents['bottom'].length > 0"
[texts]="pageContents['bottom']" styleName="uk-width-1-1"></helper>
</div> </div>
<modal-loading></modal-loading> <modal-loading></modal-loading>
<modal-alert #AlertModalApplyAll (alertOutput)="confirmCloseApplyAll($event)"></modal-alert> <modal-alert #AlertModalApplyAll (alertOutput)="confirmCloseApplyAll($event)"></modal-alert>

View File

@ -1,9 +1,6 @@
import {Component, ViewChild} from '@angular/core'; import {Component, ElementRef, Input, ViewChild} from '@angular/core';
import {ElementRef, Input} from '@angular/core';
import {ActivatedRoute, Router} from '@angular/router'; import {ActivatedRoute, Router} from '@angular/router';
import {Title, Meta} from '@angular/platform-browser'; import {Meta, Title} from '@angular/platform-browser';
import {Observable, Subject} from 'rxjs';
import {OrganizationService} from '../../services/organization.service'; import {OrganizationService} from '../../services/organization.service';
import {OrganizationInfo} from '../../utils/entities/organizationInfo'; import {OrganizationInfo} from '../../utils/entities/organizationInfo';
@ -21,12 +18,12 @@ import {SearchingProjectsTabComponent} from '../landing-utils/searchingProjects
import {RouterHelper} from '../../utils/routerHelper.class'; import {RouterHelper} from '../../utils/routerHelper.class';
import {ModalLoading} from '../../utils/modal/loading.component'; import {ModalLoading} from '../../utils/modal/loading.component';
import {AlertModal} from '../../utils/modal/alert';
import {PiwikService} from '../../utils/piwik/piwik.service'; import {PiwikService} from '../../utils/piwik/piwik.service';
import {StringUtils} from '../../utils/string-utils.class'; import {StringUtils} from '../../utils/string-utils.class';
import {EnvProperties} from '../../utils/properties/env-properties'; import {EnvProperties} from '../../utils/properties/env-properties';
import {SEOService} from '../../sharedComponents/SEO/SEO.service'; import {SEOService} from '../../sharedComponents/SEO/SEO.service';
import {HelperFunctions} from "../../utils/HelperFunctions.class"; import {HelperFunctions} from "../../utils/HelperFunctions.class";
import {HelperService} from "../../utils/helper/helper.service";
@Component({ @Component({
selector: 'organization', selector: 'organization',
@ -35,6 +32,8 @@ import {HelperFunctions} from "../../utils/HelperFunctions.class";
export class OrganizationComponent { export class OrganizationComponent {
@Input() piwikSiteId = null; @Input() piwikSiteId = null;
@Input() communityId = null;
public organizationInfo: OrganizationInfo; public organizationInfo: OrganizationInfo;
public organizationId: string; public organizationId: string;
@ -75,6 +74,8 @@ export class OrganizationComponent {
public routerHelper: RouterHelper = new RouterHelper(); public routerHelper: RouterHelper = new RouterHelper();
public errorCodes: ErrorCodes = new ErrorCodes(); public errorCodes: ErrorCodes = new ErrorCodes();
public pageContents = null;
public divContents = null;
//private projectsNum: number = 0; //private projectsNum: number = 0;
//private fundersSet: Set<string>; //private fundersSet: Set<string>;
@ -98,6 +99,7 @@ export class OrganizationComponent {
countPublSub: any; countPublSub: any;
downloadProjectPublSub: any; downloadProjectPublSub: any;
properties: EnvProperties; properties: EnvProperties;
//private ngUnsubscribe: Subject<void> = new Subject<void>(); //private ngUnsubscribe: Subject<void> = new Subject<void>();
constructor(private element: ElementRef, constructor(private element: ElementRef,
@ -112,6 +114,7 @@ export class OrganizationComponent {
private _meta: Meta, private _meta: Meta,
private _title: Title, private _title: Title,
private _router: Router, private _router: Router,
private helper: HelperService,
private seoService: SEOService) { private seoService: SEOService) {
this.fetchPublications = new FetchPublications(this._searchPublicationsService); this.fetchPublications = new FetchPublications(this._searchPublicationsService);
@ -124,6 +127,8 @@ export class OrganizationComponent {
this.route.data this.route.data
.subscribe((data: { envSpecific: EnvProperties }) => { .subscribe((data: { envSpecific: EnvProperties }) => {
this.properties = data.envSpecific; this.properties = data.envSpecific;
//this.getDivContents();
this.getPageContents();
this.updateUrl(data.envSpecific.baseLink + this._router.url); this.updateUrl(data.envSpecific.baseLink + this._router.url);
}); });
this.sub = this.route.queryParams.subscribe(params => { this.sub = this.route.queryParams.subscribe(params => {
@ -153,6 +158,18 @@ export class OrganizationComponent {
//this.csvPublicationParamsHead = 'format=csv-special&type=publications&page=0&query=((((oaftype exact result) and (resulttypeid exact publication)) and (funderid exact '; //this.csvPublicationParamsHead = 'format=csv-special&type=publications&page=0&query=((((oaftype exact result) and (resulttypeid exact publication)) and (funderid exact ';
} }
private getPageContents() {
this.helper.getPageHelpContents(this._router.url, this.properties, this.communityId).subscribe(contents => {
this.pageContents = contents;
})
}
private getDivContents() {
this.helper.getDivHelpContents(this._router.url, this.properties, this.communityId).subscribe(contents => {
this.divContents = contents;
})
}
ngOnDestroy() { ngOnDestroy() {
if (this.sub) { if (this.sub) {
@ -365,13 +382,11 @@ export class OrganizationComponent {
let filename: string = 'funder-project-publications-report'; let filename: string = 'funder-project-publications-report';
this.countProjectsSub = this._searchProjectsService.getProjectsForOrganizations(this.organizationId, ' and (funder exact "' + funderId + '" ) ', 1, count, [], this.properties).subscribe( this.countProjectsSub = this._searchProjectsService.getProjectsForOrganizations(this.organizationId, ' and (funder exact "' + funderId + '" ) ', 1, count, [], this.properties).subscribe(
data => data => {
{
projects = data[1]; projects = data[1];
for (let index = 0; index < projects.length; index++) { for (let index = 0; index < projects.length; index++) {
this.countPublSub = this._searchPublicationsService.numOfEntityPublications(projects[index].id, "project", this.properties).subscribe( this.countPublSub = this._searchPublicationsService.numOfEntityPublications(projects[index].id, "project", this.properties).subscribe(
data => data => {
{
//if(data == 0 && title) { // if no publications for this project //if(data == 0 && title) { // if no publications for this project
if (data == 0 && (counter > 1 || title)) { // if no publications for this project if (data == 0 && (counter > 1 || title)) { // if no publications for this project
counter--; counter--;
@ -413,8 +428,7 @@ export class OrganizationComponent {
title = true; title = true;
this.downloadProjectPublSub = this._reportsService.getCSVResponse(url).subscribe( this.downloadProjectPublSub = this._reportsService.getCSVResponse(url).subscribe(
data => data => {
{
counter--; counter--;
response[index] = data; response[index] = data;
//console.info("index: "+index, "counter: "+counter, "id:"+projects[index].id, response[index]); //console.info("index: "+index, "counter: "+counter, "id:"+projects[index].id, response[index]);
@ -471,12 +485,14 @@ export class OrganizationComponent {
this._meta.updateTag({content: description}, "name='description'"); this._meta.updateTag({content: description}, "name='description'");
this._meta.updateTag({content: description}, "property='og:description'"); this._meta.updateTag({content: description}, "property='og:description'");
} }
private updateTitle(title: string) { private updateTitle(title: string) {
var _prefix = "OpenAIRE | "; var _prefix = "OpenAIRE | ";
var _title = _prefix + ((title.length > 50) ? title.substring(0, 50) : title); var _title = _prefix + ((title.length > 50) ? title.substring(0, 50) : title);
this._title.setTitle(_title); this._title.setTitle(_title);
this._meta.updateTag({content: _title}, "property='og:title'"); this._meta.updateTag({content: _title}, "property='og:title'");
} }
private updateUrl(url: string) { private updateUrl(url: string) {
this._meta.updateTag({content: url}, "property='og:url'"); this._meta.updateTag({content: url}, "property='og:url'");
} }
@ -486,11 +502,13 @@ export class OrganizationComponent {
this.loading.open(); this.loading.open();
} }
} }
private closeLoading() { private closeLoading() {
if (this.loading) { if (this.loading) {
this.loading.close(); this.loading.close();
} }
} }
private setMessageLoading(message: string) { private setMessageLoading(message: string) {
if (this.loading) { if (this.loading) {
this.loading.message = message; this.loading.message = message;
@ -510,6 +528,7 @@ export class OrganizationComponent {
this.funderId = funderId; this.funderId = funderId;
this.funderCountPublications = funderCountPublications; this.funderCountPublications = funderCountPublications;
} }
public confirmCloseApplyAll(data) { public confirmCloseApplyAll(data) {
this.downloadPublicationsFile(this.funder, this.funderId, this.funderCountPublications); this.downloadPublicationsFile(this.funder, this.funderId, this.funderCountPublications);
} }

View File

@ -10,8 +10,6 @@ import {ErrorMessagesModule} from '../../utils/errorMessages.module';
import {OrganizationServiceModule} from '../../services/organizationService.module'; import {OrganizationServiceModule} from '../../services/organizationService.module';
// import { ProjectsServiceModule} from '../../services/projectsService.module'; // import { ProjectsServiceModule} from '../../services/projectsService.module';
import {OrganizationComponent} from './organization.component'; import {OrganizationComponent} from './organization.component';
// import { OrganizationRoutingModule } from './organization-routing.module';
import {LandingModule} from '../landing-utils/landing.module'; import {LandingModule} from '../landing-utils/landing.module';
import {TabResultModule} from '../../searchPages/searchUtils/tabResult.module'; import {TabResultModule} from '../../searchPages/searchUtils/tabResult.module';
import {DataProvidersServiceModule} from '../../services/dataProvidersService.module'; import {DataProvidersServiceModule} from '../../services/dataProvidersService.module';
@ -25,6 +23,8 @@ import {FreeGuard} from'../../login/freeGuard.guard';
import {IsRouteEnabled} from '../../error/isRouteEnabled.guard'; import {IsRouteEnabled} from '../../error/isRouteEnabled.guard';
import {Schema2jsonldModule} from '../../sharedComponents/schema2jsonld/schema2jsonld.module'; import {Schema2jsonldModule} from '../../sharedComponents/schema2jsonld/schema2jsonld.module';
import {SEOServiceModule} from '../../sharedComponents/SEO/SEOService.module'; import {SEOServiceModule} from '../../sharedComponents/SEO/SEOService.module';
import {HelperModule} from "../../utils/helper/helper.module";
@NgModule({ @NgModule({
imports: [ imports: [
@ -38,9 +38,8 @@ import { SEOServiceModule } from '../../sharedComponents/SEO/SEOService.module';
SearchingProjectsTabModule, SearchingProjectsTabModule,
OrganizationServiceModule, OrganizationServiceModule,
PublicationsServiceModule, PublicationsServiceModule,
// DatasetsServiceModule,
ProjectsServiceModule, ProjectsServiceModule,
Schema2jsonldModule, SEOServiceModule Schema2jsonldModule, SEOServiceModule, HelperModule
], ],
declarations: [ declarations: [
@ -53,4 +52,5 @@ import { SEOServiceModule } from '../../sharedComponents/SEO/SEOService.module';
OrganizationComponent OrganizationComponent
] ]
}) })
export class OrganizationModule { } export class OrganizationModule {
}

View File

@ -2,18 +2,31 @@
<div uk-grid uk-grid> <div uk-grid uk-grid>
<div class="tm-main uk-width-1-1@s uk-width-1-1@m uk-width-1-1@l uk-row-first"> <div class="tm-main uk-width-1-1@s uk-width-1-1@m uk-width-1-1@l uk-row-first">
<div class="uk-container uk-margin-top orp"> <div class="uk-container uk-margin-top orp">
<div *ngIf="warningMessage.length > 0" class="uk-alert uk-alert-warning uk-margin-large-top" role="alert">{{warningMessage}}</div> <div *ngIf="warningMessage.length > 0" class="uk-alert uk-alert-warning uk-margin-large-top"
<div *ngIf="errorMessage.length > 0" class="uk-alert uk-alert-danger uk-margin-large-top" role="alert">{{errorMessage}}</div> role="alert">{{warningMessage}}</div>
<div [style.display]="showLoading ? 'inline' : 'none'" class="uk-animation-fade uk-margin-large-top uk-width-1-1" role="alert"><span class="loading-gif uk-align-center" ></span></div> <div *ngIf="errorMessage.length > 0" class="uk-alert uk-alert-danger uk-margin-large-top"
role="alert">{{errorMessage}}</div>
<div [style.display]="showLoading ? 'inline' : 'none'"
class="uk-animation-fade uk-margin-large-top uk-width-1-1" role="alert"><span
class="loading-gif uk-align-center"></span></div>
<div *ngIf="orpInfo != null" uk-grid class="uk-grid-large"> <div *ngIf="orpInfo != null" uk-grid class="uk-grid-large">
<helper *ngIf="pageContents && pageContents['top'] && pageContents['top'].length > 0"
[texts]="pageContents['top']" styleName="uk-width-1-1"></helper>
<div class="uk-width-expand@m uk-width-1-1@s"> <div class="uk-width-expand@m uk-width-1-1@s">
<schema2jsonld *ngIf="orpInfo.record" [data]=orpInfo.record [URL]="properties.baseLink+'/search/orp?orpId='+orpId"></schema2jsonld> <schema2jsonld *ngIf="orpInfo.record" [data]=orpInfo.record
[URL]="properties.baseLink+'/search/orp?orpId='+orpId"></schema2jsonld>
<showTitle [titleName]="orpInfo.title"></showTitle> <showTitle [titleName]="orpInfo.title"></showTitle>
<span *ngIf="orpInfo.types && orpInfo.types.length > 0"class="uk-label custom-label label-orp " title="Type">{{orpInfo.types.join(", ")}}</span>{{" "}} <span *ngIf="orpInfo.types && orpInfo.types.length > 0" class="uk-label custom-label label-orp "
<span *ngIf="orpInfo.languages && orpInfo.languages.length > 0" class="uk-label custom-label label-language " title="Language">{{orpInfo.languages.join(", ")}}</span>{{" "}} title="Type">{{orpInfo.types.join(", ")}}</span>{{" "}}
<span *ngIf="orpInfo.countries && orpInfo.countries.length > 0" class="uk-label custom-label label-country " title="Country">{{orpInfo.countries.join(", ")}}</span>{{" "}} <span *ngIf="orpInfo.languages && orpInfo.languages.length > 0"
<span *ngIf="orpInfo.accessMode" [class]="'uk-label custom-label label-'+ orpInfo.accessMode " title="Access Mode">{{orpInfo.accessMode}}</span>{{" "}} class="uk-label custom-label label-language "
title="Language">{{orpInfo.languages.join(", ")}}</span>{{" "}}
<span *ngIf="orpInfo.countries && orpInfo.countries.length > 0"
class="uk-label custom-label label-country "
title="Country">{{orpInfo.countries.join(", ")}}</span>{{" "}}
<span *ngIf="orpInfo.accessMode" [class]="'uk-label custom-label label-'+ orpInfo.accessMode "
title="Access Mode">{{orpInfo.accessMode}}</span>{{" "}}
<span *ngIf="orpInfo.underCurationMessage" class="uk-label custom-label label-underCuration"> <span *ngIf="orpInfo.underCurationMessage" class="uk-label custom-label label-underCuration">
<span uk-tooltip="pos:right; delay:10" <span uk-tooltip="pos:right; delay:10"
title="{{buildCurationTooltip()}}"> title="{{buildCurationTooltip()}}">
@ -30,7 +43,8 @@
<ul class="uk-list"> <ul class="uk-list">
<showPublisher [publisher]="orpInfo.publisher" <showPublisher [publisher]="orpInfo.publisher"
[journal]="orpInfo.journal" [properties]="properties"></showPublisher> [journal]="orpInfo.journal" [properties]="properties"></showPublisher>
<li *ngIf="orpInfo.embargoEndDate"><span class="uk-text-bold">Embargo end date:</span> {{orpInfo.embargoEndDate}}</li> <li *ngIf="orpInfo.embargoEndDate"><span
class="uk-text-bold">Embargo end date:</span> {{orpInfo.embargoEndDate}}</li>
<li *ngIf="orpInfo.identifiers && orpInfo.identifiers.size > 0"> <li *ngIf="orpInfo.identifiers && orpInfo.identifiers.size > 0">
<showIdentifiers [identifiers]="orpInfo.identifiers"></showIdentifiers> <showIdentifiers [identifiers]="orpInfo.identifiers"></showIdentifiers>
</li> </li>
@ -42,16 +56,21 @@
</li> </li>
</ul> </ul>
<hr *ngIf="orpInfo.description"> <hr *ngIf="orpInfo.description">
<div *ngIf="orpInfo.description" class="uk-text-justify descriptionText uk-height-max-medium uk-overflow-auto"> <div *ngIf="orpInfo.description"
class="uk-text-justify descriptionText uk-height-max-medium uk-overflow-auto">
<span>{{orpInfo.description.substring(0, showNumDescription)}}</span <span>{{orpInfo.description.substring(0, showNumDescription)}}</span
><span *ngIf="showNumDescription == thresholdDescription && orpInfo.description.length > thresholdDescription">...</span ><span
><span *ngIf="showNumDescription == thresholdDescription && orpInfo.description.length > thresholdDescription" class="uk-text-right"> *ngIf="showNumDescription == thresholdDescription && orpInfo.description.length > thresholdDescription">...</span
><span
*ngIf="showNumDescription == thresholdDescription && orpInfo.description.length > thresholdDescription"
class="uk-text-right">
<a (click)="showNumDescription = orpInfo.description.length;"> <a (click)="showNumDescription = orpInfo.description.length;">
View more View more
</a> </a>
</span> </span>
</div> </div>
<div *ngIf="orpInfo.description && showNumDescription > thresholdDescription" class="uk-width-1-1 uk-text-right"> <div *ngIf="orpInfo.description && showNumDescription > thresholdDescription"
class="uk-width-1-1 uk-text-right">
<a (click)="showNumDescription = thresholdDescription;"> <a (click)="showNumDescription = thresholdDescription;">
View less View less
</a> </a>
@ -65,11 +84,16 @@
<div class="uk-accordion-content"> <div class="uk-accordion-content">
<div> <div>
<div *ngIf="orpInfo.references.length > pageSize" class="uk-margin-bottom"> <div *ngIf="orpInfo.references.length > pageSize" class="uk-margin-bottom">
<span class="uk-h6">{{orpInfo.references.length | number}} references, page {{referencesPage | number}} of {{totalPages(orpInfo.references.length) | number}}</span> <span class="uk-h6">{{orpInfo.references.length | number}}
<paging-no-load class="uk-float-right" [currentPage]="referencesPage" [totalResults]="orpInfo.references.length" [size]="pageSize" (pageChange)="updateReferencesPage($event)"></paging-no-load> references, page {{referencesPage | number}}
of {{totalPages(orpInfo.references.length) | number}}</span>
<paging-no-load class="uk-float-right" [currentPage]="referencesPage"
[totalResults]="orpInfo.references.length" [size]="pageSize"
(pageChange)="updateReferencesPage($event)"></paging-no-load>
</div> </div>
<div *ngFor="let item of orpInfo.references.slice((referencesPage-1)*pageSize, referencesPage*pageSize)"> <div
*ngFor="let item of orpInfo.references.slice((referencesPage-1)*pageSize, referencesPage*pageSize)">
<p *ngIf=" item && item['url']" <p *ngIf=" item && item['url']"
class="custom-external custom-icon"> class="custom-external custom-icon">
<a href="{{item['url']}}" target="_blank"> <a href="{{item['url']}}" target="_blank">
@ -95,7 +119,8 @@
<div> <div>
<div *ngFor="let provenanceaction of getKeys(orpInfo.relatedResearchResults)"> <div *ngFor="let provenanceaction of getKeys(orpInfo.relatedResearchResults)">
<div class="uk-text-large">{{provenanceaction}}</div> <div class="uk-text-large">{{provenanceaction}}</div>
<tabTable [percentageName]="trust" [info]="orpInfo.relatedResearchResults.get(provenanceaction)" [(properties)]=properties></tabTable> <tabTable [percentageName]="trust" [info]="orpInfo.relatedResearchResults.get(provenanceaction)"
[(properties)]=properties></tabTable>
</div> </div>
</div> </div>
</div> </div>
@ -110,7 +135,8 @@
</a> </a>
<div class="uk-accordion-content"> <div class="uk-accordion-content">
<div> <div>
<tabTable [percentageName]="similarity" [info]="orpInfo.similarResearchResults" [(properties)]=properties></tabTable> <tabTable [percentageName]="similarity" [info]="orpInfo.similarResearchResults"
[(properties)]=properties></tabTable>
</div> </div>
</div> </div>
</li> </li>
@ -132,13 +158,15 @@
</i-frame> </i-frame>
</div> </div>
</li> </li>
<li (click)="activeTab='Other Versions'" *ngIf="properties.environment == 'development' && orpInfo.deletedByInferenceIds"> <li (click)="activeTab='Other Versions'"
*ngIf="properties.environment == 'development' && orpInfo.deletedByInferenceIds">
<a class="uk-accordion-title" href="#"> <a class="uk-accordion-title" href="#">
Other Versions Other Versions
({{orpInfo.deletedByInferenceIds.length | number}}) ({{orpInfo.deletedByInferenceIds.length | number}})
</a> </a>
<div *ngIf="activeTab=='Other Versions'" class="uk-accordion-content"> <div *ngIf="activeTab=='Other Versions'" class="uk-accordion-content">
<deletedByInference [id]="orpId" [ids]="orpInfo.deletedByInferenceIds" [type]="'other research products'"></deletedByInference> <deletedByInference [id]="orpId" [ids]="orpInfo.deletedByInferenceIds"
[type]="'other research products'"></deletedByInference>
</div> </div>
</li> </li>
</ul> </ul>
@ -188,37 +216,65 @@
</li> </li>
</ul> </ul>
<button *ngIf="isRouteAvailable('participate/direct-claim') " class=" uk-button portal-button uk-width-1-1 "> <button *ngIf="isRouteAvailable('participate/direct-claim') "
class=" uk-button portal-button uk-width-1-1 ">
<span class="uk-icon"> <span class="uk-icon">
<svg icon="link" ratio="1" xmlns="http://www.w3.org/2000/svg" width="25" viewBox="0 0 20 20" height="25"><path d="M10.625,12.375 L7.525,15.475 C6.825,16.175 5.925,16.175 5.225,15.475 L4.525,14.775 C3.825,14.074 3.825,13.175 4.525,12.475 L7.625,9.375" fill="none" stroke="#000" stroke-width="1.1"></path><path d="M9.325,7.375 L12.425,4.275 C13.125,3.575 14.025,3.575 14.724,4.275 L15.425,4.975 C16.125,5.675 16.125,6.575 15.425,7.275 L12.325,10.375" fill="none" stroke="#000" stroke-width="1.1"></path><path d="M7.925,11.875 L11.925,7.975" fill="none" stroke="#000" stroke-width="1.1"></path></svg> <svg icon="link" ratio="1" xmlns="http://www.w3.org/2000/svg" width="25" viewBox="0 0 20 20"
height="25"><path
d="M10.625,12.375 L7.525,15.475 C6.825,16.175 5.925,16.175 5.225,15.475 L4.525,14.775 C3.825,14.074 3.825,13.175 4.525,12.475 L7.625,9.375"
fill="none" stroke="#000" stroke-width="1.1"></path><path
d="M9.325,7.375 L12.425,4.275 C13.125,3.575 14.025,3.575 14.724,4.275 L15.425,4.975 C16.125,5.675 16.125,6.575 15.425,7.275 L12.325,10.375"
fill="none" stroke="#000" stroke-width="1.1"></path><path d="M7.925,11.875 L11.925,7.975" fill="none"
stroke="#000"
stroke-width="1.1"></path></svg>
</span> Link this product to... </span> Link this product to...
</button> </button>
<div *ngIf="isRouteAvailable('participate/direct-claim') " uk-dropdown="pos: bottom-left; mode:click" style="background: transparent <div *ngIf="isRouteAvailable('participate/direct-claim') " uk-dropdown="pos: bottom-left; mode:click"
style="background: transparent
!important;box-shadow: none; max-width: 70px !important; min-width: 70px !important;"> !important;box-shadow: none; max-width: 70px !important; min-width: 70px !important;">
<ul class="uk-iconnav uk-iconnav-vertical"> <ul class="uk-iconnav uk-iconnav-vertical">
<li uk-tooltip="pos:right;" title="<div class='tooltip-custom-font-size '>Projects</div>"> <li uk-tooltip="pos:right;" title="<div class='tooltip-custom-font-size '>Projects</div>">
<a class=" uk-icon-button portal-button shadowBox" style="padding: 6px;" [queryParams]="routerHelper.createQueryParams(['id','type','linkTo'],[orpId,'orp','project'])" routerLinkActive="router-link-active" routerLink="/participate/direct-claim" > <a class=" uk-icon-button portal-button shadowBox" style="padding: 6px;"
[queryParams]="routerHelper.createQueryParams(['id','type','linkTo'],[orpId,'orp','project'])"
routerLinkActive="router-link-active" routerLink="/participate/direct-claim">
<span class="uk-icon"> <span class="uk-icon">
<svg width="20" height="20" viewBox="0 0 20 20" xmlns="http://www.w3.org/2000/svg" icon="album" ratio="1"><rect x="5" y="2" width="10" height="1"></rect><rect x="3" y="4" width="14" height="1"></rect><rect fill="none" stroke="#000" x="1.5" y="6.5" width="17" height="11"></rect></svg></span> <svg width="20" height="20" viewBox="0 0 20 20" xmlns="http://www.w3.org/2000/svg" icon="album"
ratio="1"><rect x="5" y="2" width="10" height="1"></rect><rect x="3" y="4" width="14"
height="1"></rect><rect
fill="none" stroke="#000" x="1.5" y="6.5" width="17" height="11"></rect></svg></span>
</a> </a>
</li> </li>
<li uk-tooltip="pos:right;" title="<div class='tooltip-custom-font-size '>Communities</div>"> <li uk-tooltip="pos:right;" title="<div class='tooltip-custom-font-size '>Communities</div>">
<a class=" uk-icon-button portal-button shadowBox" style="padding: 6px;" [queryParams]="routerHelper.createQueryParams(['id','type','linkTo'],[orpId,'orp','context'])" routerLinkActive="router-link-active" routerLink="/participate/direct-claim" > <a class=" uk-icon-button portal-button shadowBox" style="padding: 6px;"
[queryParams]="routerHelper.createQueryParams(['id','type','linkTo'],[orpId,'orp','context'])"
routerLinkActive="router-link-active" routerLink="/participate/direct-claim">
<span class="uk-icon"> <span class="uk-icon">
<svg width="20" height="20" viewBox="0 0 20 20" xmlns="http://www.w3.org/2000/svg" icon="users" ratio="1"><circle fill="none" stroke="#000" stroke-width="1.1" cx="7.7" cy="8.6" r="3.5"></circle><path fill="none" stroke="#000" stroke-width="1.1" d="M1,18.1 C1.7,14.6 4.4,12.1 7.6,12.1 C10.9,12.1 13.7,14.8 14.3,18.3"></path><path fill="none" stroke="#000" 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> <svg width="20" height="20" viewBox="0 0 20 20" xmlns="http://www.w3.org/2000/svg" icon="users"
ratio="1"><circle fill="none" stroke="#000" stroke-width="1.1" cx="7.7" cy="8.6"
r="3.5"></circle><path fill="none" stroke="#000" stroke-width="1.1"
d="M1,18.1 C1.7,14.6 4.4,12.1 7.6,12.1 C10.9,12.1 13.7,14.8 14.3,18.3"></path><path
fill="none" stroke="#000" 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>
</a> </a>
</li> </li>
<li uk-tooltip="pos:right;" title="<div class='tooltip-custom-font-size uk-margin-small'>Other research results</div>"> <li uk-tooltip="pos:right;"
<a class=" uk-icon-button portal-button shadowBox" style="padding: 6px;" [queryParams]="routerHelper.createQueryParams(['id','type','linkTo'],[orpId,'orp','result'])" routerLinkActive="router-link-active" routerLink="/participate/direct-claim" > title="<div class='tooltip-custom-font-size uk-margin-small'>Other research results</div>">
<a class=" uk-icon-button portal-button shadowBox" style="padding: 6px;"
[queryParams]="routerHelper.createQueryParams(['id','type','linkTo'],[orpId,'orp','result'])"
routerLinkActive="router-link-active" routerLink="/participate/direct-claim">
<span class="uk-icon"> <span class="uk-icon">
<svg width="20" height="20" viewBox="0 0 20 20" xmlns="http://www.w3.org/2000/svg" icon="copy" ratio="1"><rect fill="none" stroke="#000" x="3.5" y="2.5" width="12" height="16"></rect><polyline fill="none" stroke="#000" points="5 0.5 17.5 0.5 17.5 17"></polyline></svg></span> <svg width="20" height="20" viewBox="0 0 20 20" xmlns="http://www.w3.org/2000/svg" icon="copy"
ratio="1"><rect fill="none" stroke="#000" x="3.5" y="2.5" width="12" height="16"></rect><polyline
fill="none" stroke="#000" points="5 0.5 17.5 0.5 17.5 17"></polyline></svg></span>
</a> </a>
</li> </li>
</ul> </ul>
</div> </div>
</div> </div>
</div> </div>
<helper *ngIf="pageContents && pageContents['bottom'] && pageContents['bottom'].length > 0"
[texts]="pageContents['bottom']" styleName="uk-width-1-1"></helper>
</div> </div>
<!-- Claiming FAB --> <!-- Claiming FAB -->
<!--div class="uk-inline"> <!--div class="uk-inline">

View File

@ -1,9 +1,6 @@
import {Component, ViewChild} from '@angular/core'; import {Component, Input} from '@angular/core';
import {Input} from '@angular/core';
import {ActivatedRoute, Router} from '@angular/router'; import {ActivatedRoute, Router} from '@angular/router';
import {Title, Meta} from '@angular/platform-browser'; import {Meta, Title} from '@angular/platform-browser';
import {Observable} from 'rxjs';
import {OrpInfo} from '../../utils/entities/orpInfo'; import {OrpInfo} from '../../utils/entities/orpInfo';
import {EnvProperties} from '../../utils/properties/env-properties'; import {EnvProperties} from '../../utils/properties/env-properties';
@ -13,6 +10,7 @@ import {OrpService} from './orp.service';
import {PiwikService} from '../../utils/piwik/piwik.service'; import {PiwikService} from '../../utils/piwik/piwik.service';
import {SEOService} from '../../sharedComponents/SEO/SEO.service'; import {SEOService} from '../../sharedComponents/SEO/SEO.service';
import {HelperFunctions} from "../../utils/HelperFunctions.class"; import {HelperFunctions} from "../../utils/HelperFunctions.class";
import {HelperService} from "../../utils/helper/helper.service";
@Component({ @Component({
@ -22,6 +20,7 @@ import {HelperFunctions} from "../../utils/HelperFunctions.class";
export class OrpComponent { export class OrpComponent {
@Input() piwikSiteId = null; @Input() piwikSiteId = null;
@Input() communityId = null;
public orpInfo: OrpInfo; public orpInfo: OrpInfo;
public orpId: string; public orpId: string;
@ -55,11 +54,15 @@ export class OrpComponent {
public warningMessage = ""; public warningMessage = "";
public errorMessage = ""; public errorMessage = "";
public showLoading: boolean = true; public showLoading: boolean = true;
public pageContents = null;
public divContents = null;
public routerHelper: RouterHelper = new RouterHelper(); public routerHelper: RouterHelper = new RouterHelper();
private result; private result;
sub: any; piwiksub: any; infoSub: any; sub: any;
piwiksub: any;
infoSub: any;
properties: EnvProperties; properties: EnvProperties;
constructor(private _orpService: OrpService, constructor(private _orpService: OrpService,
@ -69,6 +72,7 @@ export class OrpComponent {
private _meta: Meta, private _meta: Meta,
private _title: Title, private _title: Title,
private _router: Router, private _router: Router,
private helper: HelperService,
private seoService: SEOService) { private seoService: SEOService) {
} }
@ -76,6 +80,8 @@ export class OrpComponent {
this.route.data this.route.data
.subscribe((data: { envSpecific: EnvProperties }) => { .subscribe((data: { envSpecific: EnvProperties }) => {
this.properties = data.envSpecific; this.properties = data.envSpecific;
//this.getDivContents();
this.getPageContents();
this.updateUrl(data.envSpecific.baseLink + this._router.url); this.updateUrl(data.envSpecific.baseLink + this._router.url);
}); });
@ -103,6 +109,18 @@ export class OrpComponent {
} }
private getPageContents() {
this.helper.getPageHelpContents(this._router.url, this.properties, this.communityId).subscribe(contents => {
this.pageContents = contents;
})
}
private getDivContents() {
this.helper.getDivHelpContents(this._router.url, this.properties, this.communityId).subscribe(contents => {
this.divContents = contents;
})
}
ngOnDestroy() { ngOnDestroy() {
if (this.sub) { if (this.sub) {
this.sub.unsubscribe(); this.sub.unsubscribe();
@ -135,7 +153,16 @@ export class OrpComponent {
} }
this.result = [] this.result = []
this.result = {id: id, type :"orp", source : "openaire", title: this.orpInfo.title,url: '', result: '', accessRights: this.orpInfo.accessMode, embargoEndDate: ''}; this.result = {
id: id,
type: "orp",
source: "openaire",
title: this.orpInfo.title,
url: '',
result: '',
accessRights: this.orpInfo.accessMode,
embargoEndDate: ''
};
let relatedResearchResultsNum = 0; let relatedResearchResultsNum = 0;
if (this.orpInfo.relatedResearchResults != undefined) { if (this.orpInfo.relatedResearchResults != undefined) {
@ -167,12 +194,14 @@ export class OrpComponent {
this._meta.updateTag({content: description}, "name='description'"); this._meta.updateTag({content: description}, "name='description'");
this._meta.updateTag({content: description}, "property='og:description'"); this._meta.updateTag({content: description}, "property='og:description'");
} }
private updateTitle(title: string) { private updateTitle(title: string) {
var _prefix = "OpenAIRE | "; var _prefix = "OpenAIRE | ";
var _title = _prefix + ((title.length > 50) ? title.substring(0, 50) : title); var _title = _prefix + ((title.length > 50) ? title.substring(0, 50) : title);
this._title.setTitle(_title); this._title.setTitle(_title);
this._meta.updateTag({content: _title}, "property='og:title'"); this._meta.updateTag({content: _title}, "property='og:title'");
} }
private updateUrl(url: string) { private updateUrl(url: string) {
this._meta.updateTag({content: url}, "property='og:url'"); this._meta.updateTag({content: url}, "property='og:url'");
} }
@ -185,6 +214,7 @@ export class OrpComponent {
return tooltipContent; return tooltipContent;
} }
public getKeys(map) { public getKeys(map) {
return Array.from(map.keys()); return Array.from(map.keys());
} }
@ -208,6 +238,7 @@ export class OrpComponent {
} }
return totalPages; return totalPages;
} }
isRouteAvailable(routeToCheck: string) { isRouteAvailable(routeToCheck: string) {
for (let i = 0; i < this.router.config.length; i++) { for (let i = 0; i < this.router.config.length; i++) {
let routePath: string = this.router.config[i].path; let routePath: string = this.router.config[i].path;

View File

@ -19,11 +19,11 @@ import {PagingModule} from '../../utils/paging.module';
import {OrpService} from './orp.service'; import {OrpService} from './orp.service';
import {FreeGuard} from '../../login/freeGuard.guard'; import {FreeGuard} from '../../login/freeGuard.guard';
import {IsRouteEnabled} from '../../error/isRouteEnabled.guard';
import {Schema2jsonldModule} from '../../sharedComponents/schema2jsonld/schema2jsonld.module'; import {Schema2jsonldModule} from '../../sharedComponents/schema2jsonld/schema2jsonld.module';
import {SEOServiceModule} from '../../sharedComponents/SEO/SEOService.module'; import {SEOServiceModule} from '../../sharedComponents/SEO/SEOService.module';
import {ShowAuthorsModule} from "../../utils/authors/showAuthors.module"; import {ShowAuthorsModule} from "../../utils/authors/showAuthors.module";
import {DeletedByInferenceModule} from "../landing-utils/deletedByInference/deletedByInference.module"; import {DeletedByInferenceModule} from "../landing-utils/deletedByInference/deletedByInference.module";
import {HelperModule} from "../../utils/helper/helper.module";
@NgModule({ @NgModule({
@ -31,17 +31,18 @@ import {DeletedByInferenceModule} from "../landing-utils/deletedByInference/dele
CommonModule, FormsModule, SharedModule, RouterModule, LandingModule, CommonModule, FormsModule, SharedModule, RouterModule, LandingModule,
CiteThisModule, ResultLandingModule, MetricsModule, IFrameModule, PagingModule, CiteThisModule, ResultLandingModule, MetricsModule, IFrameModule, PagingModule,
AltMetricsModule, ConfigurationServiceModule, Schema2jsonldModule, SEOServiceModule, AltMetricsModule, ConfigurationServiceModule, Schema2jsonldModule, SEOServiceModule,
ShowAuthorsModule, DeletedByInferenceModule ShowAuthorsModule, DeletedByInferenceModule, HelperModule
], ],
declarations: [ declarations: [
OrpComponent OrpComponent
], ],
providers: [ providers: [
OrpService, FreeGuard, IsRouteEnabled OrpService, FreeGuard
], ],
exports: [ exports: [
OrpComponent OrpComponent
] ]
}) })
export class OrpModule { } export class OrpModule {
}

View File

@ -3,13 +3,21 @@
<div class="tm-main uk-width-1-1@s uk-width-1-1@m uk-width-1-1@l uk-row-first "> <div class="tm-main uk-width-1-1@s uk-width-1-1@m uk-width-1-1@l uk-row-first ">
<div id="project" class="uk-container uk-margin-top project"> <div id="project" class="uk-container uk-margin-top project">
<div *ngIf="warningMessage.length > 0" class="uk-alert uk-alert-warning uk-margin-large-top" role="alert">{{warningMessage}}</div> <div *ngIf="warningMessage.length > 0" class="uk-alert uk-alert-warning uk-margin-large-top"
<div *ngIf="errorMessage.length > 0" class="uk-alert uk-alert-danger uk-margin-large-top" role="alert">{{errorMessage}}</div> role="alert">{{warningMessage}}</div>
<div [style.display]="showLoading ? 'inline' : 'none'" class="uk-animation-fade uk-margin-large-top uk-width-1-1" role="alert"><span class="loading-gif uk-align-center" ></span></div> <div *ngIf="errorMessage.length > 0" class="uk-alert uk-alert-danger uk-margin-large-top"
role="alert">{{errorMessage}}</div>
<div [style.display]="showLoading ? 'inline' : 'none'"
class="uk-animation-fade uk-margin-large-top uk-width-1-1" role="alert"><span
class="loading-gif uk-align-center"></span></div>
<div *ngIf="projectInfo != null" uk-grid class="uk-grid-large"> <div *ngIf="projectInfo != null" uk-grid class="uk-grid-large">
<helper *ngIf="pageContents && pageContents['top'] && pageContents['top'].length > 0"
[texts]="pageContents['top']" styleName="uk-width-1-1"></helper>
<div class="uk-width-expand@m uk-width-1-1@s"> <div class="uk-width-expand@m uk-width-1-1@s">
<schema2jsonld *ngIf="projectInfo" [data]=projectInfo [URL]="properties.baseLink+'/search/project?projectId='+projectId" type="project"></schema2jsonld> <schema2jsonld *ngIf="projectInfo" [data]=projectInfo
[URL]="properties.baseLink+'/search/project?projectId='+projectId"
type="project"></schema2jsonld>
<!--h3 *ngIf="projectInfo.acronym != undefined && projectInfo.acronym != ''">{{projectInfo.acronym}}</h3> <!--h3 *ngIf="projectInfo.acronym != undefined && projectInfo.acronym != ''">{{projectInfo.acronym}}</h3>
<h3 *ngIf="projectInfo.acronym == undefined || projectInfo.acronym == ''">{{projectInfo.title}}</h3--> <h3 *ngIf="projectInfo.acronym == undefined || projectInfo.acronym == ''">{{projectInfo.title}}</h3-->
<h2 class="projectIcon"> <h2 class="projectIcon">
@ -19,27 +27,41 @@
<span>{{projectName}}</span> <span>{{projectName}}</span>
<span *ngIf=" projectInfo.title == projectName ">({{projectInfo.contractNum}})</span> <span *ngIf=" projectInfo.title == projectName ">({{projectInfo.contractNum}})</span>
</h2> </h2>
<div class="uk-text-large " *ngIf="projectInfo.title && projectInfo.title != projectName ">{{projectInfo.title}} ({{projectInfo.contractNum}})</div> <div class="uk-text-large "
*ngIf="projectInfo.title && projectInfo.title != projectName ">{{projectInfo.title}}
({{projectInfo.contractNum}})
</div>
<div> <div>
<span class="uk-label custom-label label-blue label-project" title="Type">Project</span>{{" "}} <span class="uk-label custom-label label-blue label-project" title="Type">Project</span>{{" "}}
<span class="uk-label custom-label label-funder " title="Funder">{{projectInfo.funder}}</span>{{" "}} <span class="uk-label custom-label label-funder " title="Funder">{{projectInfo.funder}}</span>{{" "}}
<span *ngIf="projectInfo.openAccessMandatePublications != undefined && projectInfo.openAccessMandatePublications && projectInfo.openAccessMandateDatasets != undefined && projectInfo.openAccessMandateDatasets" <span
class="uk-label custom-label label-openaccessmandate " title="Open Access mandate for Publications and Research Data"> *ngIf="projectInfo.openAccessMandatePublications != undefined && projectInfo.openAccessMandatePublications && projectInfo.openAccessMandateDatasets != undefined && projectInfo.openAccessMandateDatasets"
class="uk-label custom-label label-openaccessmandate "
title="Open Access mandate for Publications and Research Data">
Open Access mandate for Publications and Research Data Open Access mandate for Publications and Research Data
</span>{{" "}} </span>{{" "}}
<span *ngIf="projectInfo.openAccessMandatePublications != undefined && projectInfo.openAccessMandatePublications && (projectInfo.openAccessMandateDatasets == undefined || !projectInfo.openAccessMandateDatasets)" <span
*ngIf="projectInfo.openAccessMandatePublications != undefined && projectInfo.openAccessMandatePublications && (projectInfo.openAccessMandateDatasets == undefined || !projectInfo.openAccessMandateDatasets)"
class="uk-label custom-label label-openaccessmandate " title="Open Access mandate for Publications">Open Access mandate for Publications</span>{{" "}} class="uk-label custom-label label-openaccessmandate " title="Open Access mandate for Publications">Open Access mandate for Publications</span>{{" "}}
<span *ngIf="projectInfo.specialClause39" class="uk-label custom-label label-sc39 " title="Special Clause 39">Special Clause 39</span>{{" "}} <span *ngIf="projectInfo.specialClause39" class="uk-label custom-label label-sc39 "
<span *ngIf="projectInfo.openAccessMandateDatasets != undefined && projectInfo.openAccessMandateDatasets && (projectInfo.openAccessMandatePublications == undefined || !projectInfo.openAccessMandatePublications)" title="Special Clause 39">Special Clause 39</span>{{" "}}
<span
*ngIf="projectInfo.openAccessMandateDatasets != undefined && projectInfo.openAccessMandateDatasets && (projectInfo.openAccessMandatePublications == undefined || !projectInfo.openAccessMandatePublications)"
class="uk-label custom-label label-openaccessmandate " title="Open Access mandate for Research Data">Open Access mandate for Research Data</span>{{" "}} class="uk-label custom-label label-openaccessmandate " title="Open Access mandate for Research Data">Open Access mandate for Research Data</span>{{" "}}
</div> </div>
<ul class="uk-list"> <ul class="uk-list">
<li *ngIf="projectInfo.funding"><span class="uk-text-bold">Funding:</span> {{projectInfo.funding}}</li> <li *ngIf="projectInfo.funding"><span class="uk-text-bold">Funding:</span> {{projectInfo.funding}}</li>
<li *ngIf="projectInfo.startDate"><span class="uk-text-bold">Start Date:</span> {{projectInfo.startDate}}</li> <li *ngIf="projectInfo.startDate"><span class="uk-text-bold">Start Date:</span> {{projectInfo.startDate}}
</li>
<li *ngIf="projectInfo.endDate"><span class="uk-text-bold">End Date:</span> {{projectInfo.endDate}}</li> <li *ngIf="projectInfo.endDate"><span class="uk-text-bold">End Date:</span> {{projectInfo.endDate}}</li>
<li *ngIf="projectInfo.openAccessMandatePublications != undefined && !projectInfo.openAccessMandatePublications "><span class="uk-text-bold">Open Access mandate for Publications:</span> no</li> <li
<li *ngIf="projectInfo.openAccessMandateDatasets != undefined && !projectInfo.openAccessMandateDatasets "><span class="uk-text-bold">Open Access mandate for Research Data:</span> no</li> *ngIf="projectInfo.openAccessMandatePublications != undefined && !projectInfo.openAccessMandatePublications ">
<span class="uk-text-bold">Open Access mandate for Publications:</span> no
</li>
<li *ngIf="projectInfo.openAccessMandateDatasets != undefined && !projectInfo.openAccessMandateDatasets ">
<span class="uk-text-bold">Open Access mandate for Research Data:</span> no
</li>
<li *ngIf="projectInfo.organizations && projectInfo.organizations.length > 0"><span class="uk-text-bold">Organization:</span> <li *ngIf="projectInfo.organizations && projectInfo.organizations.length > 0"><span class="uk-text-bold">Organization:</span>
<span class="list-horizontal-line"> <span class="list-horizontal-line">
@ -47,7 +69,8 @@
[attr.uk-tooltip]="organization.acronym && organization.name ? 'pos:right; delay:10' : 'cls: uk-invisible'" [attr.uk-tooltip]="organization.acronym && organization.name ? 'pos:right; delay:10' : 'cls: uk-invisible'"
[title]="organization.name"> [title]="organization.name">
<a *ngIf="organization.id" <a *ngIf="organization.id"
[queryParams]="{organizationId: organization.id}" routerLinkActive="router-link-active" routerLink="/search/organization"> [queryParams]="{organizationId: organization.id}" routerLinkActive="router-link-active"
routerLink="/search/organization">
{{(organization.acronym) ? organization.acronym : ''}} {{(!organization.acronym && organization.name) ? organization.name : ''}}</a> {{(organization.acronym) ? organization.acronym : ''}} {{(!organization.acronym && organization.name) ? organization.name : ''}}</a>
<span <span
@ -98,12 +121,14 @@
<!-- </span> --> <!-- </span> -->
</a> </a>
<div class="uk-accordion-content"> <div class="uk-accordion-content">
<errorMessages [status]="[fetchPublications.searchUtils.status]" [type]="'publications'" tab_error_class=true></errorMessages> <errorMessages [status]="[fetchPublications.searchUtils.status]" [type]="'publications'"
tab_error_class=true></errorMessages>
<div *ngIf="fetchPublications.searchUtils.status == errorCodes.DONE"> <div *ngIf="fetchPublications.searchUtils.status == errorCodes.DONE">
<div class="uk-text-right" *ngIf="fetchPublications.searchUtils.totalResults > 10"> <div class="uk-text-right" *ngIf="fetchPublications.searchUtils.totalResults > 10">
<a [queryParams]="routerHelper.createQueryParams(['project', 'po'], [projectId, 'and'])" <a [queryParams]="routerHelper.createQueryParams(['project', 'po'], [projectId, 'and'])"
routerLinkActive="router-link-active" [routerLink]="linkToSearchPublications" class="uk-button uk-button-text"> routerLinkActive="router-link-active" [routerLink]="linkToSearchPublications"
class="uk-button uk-button-text">
View all {{fetchPublications.searchUtils.totalResults | number}} results View all {{fetchPublications.searchUtils.totalResults | number}} results
</a> </a>
</div> </div>
@ -123,13 +148,15 @@
<!-- </span> --> <!-- </span> -->
</a> </a>
<div class="uk-accordion-content"> <div class="uk-accordion-content">
<errorMessages [status]="[fetchDatasets.searchUtils.status]" [type]="'research data'" tab_error_class=true></errorMessages> <errorMessages [status]="[fetchDatasets.searchUtils.status]" [type]="'research data'"
tab_error_class=true></errorMessages>
<div *ngIf="fetchDatasets.searchUtils.status == errorCodes.DONE"> <div *ngIf="fetchDatasets.searchUtils.status == errorCodes.DONE">
<div class="uk-text-right" *ngIf="fetchDatasets.searchUtils.totalResults > 10"> <div class="uk-text-right" *ngIf="fetchDatasets.searchUtils.totalResults > 10">
<a [queryParams]="routerHelper.createQueryParams(['project', 'po'], [projectId, 'and'])" <a [queryParams]="routerHelper.createQueryParams(['project', 'po'], [projectId, 'and'])"
routerLinkActive="router-link-active" [routerLink]="linkToSearchDatasets" class="uk-button uk-button-text"> routerLinkActive="router-link-active" [routerLink]="linkToSearchDatasets"
class="uk-button uk-button-text">
View all {{fetchDatasets.searchUtils.totalResults | number}} results View all {{fetchDatasets.searchUtils.totalResults | number}} results
</a> </a>
</div> </div>
@ -149,13 +176,15 @@
<!-- </span> --> <!-- </span> -->
</a> </a>
<div class="uk-accordion-content"> <div class="uk-accordion-content">
<errorMessages [status]="[fetchSoftware.searchUtils.status]" [type]="'software'" tab_error_class=true></errorMessages> <errorMessages [status]="[fetchSoftware.searchUtils.status]" [type]="'software'"
tab_error_class=true></errorMessages>
<div *ngIf="fetchSoftware.searchUtils.status == errorCodes.DONE"> <div *ngIf="fetchSoftware.searchUtils.status == errorCodes.DONE">
<div class="uk-text-right" *ngIf="fetchSoftware.searchUtils.totalResults > 10"> <div class="uk-text-right" *ngIf="fetchSoftware.searchUtils.totalResults > 10">
<a [queryParams]="routerHelper.createQueryParams(['project', 'po'], [projectId, 'and'])" <a [queryParams]="routerHelper.createQueryParams(['project', 'po'], [projectId, 'and'])"
routerLinkActive="router-link-active" [routerLink]="linkToSearchSoftware" class="uk-button uk-button-text"> routerLinkActive="router-link-active" [routerLink]="linkToSearchSoftware"
class="uk-button uk-button-text">
View all {{fetchSoftware.searchUtils.totalResults | number}} results View all {{fetchSoftware.searchUtils.totalResults | number}} results
</a> </a>
</div> </div>
@ -175,13 +204,15 @@
<!-- </span> --> <!-- </span> -->
</a> </a>
<div class="uk-accordion-content"> <div class="uk-accordion-content">
<errorMessages [status]="[fetchOrps.searchUtils.status]" [type]="'other research products'" tab_error_class=true></errorMessages> <errorMessages [status]="[fetchOrps.searchUtils.status]" [type]="'other research products'"
tab_error_class=true></errorMessages>
<div *ngIf="fetchOrps.searchUtils.status == errorCodes.DONE"> <div *ngIf="fetchOrps.searchUtils.status == errorCodes.DONE">
<div class="uk-text-right" *ngIf="fetchOrps.searchUtils.totalResults > 10"> <div class="uk-text-right" *ngIf="fetchOrps.searchUtils.totalResults > 10">
<a [queryParams]="routerHelper.createQueryParams(['project', 'po'], [projectId, 'and'])" <a [queryParams]="routerHelper.createQueryParams(['project', 'po'], [projectId, 'and'])"
routerLinkActive="router-link-active" [routerLink]="linkToSearchOrps" class="uk-button uk-button-text"> routerLinkActive="router-link-active" [routerLink]="linkToSearchOrps"
class="uk-button uk-button-text">
View all {{fetchOrps.searchUtils.totalResults | number}} results View all {{fetchOrps.searchUtils.totalResults | number}} results
</a> </a>
</div> </div>
@ -198,9 +229,11 @@
Statistics Statistics
</a> </a>
<div class="uk-accordion-content"> <div class="uk-accordion-content">
<errorMessages [status]="[fetchPublications.searchUtils.status, fetchDatasets.searchUtils.status]" [type]="'statistics'" tab_error_class=true></errorMessages> <errorMessages [status]="[fetchPublications.searchUtils.status, fetchDatasets.searchUtils.status]"
[type]="'statistics'" tab_error_class=true></errorMessages>
<div *ngIf="statsClicked && (fetchPublications.searchUtils.status == errorCodes.DONE || fetchDatasets.searchUtils.status == errorCodes.DONE)"> <div
*ngIf="statsClicked && (fetchPublications.searchUtils.status == errorCodes.DONE || fetchDatasets.searchUtils.status == errorCodes.DONE)">
<div> <div>
<p class="uk-text-bold">Research Results</p> <p class="uk-text-bold">Research Results</p>
@ -408,7 +441,8 @@
<div class="uk-width-large@m uk-width-1-1@s"> <div class="uk-width-large@m uk-width-1-1@s">
<div class="uk-card uk-card-default uk-padding-small"> <div class="uk-card uk-card-default uk-padding-small">
<div> <div>
Share - Bookmark<addThis ></addThis> Share - Bookmark
<addThis></addThis>
</div> </div>
<div class="uk-margin-medium-top uk-margin-medium-bottom"> <div class="uk-margin-medium-top uk-margin-medium-bottom">
<div class="uk-text-center uk-text-large"> <div class="uk-text-center uk-text-large">
@ -428,35 +462,64 @@
<!-- Publication box--> <!-- Publication box-->
<ul class="uk-list"> <ul class="uk-list">
<li> <li>
<a class="clickable" uk-toggle="target: #publications_dynamic; animation:uk-animation-fade"><span class="uk-icon"><svg width="20" height="20" viewBox="0 0 20 20" xmlns="http://www.w3.org/2000/svg" icon="code" ratio="1"><polyline fill="none" stroke="#000" stroke-width="1.01" points="13,4 19,10 13,16"></polyline><polyline fill="none" stroke="#000" stroke-width="1.01" points="7,4 1,10 7,16"></polyline></svg></span> Include in your site (HTML)</a> <a class="clickable"
<div hidden id="publications_dynamic" class="widget-box uk-padding-small uk-card uk-card-default "> uk-toggle="target: #publications_dynamic; animation:uk-animation-fade"><span
<div class=" uk-alert uk-alert-primary uk-padding-small uk-margin-remove-bottom uk-margin-right"> class="uk-icon"><svg width="20" height="20" viewBox="0 0 20 20"
xmlns="http://www.w3.org/2000/svg" icon="code" ratio="1"><polyline
fill="none" stroke="#000" stroke-width="1.01" points="13,4 19,10 13,16"></polyline><polyline
fill="none" stroke="#000" stroke-width="1.01"
points="7,4 1,10 7,16"></polyline></svg></span> Include in your site (HTML)</a>
<div hidden id="publications_dynamic"
class="widget-box uk-padding-small uk-card uk-card-default ">
<div
class=" uk-alert uk-alert-primary uk-padding-small uk-margin-remove-bottom uk-margin-right">
For further information please contact us <a href="mailto:helpdesk@openaire.eu">helpdesk@openaire.eu</a> For further information please contact us <a href="mailto:helpdesk@openaire.eu">helpdesk@openaire.eu</a>
</div> </div>
<div class="uk-grid"> <div class="uk-grid">
<a class=" publ_clipboard_btn uk-padding-remove-left uk-margin-small-left uk-text-right uk-width-1-1 " data-clipboard-target="#publ_clipboard" title="Copy to clipboard"> <a
<span class="uk-icon"><svg width="20" height="20" viewBox="0 0 20 20" xmlns="http://www.w3.org/2000/svg" icon="copy" ratio="1"><rect fill="none" stroke="#000" x="3.5" y="2.5" width="12" height="16"></rect><polyline fill="none" stroke="#000" points="5 0.5 17.5 0.5 17.5 17"></polyline></svg></span> class=" publ_clipboard_btn uk-padding-remove-left uk-margin-small-left uk-text-right uk-width-1-1 "
data-clipboard-target="#publ_clipboard" title="Copy to clipboard">
<span class="uk-icon"><svg width="20" height="20" viewBox="0 0 20 20"
xmlns="http://www.w3.org/2000/svg" icon="copy" ratio="1"><rect
fill="none" stroke="#000" x="3.5" y="2.5" width="12" height="16"></rect><polyline
fill="none" stroke="#000" points="5 0.5 17.5 0.5 17.5 17"></polyline></svg></span>
</a> </a>
</div> </div>
<pre class="box-content uk-padding-remove-bottom uk-margin-remove-bottom"><code id="publ_clipboard">{{publications_dynamic}}</code></pre> <pre class="box-content uk-padding-remove-bottom uk-margin-remove-bottom"><code
id="publ_clipboard">{{publications_dynamic}}</code></pre>
</div> </div>
</li> </li>
<li> <li>
<a target="_blank" <a target="_blank"
href="/project-report?projectId={{projectId}}&size={{fetchPublications.searchUtils.totalResults}}&type=publication"> href="/project-report?projectId={{projectId}}&size={{fetchPublications.searchUtils.totalResults}}&type=publication">
<span class="uk-icon"><svg width="20" height="20" viewBox="0 0 20 20" xmlns="http://www.w3.org/2000/svg" icon="table" ratio="1"><rect x="1" y="3" width="18" height="1"></rect><rect x="1" y="7" width="18" height="1"></rect><rect x="1" y="11" width="18" height="1"></rect><rect x="1" y="15" width="18" height="1"></rect></svg></span> Get {{projectInfo.funder}} report (HTML) <span class="uk-icon"><svg width="20" height="20" viewBox="0 0 20 20"
xmlns="http://www.w3.org/2000/svg" icon="table" ratio="1"><rect
x="1" y="3" width="18" height="1"></rect><rect x="1" y="7" width="18" height="1"></rect><rect
x="1" y="11" width="18" height="1"></rect><rect x="1" y="15" width="18" height="1"></rect></svg></span>
Get {{projectInfo.funder}} report (HTML)
</a> </a>
</li> </li>
<li> <li>
<a class="clickable" (click)="downloadfile(downloadURLAPI+csvParams, 'funder-publications-report')"> <a class="clickable"
<span class="uk-icon"><svg width="20" height="20" viewBox="0 0 20 20" xmlns="http://www.w3.org/2000/svg" icon="download" ratio="1"><polyline fill="none" stroke="#000" points="14,10 9.5,14.5 5,10"></polyline><rect x="3" y="17" width="13" height="1"></rect><line fill="none" stroke="#000" x1="9.5" y1="13.91" x2="9.5" y2="3"></line></svg></span> Get {{projectInfo.funder}} report (CSV) (click)="downloadfile(downloadURLAPI+csvParams, 'funder-publications-report')">
<span class="uk-icon"><svg width="20" height="20" viewBox="0 0 20 20"
xmlns="http://www.w3.org/2000/svg" icon="download" ratio="1"><polyline
fill="none" stroke="#000" points="14,10 9.5,14.5 5,10"></polyline><rect x="3" y="17"
width="13"
height="1"></rect><line
fill="none" stroke="#000" x1="9.5" y1="13.91" x2="9.5" y2="3"></line></svg></span>
Get {{projectInfo.funder}} report (CSV)
</a> </a>
</li> </li>
<li *ngIf="isRouteAvailable('participate/deposit-publications') "> <li *ngIf="isRouteAvailable('participate/deposit-publications') ">
<a routerLinkActive="router-link-active" routerLink="/participate/deposit-publications"> <a routerLinkActive="router-link-active" routerLink="/participate/deposit-publications">
<span class="uk-icon"> <span class="uk-icon">
<svg width="20" height="20" viewBox="0 0 20 20" xmlns="http://www.w3.org/2000/svg" ratio="1"><polyline fill="none" stroke="#000" points="5 8 9.5 3.5 14 8 "></polyline><rect x="3" y="17" width="13" height="1"></rect><line fill="none" stroke="#000" x1="9.5" y1="15" x2="9.5" y2="4"></line></svg> <svg width="20" height="20" viewBox="0 0 20 20" xmlns="http://www.w3.org/2000/svg" ratio="1"><polyline fill="none"
stroke="#000"
points="5 8 9.5 3.5 14 8 "></polyline><rect
x="3" y="17" width="13" height="1"></rect><line fill="none" stroke="#000" x1="9.5" y1="15" x2="9.5"
y2="4"></line></svg>
</span> Deposit </span> Deposit
</a> </a>
</li> </li>
@ -466,34 +529,61 @@
<!-- Dataset box--> <!-- Dataset box-->
<ul class="uk-list"> <ul class="uk-list">
<li> <li>
<a class="clickable" uk-toggle="target: #datasets_dynamic; animation:uk-animation-fade"><span class="uk-icon"><svg width="20" height="20" viewBox="0 0 20 20" xmlns="http://www.w3.org/2000/svg" icon="code" ratio="1"><polyline fill="none" stroke="#000" stroke-width="1.01" points="13,4 19,10 13,16"></polyline><polyline fill="none" stroke="#000" stroke-width="1.01" points="7,4 1,10 7,16"></polyline></svg></span> Include in your site (HTML) </a> <a class="clickable" uk-toggle="target: #datasets_dynamic; animation:uk-animation-fade"><span
<div hidden id="datasets_dynamic" class="widget-box uk-padding-small uk-card uk-card-default "> class="uk-icon"><svg width="20" height="20" viewBox="0 0 20 20"
<div class=" uk-alert uk-alert-primary uk-padding-small uk-margin-remove-bottom uk-margin-right"> xmlns="http://www.w3.org/2000/svg" icon="code" ratio="1"><polyline
fill="none" stroke="#000" stroke-width="1.01" points="13,4 19,10 13,16"></polyline><polyline
fill="none" stroke="#000" stroke-width="1.01"
points="7,4 1,10 7,16"></polyline></svg></span> Include in your site (HTML) </a>
<div hidden id="datasets_dynamic"
class="widget-box uk-padding-small uk-card uk-card-default ">
<div
class=" uk-alert uk-alert-primary uk-padding-small uk-margin-remove-bottom uk-margin-right">
For further information please contact us <a href="mailto:helpdesk@openaire.eu">helpdesk@openaire.eu</a> For further information please contact us <a href="mailto:helpdesk@openaire.eu">helpdesk@openaire.eu</a>
</div> </div>
<div class="uk-grid"> <div class="uk-grid">
<a class=" datasets_clipboard_btn uk-padding-remove-left uk-margin-small-left uk-text-right uk-width-1-1 " data-clipboard-target="#datasets_clipboard" title="Copy to clipboard"> <a
<span class="uk-icon"><svg width="20" height="20" viewBox="0 0 20 20" xmlns="http://www.w3.org/2000/svg" icon="copy" ratio="1"><rect fill="none" stroke="#000" x="3.5" y="2.5" width="12" height="16"></rect><polyline fill="none" stroke="#000" points="5 0.5 17.5 0.5 17.5 17"></polyline></svg></span> class=" datasets_clipboard_btn uk-padding-remove-left uk-margin-small-left uk-text-right uk-width-1-1 "
data-clipboard-target="#datasets_clipboard" title="Copy to clipboard">
<span class="uk-icon"><svg width="20" height="20" viewBox="0 0 20 20"
xmlns="http://www.w3.org/2000/svg" icon="copy" ratio="1"><rect
fill="none" stroke="#000" x="3.5" y="2.5" width="12" height="16"></rect><polyline
fill="none" stroke="#000" points="5 0.5 17.5 0.5 17.5 17"></polyline></svg></span>
</a> </a>
</div> </div>
<pre class="box-content uk-padding-remove-bottom uk-margin-remove-bottom"><code id="datasets_clipboard">{{datasets_dynamic}}</code></pre> <pre class="box-content uk-padding-remove-bottom uk-margin-remove-bottom"><code
id="datasets_clipboard">{{datasets_dynamic}}</code></pre>
</div> </div>
</li> </li>
<li> <li>
<a target="_blank" <a target="_blank"
href="/project-report?projectId={{projectId}}&size={{fetchDatasets.searchUtils.totalResults}}&type=dataset"> href="/project-report?projectId={{projectId}}&size={{fetchDatasets.searchUtils.totalResults}}&type=dataset">
<span class="uk-icon"><svg width="20" height="20" viewBox="0 0 20 20" xmlns="http://www.w3.org/2000/svg" icon="table" ratio="1"><rect x="1" y="3" width="18" height="1"></rect><rect x="1" y="7" width="18" height="1"></rect><rect x="1" y="11" width="18" height="1"></rect><rect x="1" y="15" width="18" height="1"></rect></svg></span> Get {{projectInfo.funder}} report (HTML) <span class="uk-icon"><svg width="20" height="20" viewBox="0 0 20 20"
xmlns="http://www.w3.org/2000/svg" icon="table" ratio="1"><rect
x="1" y="3" width="18" height="1"></rect><rect x="1" y="7" width="18" height="1"></rect><rect
x="1" y="11" width="18" height="1"></rect><rect x="1" y="15" width="18" height="1"></rect></svg></span>
Get {{projectInfo.funder}} report (HTML)
</a> </a>
</li> </li>
<li> <li>
<a class="clickable" (click)="downloadfile(downloadURLAPI+csvParamsDatasets, 'funder-research-data-report')"> <a class="clickable"
<span class="uk-icon"><svg width="20" height="20" viewBox="0 0 20 20" xmlns="http://www.w3.org/2000/svg" icon="download" ratio="1"><polyline fill="none" stroke="#000" points="14,10 9.5,14.5 5,10"></polyline><rect x="3" y="17" width="13" height="1"></rect><line fill="none" stroke="#000" x1="9.5" y1="13.91" x2="9.5" y2="3"></line></svg></span> Get {{projectInfo.funder}} report (CSV) (click)="downloadfile(downloadURLAPI+csvParamsDatasets, 'funder-research-data-report')">
<span class="uk-icon"><svg width="20" height="20" viewBox="0 0 20 20"
xmlns="http://www.w3.org/2000/svg" icon="download" ratio="1"><polyline
fill="none" stroke="#000" points="14,10 9.5,14.5 5,10"></polyline><rect x="3" y="17"
width="13"
height="1"></rect><line
fill="none" stroke="#000" x1="9.5" y1="13.91" x2="9.5" y2="3"></line></svg></span>
Get {{projectInfo.funder}} report (CSV)
</a> </a>
</li> </li>
<li *ngIf="isRouteAvailable('participate/deposit-datasets') "> <li *ngIf="isRouteAvailable('participate/deposit-datasets') ">
<a routerLinkActive="router-link-active" routerLink="/participate/deposit-datasets"> <a routerLinkActive="router-link-active" routerLink="/participate/deposit-datasets">
<span class="uk-icon"> <span class="uk-icon">
<svg width="20" height="20" viewBox="0 0 20 20" xmlns="http://www.w3.org/2000/svg" ratio="1"><polyline fill="none" stroke="#000" points="5 8 9.5 3.5 14 8 "></polyline><rect x="3" y="17" width="13" height="1"></rect><line fill="none" stroke="#000" x1="9.5" y1="15" x2="9.5" y2="4"></line></svg> <svg width="20" height="20" viewBox="0 0 20 20" xmlns="http://www.w3.org/2000/svg"
ratio="1"><polyline fill="none" stroke="#000" points="5 8 9.5 3.5 14 8 "></polyline><rect
x="3" y="17" width="13" height="1"></rect><line fill="none" stroke="#000" x1="9.5"
y1="15" x2="9.5" y2="4"></line></svg>
</span> Deposit </span> Deposit
</a> </a>
</li> </li>
@ -502,18 +592,33 @@
</ul> </ul>
</div> </div>
<button *ngIf="isRouteAvailable('participate/direct-claim') " class=" uk-button portal-button uk-margin-small-top uk-width-1-1"> <button *ngIf="isRouteAvailable('participate/direct-claim') "
class=" uk-button portal-button uk-margin-small-top uk-width-1-1">
<span class="uk-icon"> <span class="uk-icon">
<svg icon="link" ratio="1" xmlns="http://www.w3.org/2000/svg" width="25" viewBox="0 0 20 20" height="25"><path d="M10.625,12.375 L7.525,15.475 C6.825,16.175 5.925,16.175 5.225,15.475 L4.525,14.775 C3.825,14.074 3.825,13.175 4.525,12.475 L7.625,9.375" fill="none" stroke="#000" stroke-width="1.1"></path><path d="M9.325,7.375 L12.425,4.275 C13.125,3.575 14.025,3.575 14.724,4.275 L15.425,4.975 C16.125,5.675 16.125,6.575 15.425,7.275 L12.325,10.375" fill="none" stroke="#000" stroke-width="1.1"></path><path d="M7.925,11.875 L11.925,7.975" fill="none" stroke="#000" stroke-width="1.1"></path></svg> <svg icon="link" ratio="1" xmlns="http://www.w3.org/2000/svg" width="25" viewBox="0 0 20 20"
height="25"><path
d="M10.625,12.375 L7.525,15.475 C6.825,16.175 5.925,16.175 5.225,15.475 L4.525,14.775 C3.825,14.074 3.825,13.175 4.525,12.475 L7.625,9.375"
fill="none" stroke="#000" stroke-width="1.1"></path><path
d="M9.325,7.375 L12.425,4.275 C13.125,3.575 14.025,3.575 14.724,4.275 L15.425,4.975 C16.125,5.675 16.125,6.575 15.425,7.275 L12.325,10.375"
fill="none" stroke="#000" stroke-width="1.1"></path><path d="M7.925,11.875 L11.925,7.975"
fill="none" stroke="#000"
stroke-width="1.1"></path></svg>
</span> Link this project to... </span> Link this project to...
</button> </button>
<div *ngIf="isRouteAvailable('participate/direct-claim') " uk-dropdown="pos: bottom-left; mode:click" style="background: transparent !important;box-shadow: none; max-width: 70px !important; min-width: 70px !important;" class=" uk-margin-remove-top uk-padding-small"> <div *ngIf="isRouteAvailable('participate/direct-claim') " uk-dropdown="pos: bottom-left; mode:click"
style="background: transparent !important;box-shadow: none; max-width: 70px !important; min-width: 70px !important;"
class=" uk-margin-remove-top uk-padding-small">
<ul class="uk-iconnav uk-iconnav-vertical"> <ul class="uk-iconnav uk-iconnav-vertical">
<li uk-tooltip="pos:right;" title="<div class='tooltip-custom-font-size uk-margin-small'>Research results</div>"> <li uk-tooltip="pos:right;"
<a class=" uk-icon-button portal-button shadowBox" style="padding: 6px;" [queryParams]="routerHelper.createQueryParams(['id','type','linkTo'],[projectId,'project','result'])" routerLinkActive="router-link-active" routerLink="/participate/direct-claim" > title="<div class='tooltip-custom-font-size uk-margin-small'>Research results</div>">
<a class=" uk-icon-button portal-button shadowBox" style="padding: 6px;"
[queryParams]="routerHelper.createQueryParams(['id','type','linkTo'],[projectId,'project','result'])"
routerLinkActive="router-link-active" routerLink="/participate/direct-claim">
<span class="uk-icon"> <span class="uk-icon">
<svg width="20" height="20" viewBox="0 0 20 20" xmlns="http://www.w3.org/2000/svg" icon="copy" ratio="1"><rect fill="none" stroke="#000" x="3.5" y="2.5" width="12" height="16"></rect><polyline fill="none" stroke="#000" points="5 0.5 17.5 0.5 17.5 17"></polyline></svg></span> <svg width="20" height="20" viewBox="0 0 20 20" xmlns="http://www.w3.org/2000/svg" icon="copy"
ratio="1"><rect fill="none" stroke="#000" x="3.5" y="2.5" width="12" height="16"></rect><polyline
fill="none" stroke="#000" points="5 0.5 17.5 0.5 17.5 17"></polyline></svg></span>
</a> </a>
</li> </li>
@ -527,6 +632,8 @@
</metrics--> </metrics-->
</div> </div>
</div> </div>
<helper *ngIf="pageContents && pageContents['bottom'] && pageContents['bottom'].length > 0"
[texts]="pageContents['bottom']" styleName="uk-width-1-1"></helper>
</div> </div>
<modal-loading></modal-loading> <modal-loading></modal-loading>
<modal-alert #AlertModalCsvError></modal-alert> <modal-alert #AlertModalCsvError></modal-alert>

View File

@ -1,10 +1,6 @@
import {Component, ViewChild} from '@angular/core'; import {Component, Input, ViewChild} from '@angular/core';
import {Input} from '@angular/core';
import {ActivatedRoute, Router} from '@angular/router'; import {ActivatedRoute, Router} from '@angular/router';
import {Params} from '@angular/router'; import {Meta, Title} from '@angular/platform-browser';
import {Title, Meta} from '@angular/platform-browser';
import {Observable} from 'rxjs';
import {ProjectService} from './project.service'; import {ProjectService} from './project.service';
import {ProjectInfo} from '../../utils/entities/projectInfo'; import {ProjectInfo} from '../../utils/entities/projectInfo';
@ -28,6 +24,7 @@ import {PiwikService} from '../../utils/piwik/piwik.service';
import {EnvProperties} from '../../utils/properties/env-properties'; import {EnvProperties} from '../../utils/properties/env-properties';
import {SEOService} from '../../sharedComponents/SEO/SEO.service'; import {SEOService} from '../../sharedComponents/SEO/SEO.service';
import {HelperFunctions} from "../../utils/HelperFunctions.class"; import {HelperFunctions} from "../../utils/HelperFunctions.class";
import {HelperService} from "../../utils/helper/helper.service";
@Component({ @Component({
selector: 'project', selector: 'project',
@ -36,6 +33,7 @@ import {HelperFunctions} from "../../utils/HelperFunctions.class";
export class ProjectComponent { export class ProjectComponent {
@Input() piwikSiteId = null; @Input() piwikSiteId = null;
@Input() communityId = null;
public projectInfo: ProjectInfo; public projectInfo: ProjectInfo;
public projectId: string; public projectId: string;
public projectName: string; public projectName: string;
@ -95,13 +93,19 @@ export class ProjectComponent{
public routerHelper: RouterHelper = new RouterHelper(); public routerHelper: RouterHelper = new RouterHelper();
public errorCodes: ErrorCodes = new ErrorCodes(); public errorCodes: ErrorCodes = new ErrorCodes();
public pageContents = null;
public divContents = null;
@ViewChild(ModalLoading) loading: ModalLoading; @ViewChild(ModalLoading) loading: ModalLoading;
// Alert box when something is wrong with CSV requests // Alert box when something is wrong with CSV requests
@ViewChild('AlertModalCsvError') alertCsvError; @ViewChild('AlertModalCsvError') alertCsvError;
sub: any; piwiksub: any; infoSub: any; downloadFilePiwikSub: any; sub: any;
piwiksub: any;
infoSub: any;
downloadFilePiwikSub: any;
properties: EnvProperties; properties: EnvProperties;
constructor(private _projectService: ProjectService, constructor(private _projectService: ProjectService,
private _piwikService: PiwikService, private _piwikService: PiwikService,
private route: ActivatedRoute, private route: ActivatedRoute,
@ -114,6 +118,7 @@ properties:EnvProperties;
private _meta: Meta, private _meta: Meta,
private _title: Title, private _title: Title,
private _router: Router, private _router: Router,
private helper: HelperService,
private seoService: SEOService) { private seoService: SEOService) {
} }
@ -121,6 +126,8 @@ properties:EnvProperties;
this.route.data this.route.data
.subscribe((data: { envSpecific: EnvProperties }) => { .subscribe((data: { envSpecific: EnvProperties }) => {
this.properties = data.envSpecific; this.properties = data.envSpecific;
//this.getDivContents();
this.getPageContents();
this.updateUrl(data.envSpecific.baseLink + this._router.url); this.updateUrl(data.envSpecific.baseLink + this._router.url);
}); });
@ -165,6 +172,18 @@ properties:EnvProperties;
}); });
} }
private getPageContents() {
this.helper.getPageHelpContents(this._router.url, this.properties, this.communityId).subscribe(contents => {
this.pageContents = contents;
})
}
private getDivContents() {
this.helper.getDivHelpContents(this._router.url, this.properties, this.communityId).subscribe(contents => {
this.divContents = contents;
})
}
actionsAfterLoadId() { actionsAfterLoadId() {
this.publications_dynamic = this.publications_dynamic =
"<script type=\"text/javascript\">" "<script type=\"text/javascript\">"
@ -213,6 +232,7 @@ actionsAfterLoadId(){
this.fetchSoftware.getNumForEntity("project", this.projectId, this.properties); this.fetchSoftware.getNumForEntity("project", this.projectId, this.properties);
this.fetchOrps.getNumForEntity("project", this.projectId, this.properties); this.fetchOrps.getNumForEntity("project", this.projectId, this.properties);
} }
ngOnDestroy() { ngOnDestroy() {
if (this.sub) { if (this.sub) {
this.sub.unsubscribe(); this.sub.unsubscribe();
@ -324,6 +344,7 @@ actionsAfterLoadId(){
} }
); );
} }
private getProjectInfoByGrantId(grantId: string, funder: string) { private getProjectInfoByGrantId(grantId: string, funder: string) {
this.warningMessage = ''; this.warningMessage = '';
this.errorMessage = "" this.errorMessage = ""
@ -349,6 +370,7 @@ actionsAfterLoadId(){
} }
); );
} }
actionsAfterGettingProjectInfo() { actionsAfterGettingProjectInfo() {
this.projectName = this.projectInfo.acronym; this.projectName = this.projectInfo.acronym;
if (this.projectName == undefined || this.projectName == '') { if (this.projectName == undefined || this.projectName == '') {
@ -361,7 +383,15 @@ actionsAfterGettingProjectInfo(){
this.piwiksub = this._piwikService.trackView(this.properties, this.projectName, this.piwikSiteId).subscribe(); this.piwiksub = this._piwikService.trackView(this.properties, this.projectName, this.piwikSiteId).subscribe();
} }
this.project= { funderId: "", funderName: this.projectInfo.funder, projectId: this.projectId, projectName: this.projectInfo.title, projectAcronym: this.projectInfo.acronym, startDate: this.projectInfo.startDate, endDate: this.projectInfo.endDate }; this.project = {
funderId: "",
funderName: this.projectInfo.funder,
projectId: this.projectId,
projectName: this.projectInfo.title,
projectAcronym: this.projectInfo.acronym,
startDate: this.projectInfo.startDate,
endDate: this.projectInfo.endDate
};
this.viewsFrameUrl = this.properties.framesAPIURL + 'merge.php?com=query&data=[{"query":"projRepoViews","projTitle":"' + this.projectId + '","table":"","fields":[{"fld":"sum","agg":"sum","type":"column","yaxis":1,"c":false}],"xaxis":{"name":"month","agg":"sum"},"group":"","color":"","type":"chart","size":30,"sort":"xaxis","xStyle":{"r":-30,"s":"0","l":"-","ft":"-","wt":"-"},"title":"","subtitle":"","xaxistitle":"","yaxisheaders":["Monthly views"],"generalxaxis":"","theme":0,"in":[]}]&info_types=["column"]&stacking=&steps=false&fontFamily=Courier&spacing=[5,0,0,0]&style=[{"color":"rgba(0, 0, 0, 1)","size":"18"},{"color":"rgba(0, 0, 0, 1)","size":"18"},{"color":"000000","size":""},{"color":"000000","size":""}]&backgroundColor=rgba(255,255,255,1)&colors[]=rgba(124, 181, 236, 1)&colors[]=rgba(67, 67, 72, 1)&colors[]=rgba(144, 237, 125, 1)&colors[]=rgba(247, 163, 92, 1)&colors[]=rgba(128, 133, 233, 1)&colors[]=rgba(241, 92, 128, 1)&colors[]=rgba(228, 211, 84, 1)&colors[]=rgba(43, 144, 143, 1)&colors[]=rgba(244, 91, 91, 1)&colors[]=rgba(145, 232, 225, 1)&xlinew=0&ylinew=1&legends=true&tooltips=true&persistent=false'; this.viewsFrameUrl = this.properties.framesAPIURL + 'merge.php?com=query&data=[{"query":"projRepoViews","projTitle":"' + this.projectId + '","table":"","fields":[{"fld":"sum","agg":"sum","type":"column","yaxis":1,"c":false}],"xaxis":{"name":"month","agg":"sum"},"group":"","color":"","type":"chart","size":30,"sort":"xaxis","xStyle":{"r":-30,"s":"0","l":"-","ft":"-","wt":"-"},"title":"","subtitle":"","xaxistitle":"","yaxisheaders":["Monthly views"],"generalxaxis":"","theme":0,"in":[]}]&info_types=["column"]&stacking=&steps=false&fontFamily=Courier&spacing=[5,0,0,0]&style=[{"color":"rgba(0, 0, 0, 1)","size":"18"},{"color":"rgba(0, 0, 0, 1)","size":"18"},{"color":"000000","size":""},{"color":"000000","size":""}]&backgroundColor=rgba(255,255,255,1)&colors[]=rgba(124, 181, 236, 1)&colors[]=rgba(67, 67, 72, 1)&colors[]=rgba(144, 237, 125, 1)&colors[]=rgba(247, 163, 92, 1)&colors[]=rgba(128, 133, 233, 1)&colors[]=rgba(241, 92, 128, 1)&colors[]=rgba(228, 211, 84, 1)&colors[]=rgba(43, 144, 143, 1)&colors[]=rgba(244, 91, 91, 1)&colors[]=rgba(145, 232, 225, 1)&xlinew=0&ylinew=1&legends=true&tooltips=true&persistent=false';
@ -374,6 +404,7 @@ actionsAfterGettingProjectInfo(){
this.showLoading = false; this.showLoading = false;
} }
public downloadfile(url: string, filename: string) { public downloadfile(url: string, filename: string) {
this.openLoading(); this.openLoading();
this.setMessageLoading("Downloading CSV file"); this.setMessageLoading("Downloading CSV file");
@ -455,12 +486,14 @@ actionsAfterGettingProjectInfo(){
this._meta.updateTag({content: description}, "name='description'"); this._meta.updateTag({content: description}, "name='description'");
this._meta.updateTag({content: description}, "property='og:description'"); this._meta.updateTag({content: description}, "property='og:description'");
} }
private updateTitle(title: string) { private updateTitle(title: string) {
var _prefix = "OpenAIRE | "; var _prefix = "OpenAIRE | ";
var _title = _prefix + ((title.length > 50) ? title.substring(0, 50) : title); var _title = _prefix + ((title.length > 50) ? title.substring(0, 50) : title);
this._title.setTitle(_title); this._title.setTitle(_title);
this._meta.updateTag({content: _title}, "property='og:title'"); this._meta.updateTag({content: _title}, "property='og:title'");
} }
private updateUrl(url: string) { private updateUrl(url: string) {
this._meta.updateTag({content: url}, "property='og:url'"); this._meta.updateTag({content: url}, "property='og:url'");
} }
@ -470,11 +503,13 @@ actionsAfterGettingProjectInfo(){
this.loading.open(); this.loading.open();
} }
} }
private closeLoading() { private closeLoading() {
if (this.loading) { if (this.loading) {
this.loading.close(); this.loading.close();
} }
} }
private setMessageLoading(message: string) { private setMessageLoading(message: string) {
if (this.loading) { if (this.loading) {
this.loading.message = message; this.loading.message = message;
@ -493,6 +528,7 @@ actionsAfterGettingProjectInfo(){
private handleError(message: string, error) { private handleError(message: string, error) {
console.error("Project Landing Page: " + message, error); console.error("Project Landing Page: " + message, error);
} }
isRouteAvailable(routeToCheck: string) { isRouteAvailable(routeToCheck: string) {
for (let i = 0; i < this.router.config.length; i++) { for (let i = 0; i < this.router.config.length; i++) {
let routePath: string = this.router.config[i].path; let routePath: string = this.router.config[i].path;

View File

@ -5,13 +5,11 @@ import { FormsModule } from '@angular/forms';
import { RouterModule } from '@angular/router'; import { RouterModule } from '@angular/router';
import { ProjectServiceModule} from './projectService.module'; import { ProjectServiceModule} from './projectService.module';
// import {HtmlProgressReportService} from './htmlProgressReport.service';
import {LoadingModalModule} from '../../utils/modal/loadingModal.module'; import {LoadingModalModule} from '../../utils/modal/loadingModal.module';
import {AlertModalModule} from '../../utils/modal/alertModal.module'; import {AlertModalModule} from '../../utils/modal/alertModal.module';
import {ErrorMessagesModule} from '../../utils/errorMessages.module'; import {ErrorMessagesModule} from '../../utils/errorMessages.module';
import { ProjectComponent } from './project.component'; import { ProjectComponent } from './project.component';
// import { ProjectRoutingModule } from './project-routing.module';
import {IFrameModule} from '../../utils/iframe.module'; import {IFrameModule} from '../../utils/iframe.module';
import {MetricsModule} from '../landing-utils/metrics.module'; import {MetricsModule} from '../landing-utils/metrics.module';
import {ReportsServiceModule} from '../../services/reportsService.module'; import {ReportsServiceModule} from '../../services/reportsService.module';
@ -25,6 +23,7 @@ import {FreeGuard} from'../../login/freeGuard.guard';
import {IsRouteEnabled} from '../../error/isRouteEnabled.guard'; import {IsRouteEnabled} from '../../error/isRouteEnabled.guard';
import {Schema2jsonldModule} from '../../sharedComponents/schema2jsonld/schema2jsonld.module'; import {Schema2jsonldModule} from '../../sharedComponents/schema2jsonld/schema2jsonld.module';
import { SEOServiceModule } from '../../sharedComponents/SEO/SEOService.module'; import { SEOServiceModule } from '../../sharedComponents/SEO/SEOService.module';
import {HelperModule} from "../../utils/helper/helper.module";
@NgModule({ @NgModule({
imports: [ imports: [
@ -32,15 +31,13 @@ import { SEOServiceModule } from '../../sharedComponents/SEO/SEOService.module';
LoadingModalModule, AlertModalModule, ErrorMessagesModule, LoadingModalModule, AlertModalModule, ErrorMessagesModule,
TabResultModule, IFrameModule, MetricsModule, ReportsServiceModule, TabResultModule, IFrameModule, MetricsModule, ReportsServiceModule,
PublicationsServiceModule, DatasetsServiceModule, SoftwareServiceModule, OrpsServiceModule, ProjectServiceModule, PublicationsServiceModule, DatasetsServiceModule, SoftwareServiceModule, OrpsServiceModule, ProjectServiceModule,
Schema2jsonldModule, SEOServiceModule Schema2jsonldModule, SEOServiceModule, HelperModule
], ],
declarations: [ declarations: [
ProjectComponent ProjectComponent
], ],
providers:[ providers:[
// ProjectService,
// HtmlProgressReportService
FreeGuard, IsRouteEnabled FreeGuard, IsRouteEnabled
], ],
exports: [ exports: [

View File

@ -9,12 +9,11 @@ import {ProjectService} from './project.service';
imports: [ imports: [
CommonModule, FormsModule CommonModule, FormsModule
], ],
declarations: [ declarations: [],
],
providers: [ providers: [
ProjectService ProjectService
], ],
exports: [ exports: []
]
}) })
export class ProjectServiceModule { } export class ProjectServiceModule {
}

View File

@ -3,19 +3,34 @@
<div class="tm-main uk-width-1-1@s uk-width-1-1@m uk-width-1-1@l uk-row-first "> <div class="tm-main uk-width-1-1@s uk-width-1-1@m uk-width-1-1@l uk-row-first ">
<div class="uk-container uk-margin-top publication"> <div class="uk-container uk-margin-top publication">
<div *ngIf="warningMessage.length > 0" class="uk-alert uk-alert-warning uk-margin-large-top" role="alert">{{warningMessage}}</div> <div *ngIf="warningMessage.length > 0" class="uk-alert uk-alert-warning uk-margin-large-top"
<div *ngIf="errorMessage.length > 0" class="uk-alert uk-alert-danger uk-margin-large-top" role="alert">{{errorMessage}}</div> role="alert">{{warningMessage}}</div>
<div [style.display]="showLoading ? 'inline' : 'none'" class="uk-animation-fade uk-margin-large-top uk-width-1-1" role="alert"><span class="loading-gif uk-align-center" ></span></div> <div *ngIf="errorMessage.length > 0" class="uk-alert uk-alert-danger uk-margin-large-top"
role="alert">{{errorMessage}}</div>
<div [style.display]="showLoading ? 'inline' : 'none'"
class="uk-animation-fade uk-margin-large-top uk-width-1-1" role="alert"><span
class="loading-gif uk-align-center"></span></div>
<div *ngIf="publicationInfo != null" uk-grid class="uk-grid-large"> <div *ngIf="publicationInfo != null" uk-grid class="uk-grid-large">
<helper *ngIf="pageContents && pageContents['top'] && pageContents['top'].length > 0"
[texts]="pageContents['top']" styleName="uk-width-1-1"></helper>
<div class="uk-width-expand@m uk-width-1-1@s"> <div class="uk-width-expand@m uk-width-1-1@s">
<schema2jsonld *ngIf="publicationInfo.record" [data]=publicationInfo.record [URL]="properties.baseLink+'/search/publication?articleId='+articleId"></schema2jsonld> <schema2jsonld *ngIf="publicationInfo.record" [data]=publicationInfo.record
[URL]="properties.baseLink+'/search/publication?articleId='+articleId"></schema2jsonld>
<showTitle [titleName]="publicationInfo.title"></showTitle> <showTitle [titleName]="publicationInfo.title"></showTitle>
<span *ngIf="publicationInfo.types && publicationInfo.types.length > 0"class="uk-label custom-label label-blue label-publication" title="Type">{{publicationInfo.types.join(", ")}}</span>{{" "}} <span *ngIf="publicationInfo.types && publicationInfo.types.length > 0"
<span *ngIf="publicationInfo.languages && publicationInfo.languages.length > 0" class="uk-label custom-label label-language " title="Language">{{publicationInfo.languages.join(", ")}}</span>{{" "}} class="uk-label custom-label label-blue label-publication"
<span *ngIf="publicationInfo.countries && publicationInfo.countries.length > 0" class="uk-label custom-label label-country " title="Country">{{publicationInfo.countries.join(", ")}}</span>{{" "}} title="Type">{{publicationInfo.types.join(", ")}}</span>{{" "}}
<span *ngIf="publicationInfo.languages && publicationInfo.languages.length > 0"
class="uk-label custom-label label-language "
title="Language">{{publicationInfo.languages.join(", ")}}</span>{{" "}}
<span *ngIf="publicationInfo.countries && publicationInfo.countries.length > 0"
class="uk-label custom-label label-country "
title="Country">{{publicationInfo.countries.join(", ")}}</span>{{" "}}
<!-- <span *ngIf="publicationInfo.title && publicationInfo.title.accessMode" [class]="'uk-label custom-label label-'+ publicationInfo.title.accessMode ">{{publicationInfo.title.accessMode}}</span> --> <!-- <span *ngIf="publicationInfo.title && publicationInfo.title.accessMode" [class]="'uk-label custom-label label-'+ publicationInfo.title.accessMode ">{{publicationInfo.title.accessMode}}</span> -->
<span *ngIf="publicationInfo.accessMode" [class]="'uk-label custom-label label-'+ publicationInfo.accessMode " title="Access Mode">{{publicationInfo.accessMode}}</span>{{" "}} <span *ngIf="publicationInfo.accessMode"
[class]="'uk-label custom-label label-'+ publicationInfo.accessMode "
title="Access Mode">{{publicationInfo.accessMode}}</span>{{" "}}
<span *ngIf="publicationInfo.underCurationMessage" class="uk-label custom-label label-underCuration"> <span *ngIf="publicationInfo.underCurationMessage" class="uk-label custom-label label-underCuration">
<span uk-tooltip="pos:right; delay:10" <span uk-tooltip="pos:right; delay:10"
@ -25,7 +40,6 @@
</span></span>{{" "}} </span></span>{{" "}}
<div class=" uk-margin-top"> <div class=" uk-margin-top">
<showAuthors [authors]="publicationInfo.authors"></showAuthors> <showAuthors [authors]="publicationInfo.authors"></showAuthors>
<span *ngIf="publicationInfo.date != ''">({{publicationInfo.date}})</span> <span *ngIf="publicationInfo.date != ''">({{publicationInfo.date}})</span>
@ -34,11 +48,13 @@
<ul class="uk-list"> <ul class="uk-list">
<showPublisher [publisher]="publicationInfo.publisher" <showPublisher [publisher]="publicationInfo.publisher"
[journal]="publicationInfo.journal" [properties]="properties"></showPublisher> [journal]="publicationInfo.journal" [properties]="properties"></showPublisher>
<li *ngIf="publicationInfo.embargoEndDate"><span class="uk-text-bold">Embargo end date:</span> {{publicationInfo.embargoEndDate}}</li> <li *ngIf="publicationInfo.embargoEndDate"><span
class="uk-text-bold">Embargo end date:</span> {{publicationInfo.embargoEndDate}}</li>
<li *ngIf="publicationInfo.identifiers && publicationInfo.identifiers.size > 0"> <li *ngIf="publicationInfo.identifiers && publicationInfo.identifiers.size > 0">
<showIdentifiers [identifiers]="publicationInfo.identifiers"></showIdentifiers> <showIdentifiers [identifiers]="publicationInfo.identifiers"></showIdentifiers>
</li> </li>
<li *ngIf="publicationInfo.subjects || publicationInfo.otherSubjects || publicationInfo.classifiedSubjects"> <li
*ngIf="publicationInfo.subjects || publicationInfo.otherSubjects || publicationInfo.classifiedSubjects">
<showSubjects [subjects]="publicationInfo.subjects" <showSubjects [subjects]="publicationInfo.subjects"
[otherSubjects]="publicationInfo.otherSubjects" [otherSubjects]="publicationInfo.otherSubjects"
[classifiedSubjects]="publicationInfo.classifiedSubjects"> [classifiedSubjects]="publicationInfo.classifiedSubjects">
@ -46,21 +62,26 @@
</li> </li>
</ul> </ul>
<hr *ngIf="publicationInfo.description"> <hr *ngIf="publicationInfo.description">
<div *ngIf="publicationInfo.description" class="uk-text-justify descriptionText uk-height-max-medium uk-overflow-auto"> <div *ngIf="publicationInfo.description"
class="uk-text-justify descriptionText uk-height-max-medium uk-overflow-auto">
<span>{{publicationInfo.description.substring(0, showNumDescription)}}</span <span>{{publicationInfo.description.substring(0, showNumDescription)}}</span
><!--span *ngIf="showNumDescription > thresholdDescription"> ><!--span *ngIf="showNumDescription > thresholdDescription">
<a (click)="showNumDescription = thresholdDescription; scroll()"> <a (click)="showNumDescription = thresholdDescription; scroll()">
View less View less
</a> </a>
</span </span
--><span *ngIf="showNumDescription == thresholdDescription && publicationInfo.description.length > thresholdDescription">...</span --><span
><span *ngIf="showNumDescription == thresholdDescription && publicationInfo.description.length > thresholdDescription" class="uk-text-right"> *ngIf="showNumDescription == thresholdDescription && publicationInfo.description.length > thresholdDescription">...</span
><span
*ngIf="showNumDescription == thresholdDescription && publicationInfo.description.length > thresholdDescription"
class="uk-text-right">
<a (click)="showNumDescription = publicationInfo.description.length;"> <a (click)="showNumDescription = publicationInfo.description.length;">
View more View more
</a> </a>
</span> </span>
</div> </div>
<div *ngIf="publicationInfo.description && showNumDescription > thresholdDescription" class="uk-width-1-1 uk-text-right"> <div *ngIf="publicationInfo.description && showNumDescription > thresholdDescription"
class="uk-width-1-1 uk-text-right">
<!-- scroll() --> <!-- scroll() -->
<a (click)="showNumDescription = thresholdDescription;"> <a (click)="showNumDescription = thresholdDescription;">
View less View less
@ -68,9 +89,6 @@
</div> </div>
<ul class="custom-accordion" uk-accordion> <ul class="custom-accordion" uk-accordion>
<li *ngIf="publicationInfo.references" (click)="activeTab='References'"> <li *ngIf="publicationInfo.references" (click)="activeTab='References'">
@ -92,11 +110,16 @@
<div *ngIf="publicationInfo.references"> --> <div *ngIf="publicationInfo.references"> -->
<div> <div>
<div *ngIf="publicationInfo.references.length > pageSize" class="uk-margin-bottom"> <div *ngIf="publicationInfo.references.length > pageSize" class="uk-margin-bottom">
<span class="uk-h6">{{publicationInfo.references.length | number}} references, page {{referencesPage | number}} of {{totalPages(publicationInfo.references.length) | number}}</span> <span class="uk-h6">{{publicationInfo.references.length | number}}
<paging-no-load class="uk-float-right" [currentPage]="referencesPage" [totalResults]="publicationInfo.references.length" [size]="pageSize" (pageChange)="updateReferencesPage($event)"></paging-no-load> references, page {{referencesPage | number}}
of {{totalPages(publicationInfo.references.length) | number}}</span>
<paging-no-load class="uk-float-right" [currentPage]="referencesPage"
[totalResults]="publicationInfo.references.length" [size]="pageSize"
(pageChange)="updateReferencesPage($event)"></paging-no-load>
</div> </div>
<div *ngFor="let item of publicationInfo.references.slice((referencesPage-1)*pageSize, referencesPage*pageSize)"> <div
*ngFor="let item of publicationInfo.references.slice((referencesPage-1)*pageSize, referencesPage*pageSize)">
<p *ngIf=" item && item['url']" <p *ngIf=" item && item['url']"
class="custom-external custom-icon"> class="custom-external custom-icon">
<a href="{{item['url']}}" target="_blank"> <a href="{{item['url']}}" target="_blank">
@ -131,7 +154,9 @@
<div *ngFor="let provenanceaction of getKeys(publicationInfo.relatedResearchResults)"> <div *ngFor="let provenanceaction of getKeys(publicationInfo.relatedResearchResults)">
<div class="uk-text-large">{{provenanceaction}}</div> <div class="uk-text-large">{{provenanceaction}}</div>
<tabTable [percentageName]="trust" [info]="publicationInfo.relatedResearchResults.get(provenanceaction)" [(properties)]=properties></tabTable> <tabTable [percentageName]="trust"
[info]="publicationInfo.relatedResearchResults.get(provenanceaction)"
[(properties)]=properties></tabTable>
</div> </div>
</div> </div>
</div> </div>
@ -155,7 +180,8 @@
<div *ngIf="publicationInfo.similarResearchResults"> --> <div *ngIf="publicationInfo.similarResearchResults"> -->
<div> <div>
<tabTable [percentageName]="similarity" [info]="publicationInfo.similarResearchResults" [(properties)]=properties></tabTable> <tabTable [percentageName]="similarity" [info]="publicationInfo.similarResearchResults"
[(properties)]=properties></tabTable>
</div> </div>
</div> </div>
</li> </li>
@ -178,16 +204,22 @@
<div *ngIf="publicationInfo.organizations"> --> <div *ngIf="publicationInfo.organizations"> -->
<div> <div>
<div *ngIf="publicationInfo.organizations.length > pageSize" class="uk-margin-bottom"> <div *ngIf="publicationInfo.organizations.length > pageSize" class="uk-margin-bottom">
<span class="uk-text-bold">{{publicationInfo.organizations.length | number}} organizations, page {{organizationsPage | number}} of {{totalPages(publicationInfo.organizations.length) | number}}</span> <span class="uk-text-bold">{{publicationInfo.organizations.length | number}}
<paging-no-load class="uk-float-right" [currentPage]="organizationsPage" [totalResults]="publicationInfo.organizations.length" [size]="pageSize" (pageChange)="updateOrganizationsPage($event)"></paging-no-load> organizations, page {{organizationsPage | number}}
of {{totalPages(publicationInfo.organizations.length) | number}}</span>
<paging-no-load class="uk-float-right" [currentPage]="organizationsPage"
[totalResults]="publicationInfo.organizations.length" [size]="pageSize"
(pageChange)="updateOrganizationsPage($event)"></paging-no-load>
</div> </div>
<table class="uk-table uk-table-small uk-table-divider uk-table-middle "> <table class="uk-table uk-table-small uk-table-divider uk-table-middle ">
<tbody> <tbody>
<tr *ngFor="let organization of publicationInfo.organizations.slice((organizationsPage-1)*pageSize, organizationsPage*pageSize)"> <tr
*ngFor="let organization of publicationInfo.organizations.slice((organizationsPage-1)*pageSize, organizationsPage*pageSize)">
<td> <td>
<a *ngIf="(organization['id']) && ((organization['name']) || (organization['shortname']))" <a *ngIf="(organization['id']) && ((organization['name']) || (organization['shortname']))"
[queryParams]="{organizationId: organization.id}" routerLinkActive="router-link-active" routerLink="/search/organization"> [queryParams]="{organizationId: organization.id}" routerLinkActive="router-link-active"
routerLink="/search/organization">
{{organization['name']}} {{organization['name']}}
<span *ngIf="organization.name && organization.shortname"> ( </span> <span *ngIf="organization.name && organization.shortname"> ( </span>
<span *ngIf="organization.shortname">{{organization.shortname}}</span> <span *ngIf="organization.shortname">{{organization.shortname}}</span>
@ -207,7 +239,8 @@
<td> <td>
<div *ngIf="organization['trust']" title="{{organization['trust']}}%"> <div *ngIf="organization['trust']" title="{{organization['trust']}}%">
<div class="uk-text-center">{{organization['trust']}}%</div> <div class="uk-text-center">{{organization['trust']}}%</div>
<progress class="uk-progress uk-margin-remove" value="{{organization['trust']}}" max="100"></progress> <progress class="uk-progress uk-margin-remove" value="{{organization['trust']}}"
max="100"></progress>
</div> </div>
<div *ngIf="!organization['trust']"> <div *ngIf="!organization['trust']">
<p>no trust available</p> <p>no trust available</p>
@ -234,14 +267,18 @@
</a> </a>
<div class="uk-accordion-content"> <div class="uk-accordion-content">
<div *ngIf="publicationInfo.bioentities && bioentitiesNum > pageSize" class="uk-margin-bottom"> <div *ngIf="publicationInfo.bioentities && bioentitiesNum > pageSize" class="uk-margin-bottom">
<span class="uk-text-bold"> {{bioentitiesNum | number}} bioentities, page {{bioentitiesPage | number}} of {{totalPages(bioentitiesNum) | number}}</span> <span class="uk-text-bold"> {{bioentitiesNum | number}}
<paging-no-load class="uk-float-right" [currentPage]="bioentitiesPage" [totalResults]="bioentitiesNum" [size]="pageSize" (pageChange)="updateBioentitiesPage($event)"></paging-no-load> bioentities, page {{bioentitiesPage | number}} of {{totalPages(bioentitiesNum) | number}}</span>
<paging-no-load class="uk-float-right" [currentPage]="bioentitiesPage"
[totalResults]="bioentitiesNum" [size]="pageSize"
(pageChange)="updateBioentitiesPage($event)"></paging-no-load>
</div> </div>
<table id="bioentitiesTable" class="uk-table "> <table id="bioentitiesTable" class="uk-table ">
<tbody> <tbody>
<ng-container *ngFor="let key of getKeys(publicationInfo.bioentities) let i=index"> <ng-container *ngFor="let key of getKeys(publicationInfo.bioentities) let i=index">
<tr *ngFor="let keyIn of keysToArray(publicationInfo.bioentities.get(key)).slice((bioentitiesPage-1)*pageSize, bioentitiesPage*pageSize)"> <tr
*ngFor="let keyIn of keysToArray(publicationInfo.bioentities.get(key)).slice((bioentitiesPage-1)*pageSize, bioentitiesPage*pageSize)">
<td class="uk-text-center" *ngIf="keyIn"> <td class="uk-text-center" *ngIf="keyIn">
<span class="custom-external custom-icon"> <span class="custom-external custom-icon">
<a href="{{publicationInfo.bioentities.get(key).get(keyIn)}}" <a href="{{publicationInfo.bioentities.get(key).get(keyIn)}}"
@ -272,14 +309,21 @@
<!-- </span> --> <!-- </span> -->
</a> </a>
<div class="uk-accordion-content"> <div class="uk-accordion-content">
<div *ngIf="publicationInfo.software && publicationInfo.software.length > pageSize" class="uk-margin-bottom"> <div *ngIf="publicationInfo.software && publicationInfo.software.length > pageSize"
<span class="uk-text-bold">{{publicationInfo.software.length | number}} software results, page {{softwarePage | number}} of {{totalPages(publicationInfo.software.length) | number}}</span> class="uk-margin-bottom">
<paging-no-load class="uk-float-right" [currentPage]="softwarePage" [totalResults]="publicationInfo.software.length" [size]="pageSize" (pageChange)="updateSoftwarePage($event)"></paging-no-load> <span class="uk-text-bold">{{publicationInfo.software.length | number}}
software results, page {{softwarePage | number}}
of {{totalPages(publicationInfo.software.length) | number}}</span>
<paging-no-load class="uk-float-right" [currentPage]="softwarePage"
[totalResults]="publicationInfo.software.length" [size]="pageSize"
(pageChange)="updateSoftwarePage($event)"></paging-no-load>
</div> </div>
<table id="softwareTable" class="uk-table "> <table id="softwareTable" class="uk-table ">
<tbody> <tbody>
<tr *ngFor="let item of publicationInfo.software.slice((softwarePage-1)*pageSize, softwarePage*pageSize)" class="uk-text-center"> <tr
*ngFor="let item of publicationInfo.software.slice((softwarePage-1)*pageSize, softwarePage*pageSize)"
class="uk-text-center">
<td> <td>
<span class="custom-external custom-icon"> <span class="custom-external custom-icon">
<a href="{{item.url}}" target="_blank"> <a href="{{item.url}}" target="_blank">
@ -293,19 +337,25 @@
</div> </div>
</li> </li>
<li (click)="activeTab='Other Citations'" *ngIf="publicationInfo.openCitations && publicationInfo.openCitations.length > 0"> <li (click)="activeTab='Other Citations'"
*ngIf="publicationInfo.openCitations && publicationInfo.openCitations.length > 0">
<a class="uk-accordion-title" href="#"> <a class="uk-accordion-title" href="#">
Open Citations Open Citations
({{publicationInfo.openCitations.length | number}}) ({{publicationInfo.openCitations.length | number}})
</a> </a>
<div class="uk-accordion-content"> <div class="uk-accordion-content">
<div *ngIf="publicationInfo.openCitations.length > pageSize" class="uk-margin-bottom"> <div *ngIf="publicationInfo.openCitations.length > pageSize" class="uk-margin-bottom">
<span class="uk-h6">{{publicationInfo.openCitations.length | number}} open citations, page {{openCitationsPage | number}} of {{totalPages(publicationInfo.openCitations.length) | number}}</span> <span class="uk-h6">{{publicationInfo.openCitations.length | number}}
<paging-no-load class="uk-float-right" [currentPage]="openCitationsPage" [totalResults]="publicationInfo.openCitations.length" [size]="pageSize" (pageChange)="updateOpenCitationsPage($event)"></paging-no-load> open citations, page {{openCitationsPage | number}}
of {{totalPages(publicationInfo.openCitations.length) | number}}</span>
<paging-no-load class="uk-float-right" [currentPage]="openCitationsPage"
[totalResults]="publicationInfo.openCitations.length" [size]="pageSize"
(pageChange)="updateOpenCitationsPage($event)"></paging-no-load>
</div> </div>
<ul class="uk-list uk-list-divider uk-margin"> <ul class="uk-list uk-list-divider uk-margin">
<li *ngFor="let result of publicationInfo.openCitations.slice((openCitationsPage-1)*pageSize, openCitationsPage*pageSize)"> <li
*ngFor="let result of publicationInfo.openCitations.slice((openCitationsPage-1)*pageSize, openCitationsPage*pageSize)">
<!-- <h5> <!-- <h5>
<span *ngIf="result.url" class="custom-external custom-icon" > <span *ngIf="result.url" class="custom-external custom-icon" >
<a target="_blank" [href]="result.url" *ngIf="result['title']" [innerHTML]="result['title']"></a> <a target="_blank" [href]="result.url" *ngIf="result['title']" [innerHTML]="result['title']"></a>
@ -343,7 +393,9 @@
({{result.year}}) ({{result.year}})
</span> </span>
</div> </div>
<span *ngIf="result.doi">Identifier: <a *ngIf="result.doi" target="_blank" class="custom-external custom-icon" href="{{doiURL}}{{result.doi}}">doi: {{result.doi}}</a></span> <span *ngIf="result.doi">Identifier: <a *ngIf="result.doi" target="_blank"
class="custom-external custom-icon"
href="{{doiURL}}{{result.doi}}">doi: {{result.doi}}</a></span>
</li> </li>
</ul> </ul>
</div> </div>
@ -368,13 +420,15 @@
</div> </div>
</li> </li>
<li (click)="activeTab='Other Versions'" *ngIf="properties.environment == 'development' && publicationInfo.deletedByInferenceIds"> <li (click)="activeTab='Other Versions'"
*ngIf="properties.environment == 'development' && publicationInfo.deletedByInferenceIds">
<a class="uk-accordion-title" href="#"> <a class="uk-accordion-title" href="#">
Other Versions Other Versions
({{publicationInfo.deletedByInferenceIds.length | number}}) ({{publicationInfo.deletedByInferenceIds.length | number}})
</a> </a>
<div *ngIf="activeTab=='Other Versions'" class="uk-accordion-content"> <div *ngIf="activeTab=='Other Versions'" class="uk-accordion-content">
<deletedByInference [id]="articleId" [ids]="publicationInfo.deletedByInferenceIds" [type]="'publications'"></deletedByInference> <deletedByInference [id]="articleId" [ids]="publicationInfo.deletedByInferenceIds"
[type]="'publications'"></deletedByInference>
</div> </div>
</li> </li>
</ul> </ul>
@ -394,7 +448,8 @@
<li *ngIf="publicationInfo.hostedBy_collectedFrom && publicationInfo.hostedBy_collectedFrom.length > 0"> <li *ngIf="publicationInfo.hostedBy_collectedFrom && publicationInfo.hostedBy_collectedFrom.length > 0">
<availableOn [availableOn]="publicationInfo.hostedBy_collectedFrom"></availableOn> <availableOn [availableOn]="publicationInfo.hostedBy_collectedFrom"></availableOn>
</li> </li>
<li *ngIf="publicationInfo.fundedByProjects != undefined && publicationInfo.fundedByProjects.length > 0"> <li
*ngIf="publicationInfo.fundedByProjects != undefined && publicationInfo.fundedByProjects.length > 0">
<fundedBy [fundedByProjects]="publicationInfo.fundedByProjects"></fundedBy> <fundedBy [fundedByProjects]="publicationInfo.fundedByProjects"></fundedBy>
</li> </li>
@ -433,31 +488,59 @@
</li> </li>
</ul> </ul>
<button *ngIf="isRouteAvailable('participate/direct-claim') " class=" uk-button portal-button uk-width-1-1 "> <button *ngIf="isRouteAvailable('participate/direct-claim') "
class=" uk-button portal-button uk-width-1-1 ">
<span class="uk-icon"> <span class="uk-icon">
<svg icon="link" ratio="1" xmlns="http://www.w3.org/2000/svg" width="25" viewBox="0 0 20 20" height="25"><path d="M10.625,12.375 L7.525,15.475 C6.825,16.175 5.925,16.175 5.225,15.475 L4.525,14.775 C3.825,14.074 3.825,13.175 4.525,12.475 L7.625,9.375" fill="none" stroke="#000" stroke-width="1.1"></path><path d="M9.325,7.375 L12.425,4.275 C13.125,3.575 14.025,3.575 14.724,4.275 L15.425,4.975 C16.125,5.675 16.125,6.575 15.425,7.275 L12.325,10.375" fill="none" stroke="#000" stroke-width="1.1"></path><path d="M7.925,11.875 L11.925,7.975" fill="none" stroke="#000" stroke-width="1.1"></path></svg> <svg icon="link" ratio="1" xmlns="http://www.w3.org/2000/svg" width="25" viewBox="0 0 20 20"
height="25"><path
d="M10.625,12.375 L7.525,15.475 C6.825,16.175 5.925,16.175 5.225,15.475 L4.525,14.775 C3.825,14.074 3.825,13.175 4.525,12.475 L7.625,9.375"
fill="none" stroke="#000" stroke-width="1.1"></path><path
d="M9.325,7.375 L12.425,4.275 C13.125,3.575 14.025,3.575 14.724,4.275 L15.425,4.975 C16.125,5.675 16.125,6.575 15.425,7.275 L12.325,10.375"
fill="none" stroke="#000" stroke-width="1.1"></path><path d="M7.925,11.875 L11.925,7.975"
fill="none" stroke="#000"
stroke-width="1.1"></path></svg>
</span> Link this publication to... </span> Link this publication to...
</button> </button>
<div *ngIf="isRouteAvailable('participate/direct-claim')" class=" uk-margin-remove-top uk-padding-small" <div *ngIf="isRouteAvailable('participate/direct-claim')" class=" uk-margin-remove-top uk-padding-small"
uk-dropdown="pos: bottom-left; mode:click" style="background: transparent !important;box-shadow: none; max-width: 70px !important; min-width: 70px !important;"> uk-dropdown="pos: bottom-left; mode:click"
style="background: transparent !important;box-shadow: none; max-width: 70px !important; min-width: 70px !important;">
<ul class="uk-iconnav uk-iconnav-vertical"> <ul class="uk-iconnav uk-iconnav-vertical">
<li uk-tooltip="pos:right;" title="<div class='tooltip-custom-font-size '>Projects</div>"> <li uk-tooltip="pos:right;" title="<div class='tooltip-custom-font-size '>Projects</div>">
<a class=" uk-icon-button portal-button shadowBox" style="padding: 6px;" [queryParams]="routerHelper.createQueryParams(['id','type','linkTo'],[articleId,'publication','project'])" routerLinkActive="router-link-active" routerLink="/participate/direct-claim"> <a class=" uk-icon-button portal-button shadowBox" style="padding: 6px;"
[queryParams]="routerHelper.createQueryParams(['id','type','linkTo'],[articleId,'publication','project'])"
routerLinkActive="router-link-active" routerLink="/participate/direct-claim">
<span class="uk-icon"> <span class="uk-icon">
<svg width="20" height="20" viewBox="0 0 20 20" xmlns="http://www.w3.org/2000/svg" icon="album" ratio="1"><rect x="5" y="2" width="10" height="1"></rect><rect x="3" y="4" width="14" height="1"></rect><rect fill="none" stroke="#000" x="1.5" y="6.5" width="17" height="11"></rect></svg></span> <svg width="20" height="20" viewBox="0 0 20 20" xmlns="http://www.w3.org/2000/svg" icon="album"
ratio="1"><rect x="5" y="2" width="10" height="1"></rect><rect x="3" y="4" width="14"
height="1"></rect><rect
fill="none" stroke="#000" x="1.5" y="6.5" width="17" height="11"></rect></svg></span>
</a> </a>
</li> </li>
<li uk-tooltip="pos:right;" title="<div class='tooltip-custom-font-size '>Communities</div>"> <li uk-tooltip="pos:right;" title="<div class='tooltip-custom-font-size '>Communities</div>">
<a class=" uk-icon-button portal-button shadowBox" style="padding: 6px;" [queryParams]="routerHelper.createQueryParams(['id','type','linkTo'],[articleId,'publication','context'])" routerLinkActive="router-link-active" routerLink="/participate/direct-claim" > <a class=" uk-icon-button portal-button shadowBox" style="padding: 6px;"
[queryParams]="routerHelper.createQueryParams(['id','type','linkTo'],[articleId,'publication','context'])"
routerLinkActive="router-link-active" routerLink="/participate/direct-claim">
<span class="uk-icon"> <span class="uk-icon">
<svg width="20" height="20" viewBox="0 0 20 20" xmlns="http://www.w3.org/2000/svg" icon="users" ratio="1"><circle fill="none" stroke="#000" stroke-width="1.1" cx="7.7" cy="8.6" r="3.5"></circle><path fill="none" stroke="#000" stroke-width="1.1" d="M1,18.1 C1.7,14.6 4.4,12.1 7.6,12.1 C10.9,12.1 13.7,14.8 14.3,18.3"></path><path fill="none" stroke="#000" 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> <svg width="20" height="20" viewBox="0 0 20 20" xmlns="http://www.w3.org/2000/svg"
icon="users" ratio="1"><circle fill="none" stroke="#000" stroke-width="1.1" cx="7.7"
cy="8.6" r="3.5"></circle><path fill="none" stroke="#000"
stroke-width="1.1"
d="M1,18.1 C1.7,14.6 4.4,12.1 7.6,12.1 C10.9,12.1 13.7,14.8 14.3,18.3"></path><path
fill="none" stroke="#000" 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>
</a> </a>
</li> </li>
<li uk-tooltip="pos:right;" title="<div class='tooltip-custom-font-size uk-margin-small'>Other research results</div>"> <li uk-tooltip="pos:right;"
<a class=" uk-icon-button portal-button shadowBox" style="padding: 6px;" [queryParams]="routerHelper.createQueryParams(['id','type','linkTo'],[articleId,'publication','result'])" routerLinkActive="router-link-active" routerLink="/participate/direct-claim" > title="<div class='tooltip-custom-font-size uk-margin-small'>Other research results</div>">
<a class=" uk-icon-button portal-button shadowBox" style="padding: 6px;"
[queryParams]="routerHelper.createQueryParams(['id','type','linkTo'],[articleId,'publication','result'])"
routerLinkActive="router-link-active" routerLink="/participate/direct-claim">
<span class="uk-icon"> <span class="uk-icon">
<svg width="20" height="20" viewBox="0 0 20 20" xmlns="http://www.w3.org/2000/svg" icon="copy" ratio="1"><rect fill="none" stroke="#000" x="3.5" y="2.5" width="12" height="16"></rect><polyline fill="none" stroke="#000" points="5 0.5 17.5 0.5 17.5 17"></polyline></svg></span> <svg width="20" height="20" viewBox="0 0 20 20" xmlns="http://www.w3.org/2000/svg"
icon="copy" ratio="1"><rect fill="none" stroke="#000" x="3.5" y="2.5" width="12"
height="16"></rect><polyline fill="none" stroke="#000"
points="5 0.5 17.5 0.5 17.5 17"></polyline></svg></span>
</a> </a>
</li> </li>
@ -466,6 +549,8 @@
</div> </div>
</div> </div>
<helper *ngIf="pageContents && pageContents['bottom'] && pageContents['bottom'].length > 0"
[texts]="pageContents['bottom']" styleName="uk-width-1-1"></helper>
</div> </div>
</div> </div>

View File

@ -1,9 +1,6 @@
import {Component, ViewChild} from '@angular/core'; import {Component, Input} from '@angular/core';
import {Input} from '@angular/core';
import {ActivatedRoute, Router} from '@angular/router'; import {ActivatedRoute, Router} from '@angular/router';
import {Title, Meta} from '@angular/platform-browser'; import {Meta, Title} from '@angular/platform-browser';
import {Observable} from 'rxjs';
import {EnvProperties} from '../../utils/properties/env-properties'; import {EnvProperties} from '../../utils/properties/env-properties';
import {PublicationInfo} from '../../utils/entities/publicationInfo'; import {PublicationInfo} from '../../utils/entities/publicationInfo';
@ -13,6 +10,7 @@ import {PiwikService} from '../../utils/piwik/piwik.service';
import {PublicationService} from './publication.service'; import {PublicationService} from './publication.service';
import {SEOService} from '../../sharedComponents/SEO/SEO.service'; import {SEOService} from '../../sharedComponents/SEO/SEO.service';
import {HelperFunctions} from "../../utils/HelperFunctions.class"; import {HelperFunctions} from "../../utils/HelperFunctions.class";
import {HelperService} from "../../utils/helper/helper.service";
@Component({ @Component({
@ -23,6 +21,7 @@ import {HelperFunctions} from "../../utils/HelperFunctions.class";
export class PublicationComponent { export class PublicationComponent {
@Input() piwikSiteId = null; @Input() piwikSiteId = null;
@Input() communityId = null;
public publicationInfo: PublicationInfo; public publicationInfo: PublicationInfo;
public articleId: string; public articleId: string;
@ -70,8 +69,12 @@ export class PublicationComponent {
private doi: string; private doi: string;
public doiURL: string; public doiURL: string;
private result; private result;
sub: any; piwiksub: any; infoSub: any; sub: any;
piwiksub: any;
infoSub: any;
properties: EnvProperties; properties: EnvProperties;
public pageContents = null;
public divContents = null;
constructor(private _publicationService: PublicationService, constructor(private _publicationService: PublicationService,
private _piwikService: PiwikService, private _piwikService: PiwikService,
@ -80,6 +83,7 @@ export class PublicationComponent {
private _meta: Meta, private _meta: Meta,
private _title: Title, private _title: Title,
private _router: Router, private _router: Router,
private helper: HelperService,
private seoService: SEOService) { private seoService: SEOService) {
} }
@ -87,6 +91,8 @@ export class PublicationComponent {
this.route.data this.route.data
.subscribe((data: { envSpecific: EnvProperties }) => { .subscribe((data: { envSpecific: EnvProperties }) => {
this.properties = data.envSpecific; this.properties = data.envSpecific;
//this.getDivContents();
this.getPageContents();
this.doiURL = this.properties.doiURL; this.doiURL = this.properties.doiURL;
this.updateUrl(data.envSpecific.baseLink + this._router.url); this.updateUrl(data.envSpecific.baseLink + this._router.url);
@ -118,6 +124,18 @@ export class PublicationComponent {
}); });
} }
private getPageContents() {
this.helper.getPageHelpContents(this._router.url, this.properties, this.communityId).subscribe(contents => {
this.pageContents = contents;
})
}
private getDivContents() {
this.helper.getDivHelpContents(this._router.url, this.properties, this.communityId).subscribe(contents => {
this.divContents = contents;
})
}
ngOnDestroy() { ngOnDestroy() {
if (this.sub) { if (this.sub) {
this.sub.unsubscribe(); this.sub.unsubscribe();
@ -187,7 +205,16 @@ export class PublicationComponent {
} }
this.relatedResearchResultsNum = relatedResearchResultsNum; this.relatedResearchResultsNum = relatedResearchResultsNum;
this.result = {id: this.articleId, type :"publication", source : "openaire", title: this.publicationInfo.title,url: '', result: '', accessRights: /*this.publicationInfo.title.accessMode*/this.publicationInfo.accessMode, embargoEndDate: ''}; this.result = {
id: this.articleId,
type: "publication",
source: "openaire",
title: this.publicationInfo.title,
url: '',
result: '',
accessRights: /*this.publicationInfo.title.accessMode*/this.publicationInfo.accessMode,
embargoEndDate: ''
};
// this.result.push(result_); // this.result.push(result_);
if (this.publicationInfo.identifiers != undefined && this.publicationInfo.identifiers.has('doi')) { if (this.publicationInfo.identifiers != undefined && this.publicationInfo.identifiers.has('doi')) {
@ -243,6 +270,7 @@ export class PublicationComponent {
this._meta.updateTag({content: description}, "name='description'"); this._meta.updateTag({content: description}, "name='description'");
this._meta.updateTag({content: description}, "property='og:description'"); this._meta.updateTag({content: description}, "property='og:description'");
} }
private updateTitle(title: string) { private updateTitle(title: string) {
var _prefix = "OpenAIRE | "; var _prefix = "OpenAIRE | ";
var _title = _prefix + ((title.length > 50) ? title.substring(0, 50) : title); var _title = _prefix + ((title.length > 50) ? title.substring(0, 50) : title);
@ -289,6 +317,7 @@ export class PublicationComponent {
}); });
return keys; return keys;
} }
public getKeys(map) { public getKeys(map) {
return Array.from(map.keys()); return Array.from(map.keys());
} }
@ -296,6 +325,7 @@ export class PublicationComponent {
public scroll() { public scroll() {
HelperFunctions.scroll(); HelperFunctions.scroll();
} }
/* /*
start(i: number, bioentitiesPage: number) { start(i: number, bioentitiesPage: number) {
let sum = 0; let sum = 0;
@ -362,6 +392,7 @@ export class PublicationComponent {
private handleError(message: string, error) { private handleError(message: string, error) {
console.error("Publication Landing Page: " + message, error); console.error("Publication Landing Page: " + message, error);
} }
isRouteAvailable(routeToCheck: string) { isRouteAvailable(routeToCheck: string) {
for (let i = 0; i < this.router.config.length; i++) { for (let i = 0; i < this.router.config.length; i++) {
let routePath: string = this.router.config[i].path; let routePath: string = this.router.config[i].path;

View File

@ -24,13 +24,14 @@ import { SEOServiceModule } from '../../sharedComponents/SEO/SEOService.module';
import {DeletedByInferenceModule} from '../landing-utils/deletedByInference/deletedByInference.module'; import {DeletedByInferenceModule} from '../landing-utils/deletedByInference/deletedByInference.module';
import {ShowAuthorsModule} from "../../utils/authors/showAuthors.module"; import {ShowAuthorsModule} from "../../utils/authors/showAuthors.module";
import {HelperModule} from "../../utils/helper/helper.module";
@NgModule({ @NgModule({
imports: [ imports: [
CommonModule, FormsModule, LandingModule, SharedModule, RouterModule, CommonModule, FormsModule, LandingModule, SharedModule, RouterModule,
CiteThisModule, PagingModule, ResultLandingModule, IFrameModule, CiteThisModule, PagingModule, ResultLandingModule, IFrameModule,
MetricsModule, AltMetricsModule, ConfigurationServiceModule, Schema2jsonldModule, SEOServiceModule, MetricsModule, AltMetricsModule, ConfigurationServiceModule, Schema2jsonldModule, SEOServiceModule,
DeletedByInferenceModule, ShowAuthorsModule DeletedByInferenceModule, ShowAuthorsModule, HelperModule
], ],
declarations: [ declarations: [
PublicationComponent PublicationComponent

View File

@ -4,20 +4,36 @@
<div class="uk-container uk-margin-top software"> <div class="uk-container uk-margin-top software">
<div *ngIf="warningMessage.length > 0" class="uk-alert uk-alert-warning uk-margin-large-top" role="alert">{{warningMessage}}</div> <div *ngIf="warningMessage.length > 0" class="uk-alert uk-alert-warning uk-margin-large-top"
<div *ngIf="errorMessage.length > 0" class="uk-alert uk-alert-danger uk-margin-large-top" role="alert">{{errorMessage}}</div> role="alert">{{warningMessage}}</div>
<div [style.display]="showLoading ? 'inline' : 'none'" class="uk-animation-fade uk-margin-large-top uk-width-1-1" role="alert"><span class="loading-gif uk-align-center" ></span></div> <div *ngIf="errorMessage.length > 0" class="uk-alert uk-alert-danger uk-margin-large-top"
role="alert">{{errorMessage}}</div>
<div [style.display]="showLoading ? 'inline' : 'none'"
class="uk-animation-fade uk-margin-large-top uk-width-1-1" role="alert"><span
class="loading-gif uk-align-center"></span></div>
<div *ngIf="softwareInfo != null" uk-grid class="uk-grid-large"> <div *ngIf="softwareInfo != null" uk-grid class="uk-grid-large">
<helper *ngIf="pageContents && pageContents['top'] && pageContents['top'].length > 0"
[texts]="pageContents['top']" styleName="uk-width-1-1"></helper>
<div class="uk-width-expand@m uk-width-1-1@s"> <div class="uk-width-expand@m uk-width-1-1@s">
<schema2jsonld *ngIf="softwareInfo.record" [data]=softwareInfo.record [URL]="properties.baseLink+'/search/software?softwareId='+softwareId"></schema2jsonld> <schema2jsonld *ngIf="softwareInfo.record" [data]=softwareInfo.record
[URL]="properties.baseLink+'/search/software?softwareId='+softwareId"></schema2jsonld>
<showTitle [titleName]="softwareInfo.title"></showTitle> <showTitle [titleName]="softwareInfo.title"></showTitle>
<span *ngIf="softwareInfo.types && softwareInfo.types.length > 0"class="uk-label custom-label label-software " title="Type">{{softwareInfo.types.join(", ")}}</span>{{" "}} <span *ngIf="softwareInfo.types && softwareInfo.types.length > 0"
<span *ngIf="softwareInfo.programmingLanguages && softwareInfo.programmingLanguages.length > 0" class="uk-label custom-label label-progrLanguage " title="Programming Language">{{softwareInfo.programmingLanguages.join(", ")}}</span>{{" "}} class="uk-label custom-label label-software "
<span *ngIf="softwareInfo.languages && softwareInfo.languages.length > 0" class="uk-label custom-label label-language " title="Language">{{softwareInfo.languages.join(", ")}}</span>{{" "}} title="Type">{{softwareInfo.types.join(", ")}}</span>{{" "}}
<span *ngIf="softwareInfo.countries && softwareInfo.countries.length > 0" class="uk-label custom-label label-country " title="Country">{{softwareInfo.countries.join(", ")}}</span>{{" "}} <span *ngIf="softwareInfo.programmingLanguages && softwareInfo.programmingLanguages.length > 0"
class="uk-label custom-label label-progrLanguage "
title="Programming Language">{{softwareInfo.programmingLanguages.join(", ")}}</span>{{" "}}
<span *ngIf="softwareInfo.languages && softwareInfo.languages.length > 0"
class="uk-label custom-label label-language "
title="Language">{{softwareInfo.languages.join(", ")}}</span>{{" "}}
<span *ngIf="softwareInfo.countries && softwareInfo.countries.length > 0"
class="uk-label custom-label label-country "
title="Country">{{softwareInfo.countries.join(", ")}}</span>{{" "}}
<!-- <span *ngIf="softwareInfo.title && softwareInfo.title.accessMode" [class]="'uk-label custom-label label-'+ softwareInfo.title.accessMode " title="Access Mode">{{softwareInfo.title.accessMode}}</span> --> <!-- <span *ngIf="softwareInfo.title && softwareInfo.title.accessMode" [class]="'uk-label custom-label label-'+ softwareInfo.title.accessMode " title="Access Mode">{{softwareInfo.title.accessMode}}</span> -->
<span *ngIf="softwareInfo.accessMode" [class]="'uk-label custom-label label-'+ softwareInfo.accessMode " title="Access Mode">{{softwareInfo.accessMode}}</span>{{" "}} <span *ngIf="softwareInfo.accessMode" [class]="'uk-label custom-label label-'+ softwareInfo.accessMode "
title="Access Mode">{{softwareInfo.accessMode}}</span>{{" "}}
<span *ngIf="softwareInfo.underCurationMessage" class="uk-label custom-label label-underCuration "> <span *ngIf="softwareInfo.underCurationMessage" class="uk-label custom-label label-underCuration ">
<span uk-tooltip="pos:right; delay:10" <span uk-tooltip="pos:right; delay:10"
title="{{buildCurationTooltip()}}"> title="{{buildCurationTooltip()}}">
@ -41,7 +57,8 @@
<showPublisher [publisher]="softwareInfo.publisher" [properties]="properties" <showPublisher [publisher]="softwareInfo.publisher" [properties]="properties"
[journal]="softwareInfo.journal"></showPublisher> [journal]="softwareInfo.journal"></showPublisher>
<li *ngIf="softwareInfo.embargoEndDate"><span class="uk-text-bold">Embargo end date:</span> {{softwareInfo.embargoEndDate}}</li> <li *ngIf="softwareInfo.embargoEndDate"><span
class="uk-text-bold">Embargo end date:</span> {{softwareInfo.embargoEndDate}}</li>
<li *ngIf="softwareInfo.identifiers && softwareInfo.identifiers.size > 0"> <li *ngIf="softwareInfo.identifiers && softwareInfo.identifiers.size > 0">
<showIdentifiers [identifiers]="softwareInfo.identifiers"></showIdentifiers> <showIdentifiers [identifiers]="softwareInfo.identifiers"></showIdentifiers>
</li> </li>
@ -53,16 +70,21 @@
</li> </li>
</ul> </ul>
<hr *ngIf="softwareInfo.description"> <hr *ngIf="softwareInfo.description">
<div *ngIf="softwareInfo.description" class="uk-text-justify descriptionText uk-height-max-medium uk-overflow-auto"> <div *ngIf="softwareInfo.description"
class="uk-text-justify descriptionText uk-height-max-medium uk-overflow-auto">
<span>{{softwareInfo.description.substring(0, showNumDescription)}}</span <span>{{softwareInfo.description.substring(0, showNumDescription)}}</span
><span *ngIf="showNumDescription == thresholdDescription && softwareInfo.description.length > thresholdDescription">...</span ><span
><span *ngIf="showNumDescription == thresholdDescription && softwareInfo.description.length > thresholdDescription" class="uk-text-right"> *ngIf="showNumDescription == thresholdDescription && softwareInfo.description.length > thresholdDescription">...</span
><span
*ngIf="showNumDescription == thresholdDescription && softwareInfo.description.length > thresholdDescription"
class="uk-text-right">
<a (click)="showNumDescription = softwareInfo.description.length;"> <a (click)="showNumDescription = softwareInfo.description.length;">
View more View more
</a> </a>
</span> </span>
</div> </div>
<div *ngIf="softwareInfo.description && showNumDescription > thresholdDescription" class="uk-width-1-1 uk-text-right"> <div *ngIf="softwareInfo.description && showNumDescription > thresholdDescription"
class="uk-width-1-1 uk-text-right">
<a (click)="showNumDescription = thresholdDescription;"> <a (click)="showNumDescription = thresholdDescription;">
View less View less
</a> </a>
@ -115,7 +137,9 @@
<div *ngFor="let provenanceaction of getKeys(softwareInfo.relatedResearchResults)"> <div *ngFor="let provenanceaction of getKeys(softwareInfo.relatedResearchResults)">
<div class="uk-text-large">{{provenanceaction}}</div> <div class="uk-text-large">{{provenanceaction}}</div>
<tabTable [percentageName]="trust" [info]="softwareInfo.relatedResearchResults.get(provenanceaction)" [(properties)]=properties></tabTable> <tabTable [percentageName]="trust"
[info]="softwareInfo.relatedResearchResults.get(provenanceaction)"
[(properties)]=properties></tabTable>
</div> </div>
</div> </div>
</div> </div>
@ -139,7 +163,8 @@
<div *ngIf="softwareInfo.similarResearchResults"> --> <div *ngIf="softwareInfo.similarResearchResults"> -->
<div> <div>
<tabTable [percentageName]="similarity" [info]="softwareInfo.similarResearchResults" [(properties)]=properties></tabTable> <tabTable [percentageName]="similarity" [info]="softwareInfo.similarResearchResults"
[(properties)]=properties></tabTable>
</div> </div>
</div> </div>
</li> </li>
@ -162,13 +187,15 @@
</div> </div>
</li> </li>
<li (click)="activeTab='Other Versions'" *ngIf="properties.environment == 'development' && softwareInfo.deletedByInferenceIds"> <li (click)="activeTab='Other Versions'"
*ngIf="properties.environment == 'development' && softwareInfo.deletedByInferenceIds">
<a class="uk-accordion-title" href="#"> <a class="uk-accordion-title" href="#">
Other Versions Other Versions
({{softwareInfo.deletedByInferenceIds.length | number}}) ({{softwareInfo.deletedByInferenceIds.length | number}})
</a> </a>
<div *ngIf="activeTab=='Other Versions'" class="uk-accordion-content"> <div *ngIf="activeTab=='Other Versions'" class="uk-accordion-content">
<deletedByInference [id]="softwareId" [ids]="softwareInfo.deletedByInferenceIds" [type]="'software'"></deletedByInference> <deletedByInference [id]="softwareId" [ids]="softwareInfo.deletedByInferenceIds"
[type]="'software'"></deletedByInference>
</div> </div>
</li> </li>
</ul> </ul>
@ -252,30 +279,57 @@
</li--> </li-->
</ul> </ul>
<button *ngIf="isRouteAvailable('participate/direct-claim') " class=" uk-button portal-button uk-width-1-1 "> <button *ngIf="isRouteAvailable('participate/direct-claim') "
class=" uk-button portal-button uk-width-1-1 ">
<span class="uk-icon"> <span class="uk-icon">
<svg icon="link" ratio="1" xmlns="http://www.w3.org/2000/svg" width="25" viewBox="0 0 20 20" height="25"><path d="M10.625,12.375 L7.525,15.475 C6.825,16.175 5.925,16.175 5.225,15.475 L4.525,14.775 C3.825,14.074 3.825,13.175 4.525,12.475 L7.625,9.375" fill="none" stroke="#000" stroke-width="1.1"></path><path d="M9.325,7.375 L12.425,4.275 C13.125,3.575 14.025,3.575 14.724,4.275 L15.425,4.975 C16.125,5.675 16.125,6.575 15.425,7.275 L12.325,10.375" fill="none" stroke="#000" stroke-width="1.1"></path><path d="M7.925,11.875 L11.925,7.975" fill="none" stroke="#000" stroke-width="1.1"></path></svg> <svg icon="link" ratio="1" xmlns="http://www.w3.org/2000/svg" width="25" viewBox="0 0 20 20"
height="25"><path
d="M10.625,12.375 L7.525,15.475 C6.825,16.175 5.925,16.175 5.225,15.475 L4.525,14.775 C3.825,14.074 3.825,13.175 4.525,12.475 L7.625,9.375"
fill="none" stroke="#000" stroke-width="1.1"></path><path
d="M9.325,7.375 L12.425,4.275 C13.125,3.575 14.025,3.575 14.724,4.275 L15.425,4.975 C16.125,5.675 16.125,6.575 15.425,7.275 L12.325,10.375"
fill="none" stroke="#000" stroke-width="1.1"></path><path d="M7.925,11.875 L11.925,7.975"
fill="none" stroke="#000"
stroke-width="1.1"></path></svg>
</span> Link this software to... </span> Link this software to...
</button> </button>
<div *ngIf="isRouteAvailable('participate/direct-claim') " uk-dropdown="pos: bottom-left; mode:click" style="background: transparent !important;box-shadow: none; max-width: 70px !important; min-width: 70px !important;"> <div *ngIf="isRouteAvailable('participate/direct-claim') " uk-dropdown="pos: bottom-left; mode:click"
style="background: transparent !important;box-shadow: none; max-width: 70px !important; min-width: 70px !important;">
<ul class="uk-iconnav uk-iconnav-vertical"> <ul class="uk-iconnav uk-iconnav-vertical">
<li uk-tooltip="pos:right;" title="<div class='tooltip-custom-font-size '>Projects</div>"> <li uk-tooltip="pos:right;" title="<div class='tooltip-custom-font-size '>Projects</div>">
<a class=" uk-icon-button portal-button shadowBox" style="padding: 6px;" [queryParams]="routerHelper.createQueryParams(['id','type','linkTo'],[softwareId,'software','project'])" routerLinkActive="router-link-active" routerLink="/participate/direct-claim" > <a class=" uk-icon-button portal-button shadowBox" style="padding: 6px;"
[queryParams]="routerHelper.createQueryParams(['id','type','linkTo'],[softwareId,'software','project'])"
routerLinkActive="router-link-active" routerLink="/participate/direct-claim">
<span class="uk-icon"> <span class="uk-icon">
<svg width="20" height="20" viewBox="0 0 20 20" xmlns="http://www.w3.org/2000/svg" icon="album" ratio="1"><rect x="5" y="2" width="10" height="1"></rect><rect x="3" y="4" width="14" height="1"></rect><rect fill="none" stroke="#000" x="1.5" y="6.5" width="17" height="11"></rect></svg></span> <svg width="20" height="20" viewBox="0 0 20 20" xmlns="http://www.w3.org/2000/svg" icon="album"
ratio="1"><rect x="5" y="2" width="10" height="1"></rect><rect x="3" y="4" width="14"
height="1"></rect><rect
fill="none" stroke="#000" x="1.5" y="6.5" width="17" height="11"></rect></svg></span>
</a> </a>
</li> </li>
<li uk-tooltip="pos:right;" title="<div class='tooltip-custom-font-size '>Communities</div>"> <li uk-tooltip="pos:right;" title="<div class='tooltip-custom-font-size '>Communities</div>">
<a class=" uk-icon-button portal-button shadowBox" style="padding: 6px;" [queryParams]="routerHelper.createQueryParams(['id','type','linkTo'],[softwareId,'software','context'])" routerLinkActive="router-link-active" routerLink="/participate/direct-claim" > <a class=" uk-icon-button portal-button shadowBox" style="padding: 6px;"
[queryParams]="routerHelper.createQueryParams(['id','type','linkTo'],[softwareId,'software','context'])"
routerLinkActive="router-link-active" routerLink="/participate/direct-claim">
<span class="uk-icon"> <span class="uk-icon">
<svg width="20" height="20" viewBox="0 0 20 20" xmlns="http://www.w3.org/2000/svg" icon="users" ratio="1"><circle fill="none" stroke="#000" stroke-width="1.1" cx="7.7" cy="8.6" r="3.5"></circle><path fill="none" stroke="#000" stroke-width="1.1" d="M1,18.1 C1.7,14.6 4.4,12.1 7.6,12.1 C10.9,12.1 13.7,14.8 14.3,18.3"></path><path fill="none" stroke="#000" 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> <svg width="20" height="20" viewBox="0 0 20 20" xmlns="http://www.w3.org/2000/svg"
icon="users" ratio="1"><circle fill="none" stroke="#000" stroke-width="1.1" cx="7.7"
cy="8.6" r="3.5"></circle><path fill="none" stroke="#000"
stroke-width="1.1"
d="M1,18.1 C1.7,14.6 4.4,12.1 7.6,12.1 C10.9,12.1 13.7,14.8 14.3,18.3"></path><path
fill="none" stroke="#000" 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>
</a> </a>
</li> </li>
<li uk-tooltip="pos:right;" title="<div class='tooltip-custom-font-size uk-margin-small'>Other research results</div>"> <li uk-tooltip="pos:right;"
<a class=" uk-icon-button portal-button shadowBox" style="padding: 6px;" [queryParams]="routerHelper.createQueryParams(['id','type','linkTo'],[softwareId,'software','result'])" routerLinkActive="router-link-active" routerLink="/participate/direct-claim" > title="<div class='tooltip-custom-font-size uk-margin-small'>Other research results</div>">
<a class=" uk-icon-button portal-button shadowBox" style="padding: 6px;"
[queryParams]="routerHelper.createQueryParams(['id','type','linkTo'],[softwareId,'software','result'])"
routerLinkActive="router-link-active" routerLink="/participate/direct-claim">
<span class="uk-icon"> <span class="uk-icon">
<svg width="20" height="20" viewBox="0 0 20 20" xmlns="http://www.w3.org/2000/svg" icon="copy" ratio="1"><rect fill="none" stroke="#000" x="3.5" y="2.5" width="12" height="16"></rect><polyline fill="none" stroke="#000" points="5 0.5 17.5 0.5 17.5 17"></polyline></svg></span> <svg width="20" height="20" viewBox="0 0 20 20" xmlns="http://www.w3.org/2000/svg" icon="copy"
ratio="1"><rect fill="none" stroke="#000" x="3.5" y="2.5" width="12" height="16"></rect><polyline
fill="none" stroke="#000" points="5 0.5 17.5 0.5 17.5 17"></polyline></svg></span>
</a> </a>
</li> </li>
@ -283,6 +337,8 @@
</div> </div>
</div> </div>
</div> </div>
<helper *ngIf="pageContents && pageContents['bottom'] && pageContents['bottom'].length > 0"
[texts]="pageContents['bottom']" styleName="uk-width-1-1"></helper>
</div> </div>
<!-- Claiming FAB --> <!-- Claiming FAB -->
<div class="uk-inline"> <div class="uk-inline">

View File

@ -1,9 +1,6 @@
import {Component, ViewChild} from '@angular/core'; import {Component, Input} from '@angular/core';
import {Input} from '@angular/core';
import {ActivatedRoute, Router} from '@angular/router'; import {ActivatedRoute, Router} from '@angular/router';
import {Title, Meta} from '@angular/platform-browser'; import {Meta, Title} from '@angular/platform-browser';
import {Observable} from 'rxjs';
import {SoftwareService} from './software.service'; import {SoftwareService} from './software.service';
import {SoftwareInfo} from '../../utils/entities/softwareInfo'; import {SoftwareInfo} from '../../utils/entities/softwareInfo';
@ -13,6 +10,7 @@ import {PiwikService} from '../../utils/piwik/piwik.service';
import {EnvProperties} from '../../utils/properties/env-properties'; import {EnvProperties} from '../../utils/properties/env-properties';
import {SEOService} from '../../sharedComponents/SEO/SEO.service'; import {SEOService} from '../../sharedComponents/SEO/SEO.service';
import {HelperFunctions} from "../../utils/HelperFunctions.class"; import {HelperFunctions} from "../../utils/HelperFunctions.class";
import {HelperService} from "../../utils/helper/helper.service";
@Component({ @Component({
selector: 'software', selector: 'software',
@ -21,6 +19,7 @@ import {HelperFunctions} from "../../utils/HelperFunctions.class";
export class SoftwareComponent { export class SoftwareComponent {
@Input() piwikSiteId = null; @Input() piwikSiteId = null;
@Input() communityId = null;
public softwareInfo: SoftwareInfo; public softwareInfo: SoftwareInfo;
public softwareId: string; public softwareId: string;
@ -54,8 +53,12 @@ export class SoftwareComponent {
public routerHelper: RouterHelper = new RouterHelper(); public routerHelper: RouterHelper = new RouterHelper();
private result; private result;
sub: any; piwiksub: any; infoSub: any; sub: any;
piwiksub: any;
infoSub: any;
properties: EnvProperties; properties: EnvProperties;
public pageContents = null;
public divContents = null;
constructor(private _softwareService: SoftwareService, constructor(private _softwareService: SoftwareService,
private _piwikService: PiwikService, private _piwikService: PiwikService,
@ -64,6 +67,7 @@ export class SoftwareComponent {
private _meta: Meta, private _meta: Meta,
private _title: Title, private _title: Title,
private _router: Router, private _router: Router,
private helper: HelperService,
private seoService: SEOService) { private seoService: SEOService) {
} }
@ -71,6 +75,8 @@ export class SoftwareComponent {
this.route.data this.route.data
.subscribe((data: { envSpecific: EnvProperties }) => { .subscribe((data: { envSpecific: EnvProperties }) => {
this.properties = data.envSpecific; this.properties = data.envSpecific;
//this.getDivContents();
this.getPageContents();
this.updateUrl(data.envSpecific.baseLink + this._router.url); this.updateUrl(data.envSpecific.baseLink + this._router.url);
}); });
@ -102,6 +108,18 @@ export class SoftwareComponent {
} }
private getPageContents() {
this.helper.getPageHelpContents(this._router.url, this.properties, this.communityId).subscribe(contents => {
this.pageContents = contents;
})
}
private getDivContents() {
this.helper.getDivHelpContents(this._router.url, this.properties, this.communityId).subscribe(contents => {
this.divContents = contents;
})
}
ngOnDestroy() { ngOnDestroy() {
if (this.sub) { if (this.sub) {
this.sub.unsubscribe(); this.sub.unsubscribe();
@ -138,7 +156,16 @@ export class SoftwareComponent {
} }
this.result = [] this.result = []
this.result = {id: id, type :"software", source : "openaire", title: this.softwareInfo.title,url: '', result: '', accessRights: /*this.softwareInfo.title.accessMode*/this.softwareInfo.accessMode, embargoEndDate: ''}; this.result = {
id: id,
type: "software",
source: "openaire",
title: this.softwareInfo.title,
url: '',
result: '',
accessRights: /*this.softwareInfo.title.accessMode*/this.softwareInfo.accessMode,
embargoEndDate: ''
};
let relatedResearchResultsNum = 0; let relatedResearchResultsNum = 0;
if (this.softwareInfo.relatedResearchResults != undefined) { if (this.softwareInfo.relatedResearchResults != undefined) {
@ -174,12 +201,14 @@ export class SoftwareComponent {
this._meta.updateTag({content: description}, "name='description'"); this._meta.updateTag({content: description}, "name='description'");
this._meta.updateTag({content: description}, "property='og:description'"); this._meta.updateTag({content: description}, "property='og:description'");
} }
private updateTitle(title: string) { private updateTitle(title: string) {
var _prefix = "OpenAIRE | "; var _prefix = "OpenAIRE | ";
var _title = _prefix + ((title.length > 50) ? title.substring(0, 50) : title); var _title = _prefix + ((title.length > 50) ? title.substring(0, 50) : title);
this._title.setTitle(_title); this._title.setTitle(_title);
this._meta.updateTag({content: _title}, "property='og:title'"); this._meta.updateTag({content: _title}, "property='og:title'");
} }
private updateUrl(url: string) { private updateUrl(url: string) {
this._meta.updateTag({content: url}, "property='og:url'"); this._meta.updateTag({content: url}, "property='og:url'");
} }
@ -192,6 +221,7 @@ export class SoftwareComponent {
return tooltipContent; return tooltipContent;
} }
public getKeys(map) { public getKeys(map) {
return Array.from(map.keys()); return Array.from(map.keys());
} }
@ -203,6 +233,7 @@ export class SoftwareComponent {
private handleError(message: string, error) { private handleError(message: string, error) {
console.error("Software Landing Page: " + message, error); console.error("Software Landing Page: " + message, error);
} }
isRouteAvailable(routeToCheck: string) { isRouteAvailable(routeToCheck: string) {
for (let i = 0; i < this.router.config.length; i++) { for (let i = 0; i < this.router.config.length; i++) {
let routePath: string = this.router.config[i].path; let routePath: string = this.router.config[i].path;

View File

@ -21,12 +21,13 @@ import {Schema2jsonldModule} from '../../sharedComponents/schema2jsonld/schema2j
import {SEOServiceModule} from '../../sharedComponents/SEO/SEOService.module'; import {SEOServiceModule} from '../../sharedComponents/SEO/SEOService.module';
import {ShowAuthorsModule} from "../../utils/authors/showAuthors.module"; import {ShowAuthorsModule} from "../../utils/authors/showAuthors.module";
import {DeletedByInferenceModule} from "../landing-utils/deletedByInference/deletedByInference.module"; import {DeletedByInferenceModule} from "../landing-utils/deletedByInference/deletedByInference.module";
import {HelperModule} from "../../utils/helper/helper.module";
@NgModule({ @NgModule({
imports: [ imports: [
CommonModule, FormsModule, LandingModule, RouterModule, CiteThisModule, PagingModule, CommonModule, FormsModule, LandingModule, RouterModule, CiteThisModule, PagingModule,
ResultLandingModule, IFrameModule, MetricsModule, AltMetricsModule, Schema2jsonldModule, SEOServiceModule, ResultLandingModule, IFrameModule, MetricsModule, AltMetricsModule, Schema2jsonldModule, SEOServiceModule,
ShowAuthorsModule, DeletedByInferenceModule ShowAuthorsModule, DeletedByInferenceModule, HelperModule
], ],
declarations: [ declarations: [
SoftwareComponent SoftwareComponent

View File

@ -45,8 +45,8 @@
<div class="tm-main uk-width-1-1@s uk-width-1-1@m uk-width-1-1@l uk-row-first "> <div class="tm-main uk-width-1-1@s uk-width-1-1@m uk-width-1-1@l uk-row-first ">
<div class=""> <div class="">
<div [class]="'uk-container' + (usedBy == 'deposit' ? ' uk-container-large' : '')"> <div [class]="'uk-container' + (usedBy == 'deposit' ? ' uk-container-large' : '')">
<helper position="top"></helper> <helper *ngIf="pageContents && pageContents['top'] && pageContents['top'].length > 0" [texts]="pageContents['top']"></helper>
<div [class]="(showRefine)? 'uk-width-3-5@m uk-width-3-5@l uk-width-1-1@s' :'uk-width-1-1'"> <div [class]="(showRefine)? 'uk-width-4-5@m uk-width-4-5@l uk-width-1-1@s' :'uk-width-1-1'">
<div *ngIf="showRefine" class="uk-offcanvas-content uk-hidden@m"> <div *ngIf="showRefine" class="uk-offcanvas-content uk-hidden@m">
<a href="#offcanvas-usage" uk-toggle><svg width="20" height="20" viewBox="0 0 20 20" xmlns="http://www.w3.org/2000/svg" ratio="1"><rect x="6" y="4" width="12" height="1"></rect><rect x="6" y="9" width="12" height="1"></rect><rect x="6" y="14" width="12" height="1"></rect><rect x="2" y="4" width="2" height="1"></rect><rect x="2" y="9" width="2" height="1"></rect><rect x="2" y="14" width="2" height="1"></rect></svg></a> <a href="#offcanvas-usage" uk-toggle><svg width="20" height="20" viewBox="0 0 20 20" xmlns="http://www.w3.org/2000/svg" ratio="1"><rect x="6" y="4" width="12" height="1"></rect><rect x="6" y="9" width="12" height="1"></rect><rect x="6" y="14" width="12" height="1"></rect><rect x="2" y="4" width="2" height="1"></rect><rect x="2" y="9" width="2" height="1"></rect><rect x="2" y="14" width="2" height="1"></rect></svg></a>
@ -111,14 +111,10 @@
</div> </div>
</div> </div>
<!-- uk-sticky="offset: 120" -->
<!-- <div *ngIf="showRefine" class="uk-width-1-5 uk-margin-top helper-left-right search-filters uk-visible@m"> -->
<div class="uk-grid uk-width-1-1"> <div class="uk-grid uk-width-1-1">
<div *ngIf="showRefine" class="uk-margin-top helper-left-right search-filters uk-visible@m"> <div *ngIf="showRefine" class="uk-margin-top uk-width-1-4@m search-filters uk-visible@m">
<!-- top: #container-1; bottom: #true; --> <!-- top: #container-1; bottom: #true; -->
<!-- <div id="container-1" style="z-index: -1;" uk-sticky="top: #container-1; offset: 120; "> --> <!-- <div id="container-1" style="z-index: -1;" uk-sticky="top: #container-1; offset: 120; "> -->
<helper position="left" before="true"></helper>
<span *ngIf="tableViewLink || mapUrl" class="uk-width-expand"> <span *ngIf="tableViewLink || mapUrl" class="uk-width-expand">
<span *ngIf="tableViewLink"> <span *ngIf="tableViewLink">
<a uk-tooltip="title: Table view" routerLinkActive="router-link-active" [class]="(disableForms)?'uk-disabled uk-link-muted':''" [routerLink]=tableViewLink > <a uk-tooltip="title: Table view" routerLinkActive="router-link-active" [class]="(disableForms)?'uk-disabled uk-link-muted':''" [routerLink]=tableViewLink >
@ -168,11 +164,8 @@
</div> </div>
</div> </div>
<search-filter *ngFor="let filter of filters " [filterValuesNum]="filterValuesNum" [showMoreInline]="showMoreFilterValuesInline" [isDisabled]="disableForms" [filter]="filter" [showResultCount]=showResultCount (onFilterChange)="filterChanged($event)" ></search-filter> <search-filter *ngFor="let filter of filters " [filterValuesNum]="filterValuesNum" [showMoreInline]="showMoreFilterValuesInline" [isDisabled]="disableForms" [filter]="filter" [showResultCount]=showResultCount (onFilterChange)="filterChanged($event)" ></search-filter>
<helper position="left" before="false"></helper>
</div> </div>
<!-- </div> --> <!-- </div> -->
<helper *ngIf="!showRefine" class="uk-margin-top helper-left-right uk-visible@m" position="left"></helper>
<div class="uk-width-expand@m uk-width-1-1@s uk-first-column"> <div class="uk-width-expand@m uk-width-1-1@s uk-first-column">
<!-- <div [class]="(showRefine)?'uk-width-expand@m uk-first-column':''" > --> <!-- <div [class]="(showRefine)?'uk-width-expand@m uk-first-column':''" > -->
<div *ngIf="openaireLink"> <a class="uk-margin-top uk-button uk-button-text" [href]=openaireLink target="_blank" >Results in OpenAIRE</a></div> <div *ngIf="openaireLink"> <a class="uk-margin-top uk-button uk-button-text" [href]=openaireLink target="_blank" >Results in OpenAIRE</a></div>
@ -228,32 +221,12 @@
[href]="properties.lastIndexInformationLink" target="_blank"> [href]="properties.lastIndexInformationLink" target="_blank">
Last index information Last index information
</a> </a>
<helper class="uk-hidden@m" position="left" styleName="uk-width-1-1@s"></helper>
<helper class="uk-hidden@m" position="right" styleName="uk-width-1-1@s"></helper>
</div> </div>
<div class="uk-margin-top helper-left-right uk-visible@m">
<helper position="right" before="true"></helper>
<!-- <div>
<span *ngIf="tableViewLink" class="uk-margin-medium-right">
<a routerLinkActive="router-link-active" [class]="(disableForms)?'uk-disabled uk-link-muted':''" [routerLink]=tableViewLink >
<span class="uk-margin-small-right uk-icon"><svg width="20" height="20" viewBox="0 0 20 20" xmlns="http://www.w3.org/2000/svg" ratio="1"><rect x="2" y="2" width="3" height="3"></rect><rect x="8" y="2" width="3" height="3"></rect><rect x="14" y="2" width="3" height="3"></rect><rect x="2" y="8" width="3" height="3"></rect><rect x="8" y="8" width="3" height="3"></rect><rect x="14" y="8" width="3" height="3"></rect><rect x="2" y="14" width="3" height="3"></rect><rect x="8" y="14" width="3" height="3"></rect><rect x="14" y="14" width="3" height="3"></rect></svg></span>
</a>
<span class="uk-icon"><svg width="20" height="20" viewBox="0 0 20 20" xmlns="http://www.w3.org/2000/svg" icon="table" ratio="1"><rect x="1" y="3" width="18" height="1"></rect><rect x="1" y="7" width="18" height="1"></rect><rect x="1" y="11" width="18" height="1"></rect><rect x="1" y="15" width="18" height="1"></rect></svg></span>
</span>
<search-download [type]="csvPath" [csvParams]="csvParams" [totalResults]="searchUtils.totalResults"></search-download>
</div> -->
<helper position="right" before="false"></helper>
</div>
<!-- <helper *ngIf="!tableViewLink && searchUtils.totalResults > csvLimit" class="helper-left-right uk-visible@m" position="right"></helper> -->
</div> </div>
<!-- <div [class]="(showRefine)? 'uk-width-3-5@m uk-width-3-5@l uk-width-1-1@s uk-align-center uk-margin-remove-bottom' : 'uk-width-1-1'"> <!-- <div [class]="(showRefine)? 'uk-width-3-5@m uk-width-3-5@l uk-width-1-1@s uk-align-center uk-margin-remove-bottom' : 'uk-width-1-1'">
<search-paging [loadPaging]="loadPaging" [type]="type" [oldTotalResults]="oldTotalResults" [(searchUtils)] = "searchUtils" [(results)] = "results" [(baseUrl)] = "baseUrl" [(parameterNames)] = "parameterNames" [(parameterValues)] = "parameterValues" ></search-paging> <search-paging [loadPaging]="loadPaging" [type]="type" [oldTotalResults]="oldTotalResults" [(searchUtils)] = "searchUtils" [(results)] = "results" [(baseUrl)] = "baseUrl" [(parameterNames)] = "parameterNames" [(parameterValues)] = "parameterValues" ></search-paging>
</div> --> </div> -->
<div class="uk-width-1-1"> <helper *ngIf="pageContents && pageContents['bottom'] && pageContents['bottom'].length > 0" [texts]="pageContents['bottom']" styleName="uk-width-1-1"></helper>
<helper position="bottom"></helper>
</div>
</div> </div>
</div> </div>
</div> </div>

View File

@ -17,6 +17,7 @@ import {EnvProperties} from '../../utils/properties/env-propertie
import { SEOService } from '../../sharedComponents/SEO/SEO.service'; import { SEOService } from '../../sharedComponents/SEO/SEO.service';
import {HelperFunctions} from "../../utils/HelperFunctions.class"; import {HelperFunctions} from "../../utils/HelperFunctions.class";
import {ZenodoInformationClass} from "../../deposit/utils/zenodoInformation.class"; import {ZenodoInformationClass} from "../../deposit/utils/zenodoInformation.class";
import {HelperService} from "../../utils/helper/helper.service";
@Component({ @Component({
selector: 'search-page', selector: 'search-page',
@ -77,6 +78,8 @@ export class SearchPageComponent {
public pagingLimit: number = 0; public pagingLimit: number = 0;
public resultsPerPage: number = 10; public resultsPerPage: number = 10;
public isPiwikEnabled; public isPiwikEnabled;
public pageContents = null;
public divContents = null;
properties:EnvProperties; properties:EnvProperties;
public routerHelper:RouterHelper = new RouterHelper(); public routerHelper:RouterHelper = new RouterHelper();
public errorCodes:ErrorCodes = new ErrorCodes(); public errorCodes:ErrorCodes = new ErrorCodes();
@ -87,7 +90,8 @@ export class SearchPageComponent {
private _title: Title, private _title: Title,
private _piwikService:PiwikService, private _piwikService:PiwikService,
private router: Router, private router: Router,
private seoService: SEOService) { private seoService: SEOService,
private helper: HelperService) {
} }
ngOnInit() { ngOnInit() {
@ -95,7 +99,10 @@ export class SearchPageComponent {
this.route.data this.route.data
.subscribe((data: { envSpecific: EnvProperties }) => { .subscribe((data: { envSpecific: EnvProperties }) => {
this.properties = data.envSpecific; this.properties = data.envSpecific;
//this.getDivContents();
this.getPageContents();
this.pagingLimit = data.envSpecific.pagingLimit; this.pagingLimit = data.envSpecific.pagingLimit;
HelperFunctions.scroll();
this.csvLimit = data.envSpecific.csvLimit; this.csvLimit = data.envSpecific.csvLimit;
this.isPiwikEnabled = data.envSpecific.enablePiwikTrack; this.isPiwikEnabled = data.envSpecific.enablePiwikTrack;
if(typeof window !== 'undefined') { if(typeof window !== 'undefined') {
@ -105,7 +112,6 @@ export class SearchPageComponent {
this.piwiksub = this._piwikService.trackView(this.properties, this.pageTitle, this.piwikSiteId).subscribe(); this.piwiksub = this._piwikService.trackView(this.properties, this.pageTitle, this.piwikSiteId).subscribe();
} }
}); });
HelperFunctions.scroll();
// this.updateBaseUrlWithParameters(this.filters); // this.updateBaseUrlWithParameters(this.filters);
this.updateTitle(this.pageTitle); this.updateTitle(this.pageTitle);
@ -114,6 +120,19 @@ export class SearchPageComponent {
this.seoService.createLinkForCanonicalURL(this.properties.baseLink+this.router.url,false); this.seoService.createLinkForCanonicalURL(this.properties.baseLink+this.router.url,false);
} }
public getPageContents() {
this.helper.getPageHelpContents(this.router.url, this.properties, (this.customFilter)?this.customFilter.valueId:null).subscribe(contents => {
this.pageContents = contents;
})
}
public getDivContents() {
this.helper.getDivHelpContents(this.router.url, this.properties, (this.customFilter)?this.customFilter.valueId:null).subscribe(contents => {
this.divContents = contents;
})
}
ngOnDestroy() { ngOnDestroy() {
if(this.piwiksub){ if(this.piwiksub){
this.piwiksub.unsubscribe(); this.piwiksub.unsubscribe();

View File

@ -28,12 +28,20 @@ export class HelperService {
} }
getPageHelpContents(router: string, properties:EnvProperties, communityId:string ):any { getPageHelpContents(router: string, properties:EnvProperties, communityId:string ):any {
if(!communityId) {
communityId = 'openaire';
}
router = router.split('?')[0].substring(0);
let url = properties.adminToolsAPIURL; let url = properties.adminToolsAPIURL;
url += '/community/' + communityId + '/pagehelpcontent?active=true&page='+router; url += '/community/' + communityId + '/pagehelpcontent?active=true&page='+router;
return this.http.get((properties.useCache)? (properties.cacheUrl+encodeURIComponent(url)): url); return this.http.get((properties.useCache)? (properties.cacheUrl+encodeURIComponent(url)): url);
} }
getDivHelpContents(router: string, properties:EnvProperties, communityId:string ):any { getDivHelpContents(router: string, properties:EnvProperties, communityId:string ):any {
if(!communityId) {
communityId = 'openaire';
}
router = router.split('?')[0].substring(0);
let url = properties.adminToolsAPIURL; let url = properties.adminToolsAPIURL;
url += '/community/' + communityId + '/divhelpcontent?active=true&page='+router; url += '/community/' + communityId + '/divhelpcontent?active=true&page='+router;
return this.http.get((properties.useCache)? (properties.cacheUrl+encodeURIComponent(url)): url); return this.http.get((properties.useCache)? (properties.cacheUrl+encodeURIComponent(url)): url);