Variables and functions in components of landing pages are set correctly to private or public (those which are used in templates are public) | Project landing: links to advanced search in tabs fixed | Landing Pages: responsive tabs: some spaces added for button in small view - sizes changed for views
git-svn-id: https://svn.driver.research-infrastructures.eu/driver/dnet40/modules/uoa-services-portal/trunk@48790 d315682c-612b-4755-9ff5-7f18f6832af3
This commit is contained in:
parent
c196b0f1d3
commit
79141b06e1
|
@ -65,7 +65,7 @@
|
||||||
[_dataproviderService]="_dataproviderService">
|
[_dataproviderService]="_dataproviderService">
|
||||||
</tabs-->
|
</tabs-->
|
||||||
<div *ngIf="showTabs">
|
<div *ngIf="showTabs">
|
||||||
<ul *ngIf="dataProviderInfo.tabs != undefined" class="uk-tab uk-visible@m" uk-tab="connect: #tab-content">
|
<ul *ngIf="dataProviderInfo.tabs != undefined" class="uk-tab uk-visible@xl" uk-tab="connect: #tab-content">
|
||||||
<li *ngFor="let tab of dataProviderInfo.tabs; let i=index" id="{{dataProviderInfo.tabs[i].content}}"
|
<li *ngFor="let tab of dataProviderInfo.tabs; let i=index" id="{{dataProviderInfo.tabs[i].content}}"
|
||||||
[class]="activeTab==tab.name?'uk-active':''">
|
[class]="activeTab==tab.name?'uk-active':''">
|
||||||
<a
|
<a
|
||||||
|
@ -91,11 +91,11 @@
|
||||||
</li>
|
</li>
|
||||||
</ul>
|
</ul>
|
||||||
|
|
||||||
<button class="uk-button uk-button-default uk-hidden@m" type="button">
|
<button class="uk-button uk-button-default uk-hidden@xl" type="button">
|
||||||
<span uk-navbar-toggle-icon></span> <span class="uk-margin-small-left">{{activeTab}}</span>
|
<span uk-navbar-toggle-icon></span> <span class="uk-margin-small-left">{{activeTab}}</span>
|
||||||
</button>
|
</button>
|
||||||
|
|
||||||
<ul *ngIf="dataProviderInfo.tabs != undefined" id="toggle-small-tabs" class="uk-subnav uk-subnav-pill uk-dropdown uk-hidden@m" uk-switcher="connect: #tab-content" uk-dropdown="mode: click" uk-toggle="target: #toggle-small-tabs">
|
<ul *ngIf="dataProviderInfo.tabs != undefined" id="toggle-small-tabs" class="uk-subnav uk-subnav-pill uk-dropdown uk-hidden@xl" uk-switcher="connect: #tab-content" uk-dropdown="mode: click" uk-toggle="target: #toggle-small-tabs">
|
||||||
<li *ngFor="let tab of dataProviderInfo.tabs; let i=index" id="{{dataProviderInfo.tabs[i].content}}"
|
<li *ngFor="let tab of dataProviderInfo.tabs; let i=index" id="{{dataProviderInfo.tabs[i].content}}"
|
||||||
[class]="activeTab==tab.name?'uk-active':''">
|
[class]="activeTab==tab.name?'uk-active':''">
|
||||||
<a
|
<a
|
||||||
|
|
|
@ -25,63 +25,65 @@ import 'rxjs/add/operator/switchMap';
|
||||||
})
|
})
|
||||||
|
|
||||||
export class DataProviderComponent {
|
export class DataProviderComponent {
|
||||||
|
|
||||||
sub1: any;// = new Observable<DataProviderInfo>();
|
|
||||||
sub: any;
|
|
||||||
piwiksub: any;
|
|
||||||
datasourceId: string;
|
|
||||||
public dataProviderInfo: DataProviderInfo;
|
public dataProviderInfo: DataProviderInfo;
|
||||||
|
public datasourceId: string;
|
||||||
|
|
||||||
private showAllReferences: boolean = false;
|
// Message variables
|
||||||
private showAllRelResData: boolean = false;
|
|
||||||
private showAllSimilPubl: boolean = false;
|
|
||||||
private showAllBioentities: boolean = false;
|
|
||||||
private showFundingDetails: boolean = false;
|
|
||||||
|
|
||||||
private bioentitiesNum: number = 0;
|
|
||||||
|
|
||||||
private result ;
|
|
||||||
|
|
||||||
public warningMessage = "";
|
public warningMessage = "";
|
||||||
public errorMessage = "";
|
public errorMessage = "";
|
||||||
public showLoading: boolean = true;
|
public showLoading: boolean = true;
|
||||||
|
|
||||||
|
// This will change
|
||||||
|
// currently related content providers tab requests only for publications or research data
|
||||||
|
// Later both requests will be executed
|
||||||
public relatedDataprovidersResultsType: string;
|
public relatedDataprovidersResultsType: string;
|
||||||
public paramsForSearchLink = {};//: string = "";
|
|
||||||
|
|
||||||
public reloadPublications: boolean = true;
|
// Variable to specify requests with either collectedFrom or hostedBy
|
||||||
public reloadDatasets: boolean = true;
|
public paramsForSearchLink = {};
|
||||||
public reloadProjects: boolean = true;
|
|
||||||
public reloadDataproviders: boolean = true;
|
// Metrics tab variables
|
||||||
public reloadRelatedDatasources: boolean = true;
|
|
||||||
public metricsClicked: boolean;
|
public metricsClicked: boolean;
|
||||||
private viewsFrameUrl: string;
|
public viewsFrameUrl: string;
|
||||||
private downloadsFrameUrl: string;
|
public downloadsFrameUrl: string;
|
||||||
private totalViews: number;
|
public totalViews: number;
|
||||||
private totalDownloads: number;
|
public totalDownloads: number;
|
||||||
private pageViews: number;
|
public pageViews: number;
|
||||||
|
|
||||||
private activeTab: string = "";
|
// Statistics tab variables
|
||||||
public statsClicked: boolean = false;
|
public statsClicked: boolean = false;
|
||||||
private docsTimelineUrl: string;
|
public docsTimelineUrl: string;
|
||||||
private docsTypesUrl:string;
|
public docsTypesUrl:string;
|
||||||
private docsFunderUrl:string;
|
public docsFunderUrl:string;
|
||||||
private dataProjectsUrl:string ;
|
public dataProjectsUrl:string ;
|
||||||
private pubsProjectsUrl:string;
|
public pubsProjectsUrl:string;
|
||||||
|
|
||||||
|
// Variables for publications, research data, projects, content providers, related content providers tabs
|
||||||
public fetchPublications : FetchPublications;
|
public fetchPublications : FetchPublications;
|
||||||
public fetchDatasets: FetchDatasets;
|
public fetchDatasets: FetchDatasets;
|
||||||
public fetchProjects: FetchProjects;
|
public fetchProjects: FetchProjects;
|
||||||
public fetchDataproviders: FetchDataproviders;
|
public fetchDataproviders: FetchDataproviders;
|
||||||
public fetchResultsAggregators: any;
|
public fetchResultsAggregators: any;
|
||||||
|
|
||||||
private nativeElement : Node;
|
// Active tab variable for responsiveness - show tabs only if main request is completed
|
||||||
|
public activeTab: string = "";
|
||||||
|
public showTabs:boolean = false;
|
||||||
|
|
||||||
public routerHelper:RouterHelper = new RouterHelper();
|
public routerHelper:RouterHelper = new RouterHelper();
|
||||||
showTabs:boolean = false;
|
|
||||||
|
|
||||||
public errorCodes:ErrorCodes = new ErrorCodes();
|
public errorCodes:ErrorCodes = new ErrorCodes();
|
||||||
|
|
||||||
|
// Request results of each tab only the one time (first time tab is clicked)
|
||||||
|
private reloadPublications: boolean = true;
|
||||||
|
private reloadDatasets: boolean = true;
|
||||||
|
private reloadProjects: boolean = true;
|
||||||
|
private reloadDataproviders: boolean = true;
|
||||||
|
private reloadRelatedDatasources: boolean = true;
|
||||||
|
|
||||||
|
private nativeElement : Node;
|
||||||
|
|
||||||
|
sub1: any;// = new Observable<DataProviderInfo>();
|
||||||
|
sub: any;
|
||||||
|
piwiksub: any;
|
||||||
|
|
||||||
constructor (private element: ElementRef,
|
constructor (private element: ElementRef,
|
||||||
private _dataproviderService: DataProviderService,
|
private _dataproviderService: DataProviderService,
|
||||||
private _piwikService:PiwikService,
|
private _piwikService:PiwikService,
|
||||||
|
@ -170,7 +172,7 @@ export class DataProviderComponent {
|
||||||
this.sub1.unsubscribe();
|
this.sub1.unsubscribe();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
getDataProviderInfo(id:string) {
|
private getDataProviderInfo(id:string) {
|
||||||
this.warningMessage = '';
|
this.warningMessage = '';
|
||||||
this.errorMessage=""
|
this.errorMessage=""
|
||||||
this.showLoading = true;
|
this.showLoading = true;
|
||||||
|
@ -206,21 +208,22 @@ export class DataProviderComponent {
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
updateDescription(description:string){
|
|
||||||
|
private updateDescription(description:string){
|
||||||
this._meta.updateMeta("description", description);
|
this._meta.updateMeta("description", description);
|
||||||
this._meta.updateProperty("og:description", description);
|
this._meta.updateProperty("og:description", description);
|
||||||
}
|
}
|
||||||
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._meta.setTitle(_title );
|
this._meta.setTitle(_title );
|
||||||
this._meta.updateProperty("og:title",_title);
|
this._meta.updateProperty("og:title",_title);
|
||||||
}
|
}
|
||||||
updateUrl(url:string){
|
private updateUrl(url:string){
|
||||||
this._meta.updateProperty("og:url", url);
|
this._meta.updateProperty("og:url", url);
|
||||||
}
|
}
|
||||||
|
|
||||||
public initTabs(){
|
private initTabs(){
|
||||||
|
|
||||||
if(this.dataProviderInfo.tabs != undefined && this.dataProviderInfo.tabs.length > 0) {
|
if(this.dataProviderInfo.tabs != undefined && this.dataProviderInfo.tabs.length > 0) {
|
||||||
this.reloadPublications = true;
|
this.reloadPublications = true;
|
||||||
|
@ -289,7 +292,7 @@ export class DataProviderComponent {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
private search(content: string, page: number, size: number) {
|
public search(content: string, page: number, size: number) {
|
||||||
if(content=='publicationsTab') {
|
if(content=='publicationsTab') {
|
||||||
this.searchPublications(page, size);
|
this.searchPublications(page, size);
|
||||||
} else if(content=='datasetsTab') {
|
} else if(content=='datasetsTab') {
|
||||||
|
|
|
@ -55,7 +55,7 @@ export class RelatedDatasourcesTabComponent {
|
||||||
@Input() fetchResults : any;
|
@Input() fetchResults : any;
|
||||||
|
|
||||||
public linkToSearchResults: string = "";
|
public linkToSearchResults: string = "";
|
||||||
public searchLinkToDataProvider: string = "";
|
//public searchLinkToDataProvider: string = "";
|
||||||
public routerHelper:RouterHelper = new RouterHelper();
|
public routerHelper:RouterHelper = new RouterHelper();
|
||||||
public errorCodes:ErrorCodes = new ErrorCodes();
|
public errorCodes:ErrorCodes = new ErrorCodes();
|
||||||
|
|
||||||
|
@ -70,7 +70,7 @@ export class RelatedDatasourcesTabComponent {
|
||||||
} else {
|
} else {
|
||||||
this.linkToSearchResults = OpenaireProperties.getLinkToAdvancedSearchDatasets();
|
this.linkToSearchResults = OpenaireProperties.getLinkToAdvancedSearchDatasets();
|
||||||
}
|
}
|
||||||
this.searchLinkToDataProvider = OpenaireProperties.getsearchLinkToDataProvider();
|
//this.searchLinkToDataProvider = OpenaireProperties.getsearchLinkToDataProvider();
|
||||||
/*queryParams.push("hostedBy");
|
/*queryParams.push("hostedBy");
|
||||||
queryParams.push("ho");
|
queryParams.push("ho");
|
||||||
queryParams.push("collectedFrom");
|
queryParams.push("collectedFrom");
|
||||||
|
|
|
@ -47,9 +47,8 @@
|
||||||
</li>
|
</li>
|
||||||
</ul>
|
</ul>
|
||||||
|
|
||||||
|
<div *ngIf="datasetInfo.description" class="uk-margin-bottom uk-text-justify descriptionText">
|
||||||
<div *ngIf="datasetInfo.description != ''">
|
{{datasetInfo.description}}
|
||||||
<div class="uk-text-justify descriptionText">{{datasetInfo.description}}</div>
|
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<!--div class="uk-clearfix uk-margin-top uk-margin-bottom">
|
<!--div class="uk-clearfix uk-margin-top uk-margin-bottom">
|
||||||
|
@ -59,7 +58,7 @@
|
||||||
</span> Links to research Results</a>
|
</span> Links to research Results</a>
|
||||||
</div-->
|
</div-->
|
||||||
|
|
||||||
<ul class="uk-tab uk-visible@l" uk-tab="connect: #tab-content">
|
<ul class="uk-tab uk-visible@m" uk-tab="connect: #tab-content">
|
||||||
<li (click)="activeTab='Related Research Results'"
|
<li (click)="activeTab='Related Research Results'"
|
||||||
[class]="activeTab == 'Related Research Results'?'uk-active':''">
|
[class]="activeTab == 'Related Research Results'?'uk-active':''">
|
||||||
<a>
|
<a>
|
||||||
|
@ -91,11 +90,11 @@
|
||||||
</li>
|
</li>
|
||||||
</ul>
|
</ul>
|
||||||
|
|
||||||
<button class="uk-button uk-button-default uk-hidden@l" type="button">
|
<button class="uk-button uk-button-default uk-hidden@m" type="button">
|
||||||
<span uk-navbar-toggle-icon></span> <span class="uk-margin-small-left">{{activeTab}}</span>
|
<span uk-navbar-toggle-icon></span> <span class="uk-margin-small-left">{{activeTab}}</span>
|
||||||
</button>
|
</button>
|
||||||
|
|
||||||
<ul id="toggle-small-tabs" class="uk-subnav uk-subnav-pill uk-dropdown uk-hidden@l" uk-switcher="connect: #tab-content" uk-dropdown="mode: click" uk-toggle="target: #toggle-small-tabs">
|
<ul id="toggle-small-tabs" class="uk-subnav uk-subnav-pill uk-dropdown uk-hidden@m" uk-switcher="connect: #tab-content" uk-dropdown="mode: click" uk-toggle="target: #toggle-small-tabs">
|
||||||
<li (click)="activeTab='Related Research Results'"
|
<li (click)="activeTab='Related Research Results'"
|
||||||
[class]="activeTab == 'Related Research Results'?'uk-active':''">
|
[class]="activeTab == 'Related Research Results'?'uk-active':''">
|
||||||
<a>
|
<a>
|
||||||
|
|
|
@ -15,37 +15,38 @@ import {PiwikService} from '../../utils/piwik/piwik.service';
|
||||||
|
|
||||||
export class DatasetComponent {
|
export class DatasetComponent {
|
||||||
public datasetInfo: DatasetInfo;
|
public datasetInfo: DatasetInfo;
|
||||||
|
public datasetId : string ;
|
||||||
|
|
||||||
|
// APP BOX variables
|
||||||
public showAllCollectedFrom: boolean = false;
|
public showAllCollectedFrom: boolean = false;
|
||||||
public showAllDownloadFrom: boolean = false;
|
public showAllDownloadFrom: boolean = false;
|
||||||
public showAllPublishedIn: boolean = false;
|
public showAllPublishedIn: boolean = false;
|
||||||
public showAllFundedBy: boolean = false;
|
public showAllFundedBy: boolean = false;
|
||||||
|
|
||||||
private showStyle: boolean = false;
|
// Metrics tab variables
|
||||||
private showAllReferences: boolean = false;
|
public metricsClicked: boolean;
|
||||||
private showAllRelResData: boolean = false;
|
public viewsFrameUrl: string;
|
||||||
private showAllSimilPubl: boolean = false;
|
public downloadsFrameUrl: string;
|
||||||
private showAllBioentities: boolean = false;
|
public totalViews: number;
|
||||||
private datasetId : string ;
|
public totalDownloads: number;
|
||||||
private result ;
|
public pageViews: number;
|
||||||
sub: any; piwiksub: any;
|
|
||||||
|
|
||||||
private activeTab: string = "Related Research Results";
|
// Active tab variable for responsiveness
|
||||||
private metricsClicked: boolean;
|
public activeTab: string = "Related Research Results";
|
||||||
private viewsFrameUrl: string;
|
|
||||||
private downloadsFrameUrl: string;
|
|
||||||
private totalViews: number;
|
|
||||||
private totalDownloads: number;
|
|
||||||
private pageViews: number;
|
|
||||||
|
|
||||||
|
// Map counting variable
|
||||||
public relatedResearchResultsNum: number = 0;
|
public relatedResearchResultsNum: number = 0;
|
||||||
|
|
||||||
|
// Message variables
|
||||||
public warningMessage = "";
|
public warningMessage = "";
|
||||||
public errorMessage = "";
|
public errorMessage = "";
|
||||||
public showLoading: boolean = true;
|
public showLoading: boolean = true;
|
||||||
|
|
||||||
public routerHelper:RouterHelper = new RouterHelper();
|
public routerHelper:RouterHelper = new RouterHelper();
|
||||||
|
|
||||||
|
private result ;
|
||||||
|
sub: any; piwiksub: any;
|
||||||
|
|
||||||
constructor (private element: ElementRef,
|
constructor (private element: ElementRef,
|
||||||
private _datasetService: DatasetService,
|
private _datasetService: DatasetService,
|
||||||
private _piwikService:PiwikService,
|
private _piwikService:PiwikService,
|
||||||
|
@ -94,7 +95,7 @@ export class DatasetComponent {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
getDatasetInfo(id:string) {
|
private getDatasetInfo(id:string) {
|
||||||
this.warningMessage = '';
|
this.warningMessage = '';
|
||||||
this.errorMessage=""
|
this.errorMessage=""
|
||||||
this.showLoading = true;
|
this.showLoading = true;
|
||||||
|
@ -131,26 +132,27 @@ export class DatasetComponent {
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
showChange($event) {
|
// showChange($event) {
|
||||||
this.showAllReferences=$event.value;
|
// this.showAllReferences=$event.value;
|
||||||
}
|
// }
|
||||||
|
|
||||||
public metricsResults($event) {
|
public metricsResults($event) {
|
||||||
this.totalViews = $event.totalViews;
|
this.totalViews = $event.totalViews;
|
||||||
this.totalDownloads = $event.totalDownloads;
|
this.totalDownloads = $event.totalDownloads;
|
||||||
this.pageViews = $event.pageViews;
|
this.pageViews = $event.pageViews;
|
||||||
}
|
}
|
||||||
updateDescription(description:string){
|
|
||||||
|
private updateDescription(description:string){
|
||||||
this._meta.updateMeta("description", description);
|
this._meta.updateMeta("description", description);
|
||||||
this._meta.updateProperty("og:description", description);
|
this._meta.updateProperty("og:description", description);
|
||||||
}
|
}
|
||||||
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._meta.setTitle(_title );
|
this._meta.setTitle(_title );
|
||||||
this._meta.updateProperty("og:title",_title);
|
this._meta.updateProperty("og:title",_title);
|
||||||
}
|
}
|
||||||
updateUrl(url:string){
|
private updateUrl(url:string){
|
||||||
this._meta.updateProperty("og:url", url);
|
this._meta.updateProperty("og:url", url);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -43,9 +43,9 @@ declare var UIkit: any;
|
||||||
`
|
`
|
||||||
})
|
})
|
||||||
export class HtmlProjectReportComponent{
|
export class HtmlProjectReportComponent{
|
||||||
public projectId: string;
|
private projectId: string;
|
||||||
public totalResults: number = 10;
|
private totalResults: number = 10;
|
||||||
public resultsType: string = "publication";
|
private resultsType: string = "publication";
|
||||||
|
|
||||||
public header1: string = "";
|
public header1: string = "";
|
||||||
public header2: string = "";
|
public header2: string = "";
|
||||||
|
@ -105,7 +105,7 @@ export class HtmlProjectReportComponent{
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
createHeaders() {
|
private createHeaders() {
|
||||||
this._projectService.getHTMLInfo(this.projectId).subscribe(
|
this._projectService.getHTMLInfo(this.projectId).subscribe(
|
||||||
data => {
|
data => {
|
||||||
this.createHeader1(data);
|
this.createHeader1(data);
|
||||||
|
@ -127,7 +127,7 @@ export class HtmlProjectReportComponent{
|
||||||
this.header2 = this.totalResults+((this.resultsType == "publication")?" publications":" research data");
|
this.header2 = this.totalResults+((this.resultsType == "publication")?" publications":" research data");
|
||||||
}
|
}
|
||||||
|
|
||||||
createClipboard() {
|
private createClipboard() {
|
||||||
let intro: string = '<!doctype html>';
|
let intro: string = '<!doctype html>';
|
||||||
intro += '<html lang="en-gb" dir="ltr" vocab="http://schema.org/">';
|
intro += '<html lang="en-gb" dir="ltr" vocab="http://schema.org/">';
|
||||||
intro += '<head>';
|
intro += '<head>';
|
||||||
|
@ -191,7 +191,7 @@ export class HtmlProjectReportComponent{
|
||||||
this.createClipboard();
|
this.createClipboard();
|
||||||
}
|
}
|
||||||
|
|
||||||
copied() {
|
public copied() {
|
||||||
UIkit.notification({
|
UIkit.notification({
|
||||||
message : '<strong>Raw html is copied. Please paste it on an html file.<strong>',
|
message : '<strong>Raw html is copied. Please paste it on an html file.<strong>',
|
||||||
status : 'success',
|
status : 'success',
|
||||||
|
@ -200,17 +200,17 @@ export class HtmlProjectReportComponent{
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
updateDescription(description:string){
|
private updateDescription(description:string){
|
||||||
this._meta.updateMeta("description", description);
|
this._meta.updateMeta("description", description);
|
||||||
this._meta.updateProperty("og:description", description);
|
this._meta.updateProperty("og:description", description);
|
||||||
}
|
}
|
||||||
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._meta.setTitle(_title );
|
this._meta.setTitle(_title );
|
||||||
this._meta.updateProperty("og:title",_title);
|
this._meta.updateProperty("og:title",_title);
|
||||||
}
|
}
|
||||||
updateUrl(url:string){
|
private updateUrl(url:string){
|
||||||
this._meta.updateProperty("og:url", url);
|
this._meta.updateProperty("og:url", url);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -166,9 +166,10 @@ export class MetricsComponent {
|
||||||
@Input() pageViews: number = 0;
|
@Input() pageViews: number = 0;
|
||||||
public metrics: Metrics;
|
public metrics: Metrics;
|
||||||
public errorCodes:ErrorCodes;
|
public errorCodes:ErrorCodes;
|
||||||
public status: number;
|
|
||||||
private sub: Subscription;
|
private sub: Subscription;
|
||||||
|
|
||||||
|
public status: number;
|
||||||
|
|
||||||
constructor (private _metricsService: MetricsService) {}
|
constructor (private _metricsService: MetricsService) {}
|
||||||
|
|
||||||
ngOnInit() {
|
ngOnInit() {
|
||||||
|
@ -181,7 +182,7 @@ export class MetricsComponent {
|
||||||
this.sub.unsubscribe();
|
this.sub.unsubscribe();
|
||||||
}
|
}
|
||||||
|
|
||||||
getMetrics() {
|
private getMetrics() {
|
||||||
//if(this.id == undefined || this.id == "") {
|
//if(this.id == undefined || this.id == "") {
|
||||||
// console.log("supplied id in metrics is not acceptable");
|
// console.log("supplied id in metrics is not acceptable");
|
||||||
//}
|
//}
|
||||||
|
|
|
@ -48,9 +48,11 @@
|
||||||
</li>
|
</li>
|
||||||
</ul>
|
</ul>
|
||||||
|
|
||||||
<button class="uk-button uk-button-default uk-hidden@m" type="button">
|
<div class="uk-hidden@m uk-margin-top">
|
||||||
|
<button class="uk-button uk-button-default" type="button">
|
||||||
<span uk-navbar-toggle-icon></span> <span class="uk-margin-small-left">{{activeTab}}</span>
|
<span uk-navbar-toggle-icon></span> <span class="uk-margin-small-left">{{activeTab}}</span>
|
||||||
</button>
|
</button>
|
||||||
|
</div>
|
||||||
|
|
||||||
<ul id="toggle-small-tabs" class="uk-subnav uk-subnav-pill uk-dropdown uk-hidden@m" uk-switcher="connect: #tab-content" uk-dropdown="mode: click" uk-toggle="target: #toggle-small-tabs">
|
<ul id="toggle-small-tabs" class="uk-subnav uk-subnav-pill uk-dropdown uk-hidden@m" uk-switcher="connect: #tab-content" uk-dropdown="mode: click" uk-toggle="target: #toggle-small-tabs">
|
||||||
<li (click)="activeTab='Publications'" [class]="activeTab == 'Publications'?'uk-active':''">
|
<li (click)="activeTab='Publications'" [class]="activeTab == 'Publications'?'uk-active':''">
|
||||||
|
|
|
@ -26,49 +26,58 @@ import {PiwikService} from '../../utils/piwik/piwik.service';
|
||||||
})
|
})
|
||||||
|
|
||||||
export class OrganizationComponent {
|
export class OrganizationComponent {
|
||||||
|
public organizationInfo: OrganizationInfo;
|
||||||
|
public organizationId: string;
|
||||||
|
|
||||||
organizationInfo: OrganizationInfo;
|
// Message variables
|
||||||
//private metrics: string;
|
|
||||||
private organizationId: string;
|
|
||||||
private projectsNum: number = 0;
|
|
||||||
private fundersSet: Set<string>;
|
|
||||||
private emptyFundersSet: boolean = true;
|
|
||||||
public warningMessage = "";
|
public warningMessage = "";
|
||||||
public errorMessage = "";
|
public errorMessage = "";
|
||||||
public showLoading: boolean = true;
|
public showLoading: boolean = true;
|
||||||
|
|
||||||
|
// CSV variables
|
||||||
public downloadURLAPI: string;
|
public downloadURLAPI: string;
|
||||||
public csvProjectParamsHead: string;
|
public csvProjectParamsHead: string;
|
||||||
public csvPublicationParamsHead: string;
|
public csvPublicationParamsHead: string;
|
||||||
public csvParamsTail: string;
|
public csvParamsTail: string;
|
||||||
|
|
||||||
sub: any;
|
// Active tab variable for responsiveness
|
||||||
piwiksub: any;
|
|
||||||
|
|
||||||
public activeTab: string = "Publications";
|
public activeTab: string = "Publications";
|
||||||
public reloadDataproviders: boolean = true;
|
|
||||||
public projectsClicked: boolean = false;
|
|
||||||
|
|
||||||
|
// Variables for publications, projects, dataproviders tabs
|
||||||
public fetchPublications: FetchPublications;
|
public fetchPublications: FetchPublications;
|
||||||
public linkToSearchPublications: string = "";
|
public linkToSearchPublications: string = "";
|
||||||
public fetchProjects: FetchProjects;
|
public fetchProjects: FetchProjects;
|
||||||
public fetchDataproviders : FetchDataproviders;
|
public fetchDataproviders : FetchDataproviders;
|
||||||
public linkToSearchDataproviders:string = "";
|
public linkToSearchDataproviders:string = "";
|
||||||
@ViewChild (SearchingProjectsTabComponent) searchingProjectsTabComponent : SearchingProjectsTabComponent ;
|
//public projectFunders:string[] = [];
|
||||||
public projectFunders:string[] = [];
|
|
||||||
|
|
||||||
public routerHelper:RouterHelper = new RouterHelper();
|
// Variables for projects query (query results only if projects tab is clicked)
|
||||||
|
public projectsClicked: boolean = false;
|
||||||
|
@ViewChild (SearchingProjectsTabComponent) searchingProjectsTabComponent : SearchingProjectsTabComponent ;
|
||||||
|
|
||||||
@ViewChild (ModalLoading) loading : ModalLoading ;
|
@ViewChild (ModalLoading) loading : ModalLoading ;
|
||||||
|
// Alert box when CSV: Project Publications for a funder is requested
|
||||||
@ViewChild('AlertModalApplyAll') alertApplyAll;
|
@ViewChild('AlertModalApplyAll') alertApplyAll;
|
||||||
|
// Alert box when something is wrong with CSV requests
|
||||||
@ViewChild('AlertModalCsvError') alertCsvError;
|
@ViewChild('AlertModalCsvError') alertCsvError;
|
||||||
|
|
||||||
public funder: string;
|
public routerHelper:RouterHelper = new RouterHelper();
|
||||||
public funderId: string;
|
|
||||||
public count: number;
|
|
||||||
|
|
||||||
public errorCodes:ErrorCodes = new ErrorCodes();
|
public errorCodes:ErrorCodes = new ErrorCodes();
|
||||||
|
|
||||||
|
//private projectsNum: number = 0;
|
||||||
|
//private fundersSet: Set<string>;
|
||||||
|
//private emptyFundersSet: boolean = true;
|
||||||
|
|
||||||
|
// Request results for content providers only the one time (first time tab is clicked)
|
||||||
|
private reloadDataproviders: boolean = true;
|
||||||
|
|
||||||
|
// Helper variables to specify funder in downloadPublicationsFile function
|
||||||
|
private funder: string;
|
||||||
|
private funderId: string;
|
||||||
|
private funderCountPublications: number;
|
||||||
|
sub: any;
|
||||||
|
piwiksub: any;
|
||||||
|
|
||||||
constructor (private element: ElementRef,
|
constructor (private element: ElementRef,
|
||||||
private _organizationService: OrganizationService,
|
private _organizationService: OrganizationService,
|
||||||
private _piwikService:PiwikService,
|
private _piwikService:PiwikService,
|
||||||
|
@ -186,6 +195,7 @@ export class OrganizationComponent {
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
*/
|
*/
|
||||||
|
/*
|
||||||
private handleClick(funder: string) {
|
private handleClick(funder: string) {
|
||||||
if(this.emptyFundersSet) {
|
if(this.emptyFundersSet) {
|
||||||
this.fundersSet.clear();
|
this.fundersSet.clear();
|
||||||
|
@ -207,7 +217,7 @@ export class OrganizationComponent {
|
||||||
console.info(funder+" funder added");
|
console.info(funder+" funder added");
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
*/
|
||||||
//private getProjectsData(key: string): any {
|
//private getProjectsData(key: string): any {
|
||||||
//return this.projectsData;
|
//return this.projectsData;
|
||||||
//}
|
//}
|
||||||
|
@ -234,13 +244,13 @@ export class OrganizationComponent {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
private searchDataprovidersInit() {
|
public searchDataprovidersInit() {
|
||||||
if(this.reloadDataproviders && this.fetchDataproviders.searchUtils.totalResults > 0) {
|
if(this.reloadDataproviders && this.fetchDataproviders.searchUtils.totalResults > 0) {
|
||||||
this.searchDataproviders();
|
this.searchDataproviders();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
downloadFile(url:string){
|
public downloadFile(url:string){
|
||||||
console.log("Downloading file: "+ url);
|
console.log("Downloading file: "+ url);
|
||||||
|
|
||||||
this.openLoading();
|
this.openLoading();
|
||||||
|
@ -262,7 +272,7 @@ export class OrganizationComponent {
|
||||||
() => console.log('Completed file download.'));
|
() => console.log('Completed file download.'));
|
||||||
}
|
}
|
||||||
|
|
||||||
downloadPublicationsFile(funder: string, funderId:string, count:number){
|
private downloadPublicationsFile(funder: string, funderId:string, count:number){
|
||||||
console.log("Downloading publications file");
|
console.log("Downloading publications file");
|
||||||
|
|
||||||
this.openLoading();
|
this.openLoading();
|
||||||
|
@ -382,37 +392,38 @@ export class OrganizationComponent {
|
||||||
// error => console.log("Error getting number of publications for project."));
|
// error => console.log("Error getting number of publications for project."));
|
||||||
// }//);
|
// }//);
|
||||||
}
|
}
|
||||||
updateDescription(description:string){
|
|
||||||
|
private updateDescription(description:string){
|
||||||
this._meta.updateMeta("description", description);
|
this._meta.updateMeta("description", description);
|
||||||
this._meta.updateProperty("og:description", description);
|
this._meta.updateProperty("og:description", description);
|
||||||
}
|
}
|
||||||
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._meta.setTitle(_title );
|
this._meta.setTitle(_title );
|
||||||
this._meta.updateProperty("og:title",_title);
|
this._meta.updateProperty("og:title",_title);
|
||||||
}
|
}
|
||||||
updateUrl(url:string){
|
private updateUrl(url:string){
|
||||||
this._meta.updateProperty("og:url", url);
|
this._meta.updateProperty("og:url", url);
|
||||||
}
|
}
|
||||||
|
|
||||||
public openLoading(){
|
private openLoading(){
|
||||||
if(this.loading){
|
if(this.loading){
|
||||||
this.loading.open();
|
this.loading.open();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
public closeLoading(){
|
private closeLoading(){
|
||||||
if(this.loading){
|
if(this.loading){
|
||||||
this.loading.close();
|
this.loading.close();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
public setMessageLoading(message: string){
|
private setMessageLoading(message: string){
|
||||||
if(this.loading){
|
if(this.loading){
|
||||||
this.loading.message = message;
|
this.loading.message = message;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
confirmOpenApplyAll(funder: string, funderId:string, count:number){
|
public confirmOpenApplyAll(funder: string, funderId:string, funderCountPublications:number){
|
||||||
this.alertApplyAll.cancelButton = true;
|
this.alertApplyAll.cancelButton = true;
|
||||||
this.alertApplyAll.okButton = true;
|
this.alertApplyAll.okButton = true;
|
||||||
this.alertApplyAll.alertTitle = "CSV FILE";
|
this.alertApplyAll.alertTitle = "CSV FILE";
|
||||||
|
@ -423,13 +434,13 @@ export class OrganizationComponent {
|
||||||
|
|
||||||
this.funder = funder;
|
this.funder = funder;
|
||||||
this.funderId = funderId;
|
this.funderId = funderId;
|
||||||
this.count = count;
|
this.funderCountPublications = funderCountPublications;
|
||||||
}
|
}
|
||||||
confirmCloseApplyAll(data){
|
public confirmCloseApplyAll(data){
|
||||||
this.downloadPublicationsFile(this.funder, this.funderId, this.count);
|
this.downloadPublicationsFile(this.funder, this.funderId, this.funderCountPublications);
|
||||||
}
|
}
|
||||||
|
|
||||||
confirmOpenCsvError(){
|
public confirmOpenCsvError(){
|
||||||
this.alertCsvError.cancelButton = false;
|
this.alertCsvError.cancelButton = false;
|
||||||
this.alertCsvError.okButton = true;
|
this.alertCsvError.okButton = true;
|
||||||
this.alertCsvError.alertTitle = "ERROR DOWNLOADING CSV FILE";
|
this.alertCsvError.alertTitle = "ERROR DOWNLOADING CSV FILE";
|
||||||
|
|
|
@ -34,10 +34,6 @@
|
||||||
<span *ngFor="let organization of projectInfo.organizations let i=index"
|
<span *ngFor="let organization of projectInfo.organizations let i=index"
|
||||||
[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">
|
||||||
<!--
|
|
||||||
[attr.uk-tooltip]="organization.acronym && organization.name ? 'pos:right; delay:10' : 'cls: uk-invisible'"
|
|
||||||
[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">
|
||||||
<span *ngIf="organization.acronym">{{organization.acronym}}</span><span
|
<span *ngIf="organization.acronym">{{organization.acronym}}</span><span
|
||||||
|
@ -148,7 +144,7 @@
|
||||||
|
|
||||||
<div *ngIf="fetchPublications.searchUtils.totalResults > 0">
|
<div *ngIf="fetchPublications.searchUtils.totalResults > 0">
|
||||||
<div class = "uk-text-right" *ngIf = "fetchPublications.searchUtils.totalResults > 10" >
|
<div class = "uk-text-right" *ngIf = "fetchPublications.searchUtils.totalResults > 10" >
|
||||||
<a [queryParams]="routerHelper.createQueryParams(['projectId', 'pr'], [projectId, 'and'])"
|
<a [queryParams]="routerHelper.createQueryParams(['project', 'pr'], [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}} results
|
View all {{fetchPublications.searchUtils.totalResults}} results
|
||||||
</a>
|
</a>
|
||||||
|
@ -173,7 +169,7 @@
|
||||||
<div *ngIf="fetchDatasets.searchUtils.totalResults > 0">
|
<div *ngIf="fetchDatasets.searchUtils.totalResults > 0">
|
||||||
|
|
||||||
<div class = "uk-text-right" *ngIf = "fetchDatasets.searchUtils.totalResults > 10">
|
<div class = "uk-text-right" *ngIf = "fetchDatasets.searchUtils.totalResults > 10">
|
||||||
<a [queryParams]="routerHelper.createQueryParams(['projectId', 'pr'], [projectId, 'and'])"
|
<a [queryParams]="routerHelper.createQueryParams(['project', 'pr'], [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}} results
|
View all {{fetchDatasets.searchUtils.totalResults}} results
|
||||||
</a>
|
</a>
|
||||||
|
|
|
@ -23,48 +23,59 @@ import {PiwikService} from '../../utils/piwik/piwik.service';
|
||||||
templateUrl: 'project.component.html',
|
templateUrl: 'project.component.html',
|
||||||
})
|
})
|
||||||
export class ProjectComponent{
|
export class ProjectComponent{
|
||||||
|
|
||||||
public projectId : string ;
|
|
||||||
public projectInfo: ProjectInfo;
|
public projectInfo: ProjectInfo;
|
||||||
|
public projectId : string ;
|
||||||
public projectName: string;
|
public projectName: string;
|
||||||
|
|
||||||
|
// Metrics tab variables
|
||||||
public metricsClicked: boolean;
|
public metricsClicked: boolean;
|
||||||
public viewsFrameUrl: string;
|
public viewsFrameUrl: string;
|
||||||
public downloadsFrameUrl: string;
|
public downloadsFrameUrl: string;
|
||||||
private totalViews: number;
|
private totalViews: number;
|
||||||
private totalDownloads: number;
|
private totalDownloads: number;
|
||||||
private pageViews: number;
|
private pageViews: number;
|
||||||
|
|
||||||
|
// Statistics tab variables
|
||||||
public statsClicked: boolean;
|
public statsClicked: boolean;
|
||||||
public chartScientificResultsUrl: string;
|
public chartScientificResultsUrl: string;
|
||||||
public chartAccessModeUrl: string;
|
public chartAccessModeUrl: string;
|
||||||
public chartDatasourcesUrl: string;
|
public chartDatasourcesUrl: string;
|
||||||
|
|
||||||
|
// HTML variables in APP BOX
|
||||||
public publications_dynamic: string;
|
public publications_dynamic: string;
|
||||||
public datasets_dynamic: string;
|
public datasets_dynamic: string;
|
||||||
|
|
||||||
public project ;
|
public project ;
|
||||||
|
|
||||||
|
// CSV variables
|
||||||
public downloadURLAPI: string;
|
public downloadURLAPI: string;
|
||||||
public csvParams: string;
|
public csvParams: string;
|
||||||
public csvParamsDatasets: string;
|
public csvParamsDatasets: string;
|
||||||
|
|
||||||
|
// Message variables
|
||||||
public warningMessage = "";
|
public warningMessage = "";
|
||||||
public errorMessage = "";
|
public errorMessage = "";
|
||||||
public showLoading: boolean = true;
|
public showLoading: boolean = true;
|
||||||
|
|
||||||
sub: any;piwiksub: any;
|
// Active tab variable for responsiveness
|
||||||
|
|
||||||
public activeTab: string = "Publications";
|
public activeTab: string = "Publications";
|
||||||
public reloadDatasets: boolean = true;
|
|
||||||
|
|
||||||
|
// Request results for research data only the one time (first time tab is clicked)
|
||||||
|
private reloadDatasets: boolean = true;
|
||||||
|
|
||||||
|
// Variables for publications, research data tabs
|
||||||
public fetchPublications : FetchPublications;
|
public fetchPublications : FetchPublications;
|
||||||
public linkToSearchPublications = "";
|
public linkToSearchPublications = "";
|
||||||
public fetchDatasets : FetchDatasets;
|
public fetchDatasets : FetchDatasets;
|
||||||
public linkToSearchDatasets = "";
|
public linkToSearchDatasets = "";
|
||||||
|
|
||||||
public routerHelper:RouterHelper = new RouterHelper();
|
public routerHelper:RouterHelper = new RouterHelper();
|
||||||
public errorCodes:ErrorCodes = new ErrorCodes();
|
public errorCodes:ErrorCodes = new ErrorCodes();
|
||||||
|
|
||||||
@ViewChild (ModalLoading) loading : ModalLoading ;
|
@ViewChild (ModalLoading) loading : ModalLoading ;
|
||||||
|
|
||||||
|
sub: any;piwiksub: any;
|
||||||
|
|
||||||
constructor ( private element: ElementRef,
|
constructor ( private element: ElementRef,
|
||||||
private _projectService: ProjectService,
|
private _projectService: ProjectService,
|
||||||
private _piwikService:PiwikService,
|
private _piwikService:PiwikService,
|
||||||
|
@ -136,7 +147,7 @@ export class ProjectComponent{
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
createClipboard() {
|
private createClipboard() {
|
||||||
if(typeof window !== 'undefined') {
|
if(typeof window !== 'undefined') {
|
||||||
|
|
||||||
let publ_clipboard, datasets_clipboard;
|
let publ_clipboard, datasets_clipboard;
|
||||||
|
@ -165,7 +176,7 @@ export class ProjectComponent{
|
||||||
//this.activeTab = "Research Data";
|
//this.activeTab = "Research Data";
|
||||||
}
|
}
|
||||||
|
|
||||||
private searchDatasetsInit() {
|
public searchDatasetsInit() {
|
||||||
console.info("searchDatasetsInit");
|
console.info("searchDatasetsInit");
|
||||||
if(this.reloadDatasets && this.fetchDatasets.searchUtils.totalResults > 0) {
|
if(this.reloadDatasets && this.fetchDatasets.searchUtils.totalResults > 0) {
|
||||||
this.searchDatasets();
|
this.searchDatasets();
|
||||||
|
@ -175,7 +186,7 @@ export class ProjectComponent{
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
getProjectInfo (id:string) {
|
private getProjectInfo (id:string) {
|
||||||
this.warningMessage = '';
|
this.warningMessage = '';
|
||||||
this.errorMessage=""
|
this.errorMessage=""
|
||||||
this.showLoading = true;
|
this.showLoading = true;
|
||||||
|
@ -183,7 +194,7 @@ export class ProjectComponent{
|
||||||
this._projectService.getProjectInfo(id).subscribe(
|
this._projectService.getProjectInfo(id).subscribe(
|
||||||
data => {
|
data => {
|
||||||
this.projectInfo = data;
|
this.projectInfo = data;
|
||||||
console.info(this.projectInfo.title);
|
|
||||||
this.projectName = this.projectInfo.acronym;
|
this.projectName = this.projectInfo.acronym;
|
||||||
if(this.projectName == undefined || this.projectName == '') {
|
if(this.projectName == undefined || this.projectName == '') {
|
||||||
this.projectName = this.projectInfo.title;
|
this.projectName = this.projectInfo.title;
|
||||||
|
@ -197,13 +208,8 @@ console.info(this.projectInfo.title);
|
||||||
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 = OpenaireProperties.getFramesAPIURL()+'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 = OpenaireProperties.getFramesAPIURL()+'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 = OpenaireProperties.getFramesAPIURL()+'merge.php?com=query&data=[{"query":"projViewsTimeline","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=["spline"]&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';
|
|
||||||
*/
|
|
||||||
|
|
||||||
this.downloadsFrameUrl = OpenaireProperties.getFramesAPIURL()+'merge.php?com=query&data=[{"query":"projRepoDownloads","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 downloads"],"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.downloadsFrameUrl = OpenaireProperties.getFramesAPIURL()+'merge.php?com=query&data=[{"query":"projRepoDownloads","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 downloads"],"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.downloadsFrameUrl = OpenaireProperties.getFramesAPIURL()+'merge.php?com=query&data=[{"query":"projDownloadsTimeline","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 downloads"],"generalxaxis":"","theme":0,"in":[]}]&info_types=["spline"]&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';
|
|
||||||
*/
|
|
||||||
|
|
||||||
//stats tab charts
|
//stats tab charts
|
||||||
this.chartScientificResultsUrl='https://beta.openaire.eu/stats/chart.php?com=query&persistent=false&data={"query":"projScient","projTitle":"'+this.projectId+'", "table": "result", "fields": [{"fld": "number", "agg": "count", "type": "spline", "yaxis":1, "c":false}], "xaxis":{"name": "result_classifications-type", "agg": "avg"}, "group": "", "color": "", "type": "chart", "size":30, "sort": "xaxis", "xStyle":{"r": "-", "s": "-", "l": "-", "ft": "-", "wt": "-"}, "yaxisheaders": [""], "fieldsheaders": ["Research Results"], "in": [], "filters": [{"name": "result_datasources-datasource-name", "values": [" "], "to": "-1"}], "having": [], "incfilters": [], "inchaving": [], "title": "", "subtitle": "", "xaxistitle": ""}&w=600&h=250';
|
this.chartScientificResultsUrl='https://beta.openaire.eu/stats/chart.php?com=query&persistent=false&data={"query":"projScient","projTitle":"'+this.projectId+'", "table": "result", "fields": [{"fld": "number", "agg": "count", "type": "spline", "yaxis":1, "c":false}], "xaxis":{"name": "result_classifications-type", "agg": "avg"}, "group": "", "color": "", "type": "chart", "size":30, "sort": "xaxis", "xStyle":{"r": "-", "s": "-", "l": "-", "ft": "-", "wt": "-"}, "yaxisheaders": [""], "fieldsheaders": ["Research Results"], "in": [], "filters": [{"name": "result_datasources-datasource-name", "values": [" "], "to": "-1"}], "having": [], "incfilters": [], "inchaving": [], "title": "", "subtitle": "", "xaxistitle": ""}&w=600&h=250';
|
||||||
|
@ -219,7 +225,8 @@ console.info(this.projectInfo.title);
|
||||||
}
|
}
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
downloadfile(url:string){
|
|
||||||
|
public downloadfile(url:string){
|
||||||
this.openLoading();
|
this.openLoading();
|
||||||
this.setMessageLoading("Downloading CSV file");
|
this.setMessageLoading("Downloading CSV file");
|
||||||
|
|
||||||
|
@ -233,6 +240,7 @@ console.info(this.projectInfo.title);
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/*
|
||||||
showHTML(){
|
showHTML(){
|
||||||
let info:string = "<h1>Publications of Project ";
|
let info:string = "<h1>Publications of Project ";
|
||||||
|
|
||||||
|
@ -264,40 +272,42 @@ console.info(this.projectInfo.title);
|
||||||
error => console.log("Error downloading the file."),
|
error => console.log("Error downloading the file."),
|
||||||
() => console.log('Completed file download.'));
|
() => console.log('Completed file download.'));
|
||||||
}
|
}
|
||||||
|
|
||||||
funct(data) {
|
funct(data) {
|
||||||
var win = window.open(window.URL.createObjectURL(data));
|
var win = window.open(window.URL.createObjectURL(data));
|
||||||
}
|
}
|
||||||
|
*/
|
||||||
public metricsResults($event) {
|
public metricsResults($event) {
|
||||||
this.totalViews = $event.totalViews;
|
this.totalViews = $event.totalViews;
|
||||||
this.totalDownloads = $event.totalDownloads;
|
this.totalDownloads = $event.totalDownloads;
|
||||||
this.pageViews = $event.pageViews;
|
this.pageViews = $event.pageViews;
|
||||||
}
|
}
|
||||||
updateDescription(description:string){
|
|
||||||
|
private updateDescription(description:string){
|
||||||
this._meta.updateMeta("description", description);
|
this._meta.updateMeta("description", description);
|
||||||
this._meta.updateProperty("og:description", description);
|
this._meta.updateProperty("og:description", description);
|
||||||
}
|
}
|
||||||
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._meta.setTitle(_title );
|
this._meta.setTitle(_title );
|
||||||
this._meta.updateProperty("og:title",_title);
|
this._meta.updateProperty("og:title",_title);
|
||||||
}
|
}
|
||||||
updateUrl(url:string){
|
private updateUrl(url:string){
|
||||||
this._meta.updateProperty("og:url", url);
|
this._meta.updateProperty("og:url", url);
|
||||||
}
|
}
|
||||||
|
|
||||||
public openLoading(){
|
private openLoading(){
|
||||||
if(this.loading){
|
if(this.loading){
|
||||||
this.loading.open();
|
this.loading.open();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
public closeLoading(){
|
private closeLoading(){
|
||||||
if(this.loading){
|
if(this.loading){
|
||||||
this.loading.close();
|
this.loading.close();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
public setMessageLoading(message: string){
|
private setMessageLoading(message: string){
|
||||||
if(this.loading){
|
if(this.loading){
|
||||||
this.loading.message = message;
|
this.loading.message = message;
|
||||||
}
|
}
|
||||||
|
|
|
@ -3,7 +3,6 @@
|
||||||
<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" 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" role="alert">{{errorMessage}}</div>
|
||||||
<div *ngIf="showLoading" class="uk-animation-fade uk-margin-large-top uk-width-1-1" role="alert"><img src="./assets/loading.gif" class="uk-align-center" alt="Loading"></div>
|
<div *ngIf="showLoading" class="uk-animation-fade uk-margin-large-top uk-width-1-1" role="alert"><img src="./assets/loading.gif" class="uk-align-center" alt="Loading"></div>
|
||||||
|
@ -61,9 +60,8 @@
|
||||||
</li>
|
</li>
|
||||||
</ul>
|
</ul>
|
||||||
|
|
||||||
|
<div *ngIf="publicationInfo.description" class="uk-margin-bottom uk-text-justify descriptionText">
|
||||||
<div *ngIf="publicationInfo.description">
|
{{publicationInfo.description}}
|
||||||
<div class="uk-text-justify descriptionText">{{publicationInfo.description}}</div>
|
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
|
|
||||||
|
|
|
@ -18,51 +18,51 @@ import { Meta} from '../../../angular2-meta';
|
||||||
})
|
})
|
||||||
|
|
||||||
export class PublicationComponent {
|
export class PublicationComponent {
|
||||||
|
public publicationInfo: PublicationInfo;
|
||||||
|
public articleId: string;
|
||||||
|
|
||||||
|
// APP BOX variables
|
||||||
public showAllCollectedFrom: boolean = false;
|
public showAllCollectedFrom: boolean = false;
|
||||||
public showAllDownloadFrom: boolean = false;
|
public showAllDownloadFrom: boolean = false;
|
||||||
public showAllFundedBy: boolean = false;
|
public showAllFundedBy: boolean = false;
|
||||||
public showAllPublishedIn: boolean = false;
|
public showAllPublishedIn: boolean = false;
|
||||||
|
|
||||||
sub: any;piwiksub: any;
|
// Metrics tab variables
|
||||||
articleId: string;
|
public metricsClicked: boolean;
|
||||||
public publicationInfo: PublicationInfo;
|
public viewsFrameUrl: string;
|
||||||
private metricsClicked: boolean;
|
public downloadsFrameUrl: string;
|
||||||
private viewsFrameUrl: string;
|
public totalViews: number;
|
||||||
private downloadsFrameUrl: string;
|
public totalDownloads: number;
|
||||||
private totalViews: number;
|
public pageViews: number;
|
||||||
private totalDownloads: number;
|
|
||||||
private pageViews: number;
|
|
||||||
|
|
||||||
//public showAllReferences: boolean = false;
|
// Custom tab paging variables
|
||||||
public referencesPage: number = 1;
|
public referencesPage: number = 1;
|
||||||
public organizationsPage: number = 1;
|
public organizationsPage: number = 1;
|
||||||
public softwarePage: number = 1;
|
public softwarePage: number = 1;
|
||||||
public bioentitiesPage: number = 1;
|
public bioentitiesPage: number = 1;
|
||||||
|
public pageSize: number = 10;
|
||||||
|
/*
|
||||||
|
public startt: number = 0;
|
||||||
|
public stopp: number = 0;
|
||||||
|
*/
|
||||||
|
|
||||||
public showAllRelResData: boolean = false;
|
// Active tab variable for responsiveness
|
||||||
public showAllSimilPubl: boolean = false;
|
public activeTab: string = "References";
|
||||||
public showFundingDetails: boolean = false;
|
|
||||||
|
|
||||||
|
// Map counting variables
|
||||||
public bioentitiesNum: number = 0;
|
public bioentitiesNum: number = 0;
|
||||||
public relatedResearchResultsNum: number = 0;
|
public relatedResearchResultsNum: number = 0;
|
||||||
|
|
||||||
private doi: string;
|
// Message variables
|
||||||
|
|
||||||
public result ;
|
|
||||||
|
|
||||||
public warningMessage = "";
|
public warningMessage = "";
|
||||||
public errorMessage = "";
|
public errorMessage = "";
|
||||||
public showLoading: boolean = true;
|
public showLoading: boolean = true;
|
||||||
|
|
||||||
public routerHelper:RouterHelper = new RouterHelper();
|
public routerHelper:RouterHelper = new RouterHelper();
|
||||||
|
|
||||||
public activeTab: string = "References";
|
private doi: string;
|
||||||
|
private result;
|
||||||
public startt: number = 0;
|
sub: any;piwiksub: any;
|
||||||
public stopp: number = 0;
|
|
||||||
|
|
||||||
public pageSize: number = 10;
|
|
||||||
|
|
||||||
constructor ( private element: ElementRef,
|
constructor ( private element: ElementRef,
|
||||||
private _publicationService: PublicationService,
|
private _publicationService: PublicationService,
|
||||||
|
@ -95,16 +95,12 @@ export class PublicationComponent {
|
||||||
}
|
}
|
||||||
|
|
||||||
this.viewsFrameUrl = OpenaireProperties.getFramesAPIURL()+'merge.php?com=query&data=[{"query":"resRepoViews", "resTitle":"'+this.articleId+'", "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":"Repository","yaxisheaders":["Monthly views"],"generalxaxis":"","theme":0,"in":[],"filters":[{"name":"","values":[""],"to":"-1"}]}]&info_types=["column"]&stacking=normal&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(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 = OpenaireProperties.getFramesAPIURL()+'merge.php?com=query&data=[{"query":"resRepoViews", "resTitle":"'+this.articleId+'", "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":"Repository","yaxisheaders":["Monthly views"],"generalxaxis":"","theme":0,"in":[],"filters":[{"name":"","values":[""],"to":"-1"}]}]&info_types=["column"]&stacking=normal&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(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 = OpenaireProperties.getFramesAPIURL()+'merge.php?com=query&data=[{"query":"resViewsTimeline", "resTitle":"'+this.articleId+'", "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":"Repository","yaxisheaders":["Monthly views"],"generalxaxis":"","theme":0,"in":[],"filters":[{"name":"","values":[""],"to":"-1"}]}]&info_types=["column"]&stacking=normal&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.downloadsFrameUrl = OpenaireProperties.getFramesAPIURL()+'merge.php?com=query&data=[{"query":"resRepoDownloads", "resTitle":"'+this.articleId+'", "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":"Repository","yaxisheaders":["Monthly downloads"],"generalxaxis":"","theme":0,"in":[],"filters":[{"name":"","values":[""],"to":"-1"}]}]&info_types=["column"]&stacking=normal&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(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.downloadsFrameUrl = OpenaireProperties.getFramesAPIURL()+'merge.php?com=query&data=[{"query":"resRepoDownloads", "resTitle":"'+this.articleId+'", "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":"Repository","yaxisheaders":["Monthly downloads"],"generalxaxis":"","theme":0,"in":[],"filters":[{"name":"","values":[""],"to":"-1"}]}]&info_types=["column"]&stacking=normal&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(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.downloadsFrameUrl = OpenaireProperties.getFramesAPIURL()+'merge.php?com=query&data=[{"query":"resRepoDownloadTimeline", "resTitle":"'+this.articleId+'", "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":"Repository","yaxisheaders":["Monthly downloads"],"generalxaxis":"","theme":0,"in":[],"filters":[{"name":"","values":[""],"to":"-1"}]}]&info_types=["column"]&stacking=normal&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(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';
|
|
||||||
*/
|
|
||||||
if (typeof document !== 'undefined') {
|
if (typeof document !== 'undefined') {
|
||||||
this.element.nativeElement.scrollIntoView();
|
this.element.nativeElement.scrollIntoView();
|
||||||
}
|
}
|
||||||
|
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -115,7 +111,7 @@ export class PublicationComponent {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
getPublicationInfo(id:string) {
|
private getPublicationInfo(id:string) {
|
||||||
this.warningMessage = '';
|
this.warningMessage = '';
|
||||||
this.errorMessage=""
|
this.errorMessage=""
|
||||||
this.showLoading = true;
|
this.showLoading = true;
|
||||||
|
@ -185,10 +181,6 @@ export class PublicationComponent {
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
/*showChange($event) {
|
|
||||||
this.showAllReferences=$event.value;
|
|
||||||
}*/
|
|
||||||
|
|
||||||
public downloadClicked($event) {
|
public downloadClicked($event) {
|
||||||
this.totalViews = $event.totalViews;
|
this.totalViews = $event.totalViews;
|
||||||
this.totalDownloads = $event.totalDownloads;
|
this.totalDownloads = $event.totalDownloads;
|
||||||
|
@ -256,22 +248,22 @@ export class PublicationComponent {
|
||||||
tooltipContent+="</div>"
|
tooltipContent+="</div>"
|
||||||
return tooltipContent;
|
return tooltipContent;
|
||||||
}
|
}
|
||||||
updateDescription(description:string){
|
private updateDescription(description:string){
|
||||||
this._meta.updateMeta("description", description);
|
this._meta.updateMeta("description", description);
|
||||||
this._meta.updateProperty("og:description", description);
|
this._meta.updateProperty("og:description", description);
|
||||||
}
|
}
|
||||||
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._meta.setTitle(_title );
|
this._meta.setTitle(_title );
|
||||||
this._meta.updateProperty("og:title",_title);
|
this._meta.updateProperty("og:title",_title);
|
||||||
}
|
}
|
||||||
|
|
||||||
updateUrl(url:string){
|
private updateUrl(url:string){
|
||||||
this._meta.updateProperty("og:url", url);
|
this._meta.updateProperty("og:url", url);
|
||||||
}
|
}
|
||||||
|
|
||||||
totalPages(totalResults: number): number {
|
public totalPages(totalResults: number): number {
|
||||||
let totalPages:any = totalResults/this.pageSize;
|
let totalPages:any = totalResults/this.pageSize;
|
||||||
if(!(Number.isInteger(totalPages))) {
|
if(!(Number.isInteger(totalPages))) {
|
||||||
totalPages = (parseInt(totalPages, this.pageSize) + 1);
|
totalPages = (parseInt(totalPages, this.pageSize) + 1);
|
||||||
|
@ -279,22 +271,30 @@ export class PublicationComponent {
|
||||||
return totalPages;
|
return totalPages;
|
||||||
}
|
}
|
||||||
|
|
||||||
updateReferencesPage($event) {
|
public updateReferencesPage($event) {
|
||||||
this.referencesPage = $event.value;
|
this.referencesPage = $event.value;
|
||||||
}
|
}
|
||||||
|
|
||||||
updateOrganizationsPage($event) {
|
public updateOrganizationsPage($event) {
|
||||||
this.organizationsPage = $event.value;
|
this.organizationsPage = $event.value;
|
||||||
}
|
}
|
||||||
|
|
||||||
updateSoftwarePage($event) {
|
public updateSoftwarePage($event) {
|
||||||
this.softwarePage = $event.value;
|
this.softwarePage = $event.value;
|
||||||
}
|
}
|
||||||
|
|
||||||
updateBioentitiesPage($event) {
|
public updateBioentitiesPage($event) {
|
||||||
this.bioentitiesPage = $event.value;
|
this.bioentitiesPage = $event.value;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public keysToArray(bioentities: Map<string, string>) : string[] {
|
||||||
|
let keys: string[] = [];
|
||||||
|
bioentities.forEach(function (value, key, map) {
|
||||||
|
keys.push(key);
|
||||||
|
});
|
||||||
|
return keys;
|
||||||
|
}
|
||||||
|
/*
|
||||||
start(i: number, bioentitiesPage: number) {
|
start(i: number, bioentitiesPage: number) {
|
||||||
let sum = 0;
|
let sum = 0;
|
||||||
let index=0;
|
let index=0;
|
||||||
|
@ -355,13 +355,6 @@ export class PublicationComponent {
|
||||||
this.stopp = retValue;
|
this.stopp = retValue;
|
||||||
return retValue;
|
return retValue;
|
||||||
}
|
}
|
||||||
|
*/
|
||||||
keysToArray(bioentities: Map<string, string>) : string[] {
|
|
||||||
let keys: string[] = [];
|
|
||||||
bioentities.forEach(function (value, key, map) {
|
|
||||||
keys.push(key);
|
|
||||||
});
|
|
||||||
return keys;
|
|
||||||
}
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
|
@ -58,12 +58,13 @@ export class SearchingProjectsTabComponent {
|
||||||
@Input() organizationId:string = "";
|
@Input() organizationId:string = "";
|
||||||
public page :number = 1;
|
public page :number = 1;
|
||||||
public size :number = 10;
|
public size :number = 10;
|
||||||
public linkToSearchProjects;
|
public linkToSearchProjects: string;
|
||||||
private filterQuery:string = "";
|
|
||||||
|
|
||||||
public routerHelper:RouterHelper = new RouterHelper();
|
public routerHelper:RouterHelper = new RouterHelper();
|
||||||
public errorCodes:ErrorCodes = new ErrorCodes();
|
public errorCodes:ErrorCodes = new ErrorCodes();
|
||||||
|
|
||||||
|
private filterQuery:string = "";
|
||||||
|
|
||||||
constructor (private route: ActivatedRoute,
|
constructor (private route: ActivatedRoute,
|
||||||
private _searchProjectsService: SearchProjectsService) {
|
private _searchProjectsService: SearchProjectsService) {
|
||||||
}
|
}
|
||||||
|
@ -80,24 +81,24 @@ export class SearchingProjectsTabComponent {
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
search(refine:boolean, filterQuery:string){
|
private search(refine:boolean, filterQuery:string){
|
||||||
var refineFields:string [] = ["funder"];
|
var refineFields:string [] = ["funder"];
|
||||||
this.fetchProjects.getResultsForOrganizations(this.organizationId, filterQuery, this.page, this.size,(refine)?refineFields:[]);
|
this.fetchProjects.getResultsForOrganizations(this.organizationId, filterQuery, this.page, this.size,(refine)?refineFields:[]);
|
||||||
}
|
}
|
||||||
|
|
||||||
pageChange($event) {
|
public pageChange($event) {
|
||||||
this.page=$event.value;
|
this.page=$event.value;
|
||||||
this.search(false, this.filterQuery);
|
this.search(false, this.filterQuery);
|
||||||
}
|
}
|
||||||
|
|
||||||
filterChange($event) {
|
public filterChange($event) {
|
||||||
console.log("Filter Changed");
|
console.log("Filter Changed");
|
||||||
this.updateFilters();
|
this.updateFilters();
|
||||||
//this.search(true, this.filterQuery);
|
//this.search(true, this.filterQuery);
|
||||||
this.search(false, this.filterQuery);
|
this.search(false, this.filterQuery);
|
||||||
}
|
}
|
||||||
|
|
||||||
updateFilters (){
|
private updateFilters (){
|
||||||
this.filterQuery = "";
|
this.filterQuery = "";
|
||||||
for (let filter of this.fetchProjects.filters){
|
for (let filter of this.fetchProjects.filters){
|
||||||
var filterLimits="";
|
var filterLimits="";
|
||||||
|
|
|
@ -43,7 +43,7 @@ export class ShowAuthorsComponent {
|
||||||
@Input() authors: { [key: string]: string }[];
|
@Input() authors: { [key: string]: string }[];
|
||||||
@Input() searchPage:string ="publications"
|
@Input() searchPage:string ="publications"
|
||||||
|
|
||||||
private showAll: boolean = false;
|
public showAll: boolean = false;
|
||||||
public routerHelper:RouterHelper = new RouterHelper();
|
public routerHelper:RouterHelper = new RouterHelper();
|
||||||
|
|
||||||
constructor (private element: ElementRef) {
|
constructor (private element: ElementRef) {
|
||||||
|
|
Loading…
Reference in New Issue