[Trunk | Library]
1. rangeFilter.component.html: [Bug fix] Last 5 years used to calculate 6 years and last 10 years used to calculate 11 years. 2. projectInfo.ts & project.service.ts: In "funding" object added "callIdentifier" which is parsed only for funder "EC". 3. project.component.html: Checks for statistics updated | "Research results" renamed to "Research outcomes" | Show "funding.callIdentifier" if existing. 4. project.component.ts & organization.component.ts & dataProvider.component.ts: Initalize "errorMessage" when service returns error != 404. 5. statisticsTab.component.ts: Checks for charts updated | Timeline chart dates grouped by 6 (up to 80 years). 6. dataProvider.component.html: Checks for statistics updated. git-svn-id: https://svn.driver.research-infrastructures.eu/driver/dnet40/modules/uoa-services-library/trunk/ng-openaire-library/src/app@58286 d315682c-612b-4755-9ff5-7f18f6832af3
This commit is contained in:
parent
9d69da41fd
commit
86e3c978b9
|
@ -336,7 +336,8 @@
|
||||||
<span class="uk-text-middle">Related Content Providers</span>
|
<span class="uk-text-middle">Related Content Providers</span>
|
||||||
</div>
|
</div>
|
||||||
<!-- *ngIf="dataProviderInfo.tabs2.indexOf('Statistics') != -1"-->
|
<!-- *ngIf="dataProviderInfo.tabs2.indexOf('Statistics') != -1"-->
|
||||||
<div
|
<div *ngIf="(fetchPublications.searchUtils.totalResults > 0 || fetchDatasets.searchUtils.totalResults > 0
|
||||||
|
|| fetchSoftware.searchUtils.totalResults > 0 || fetchOrps.searchUtils.totalResults > 0)"
|
||||||
(click)="openStatistics()" class="clickable uk-margin-right">
|
(click)="openStatistics()" class="clickable uk-margin-right">
|
||||||
<svg xmlns="http://www.w3.org/2000/svg" height="24" viewBox="0 0 24 24" width="24">
|
<svg xmlns="http://www.w3.org/2000/svg" height="24" viewBox="0 0 24 24" width="24">
|
||||||
<path d="M0 0h24v24H0z" fill="none"></path>
|
<path d="M0 0h24v24H0z" fill="none"></path>
|
||||||
|
@ -606,7 +607,9 @@
|
||||||
[showForm]="showFeedback" (show)="showFeedback = $event"></feedback>
|
[showForm]="showFeedback" (show)="showFeedback = $event"></feedback>
|
||||||
<!-- Statistics -->
|
<!-- Statistics -->
|
||||||
<!-- && dataProviderInfo.tabs2 && dataProviderInfo.tabs2.indexOf('Statistics') != -1-->
|
<!-- && dataProviderInfo.tabs2 && dataProviderInfo.tabs2.indexOf('Statistics') != -1-->
|
||||||
<modal-alert *ngIf="dataProviderInfo"
|
<modal-alert *ngIf="dataProviderInfo &&
|
||||||
|
(fetchPublications.searchUtils.totalResults > 0 || fetchDatasets.searchUtils.totalResults > 0
|
||||||
|
|| fetchSoftware.searchUtils.totalResults > 0 || fetchOrps.searchUtils.totalResults > 0)"
|
||||||
classBody="uk-width-xxlarge uk-padding-remove-right" #statisticsModal>
|
classBody="uk-width-xxlarge uk-padding-remove-right" #statisticsModal>
|
||||||
<landing-header [properties]="properties" [title]="dataProviderInfo.title.name"
|
<landing-header [properties]="properties" [title]="dataProviderInfo.title.name"
|
||||||
[subTitle]="(dataProviderInfo.officialName
|
[subTitle]="(dataProviderInfo.officialName
|
||||||
|
|
|
@ -232,7 +232,7 @@ export class DataProviderComponent {
|
||||||
if(err.status == 404) {
|
if(err.status == 404) {
|
||||||
this._router.navigate(['/error'], {queryParams: {"page": this._location.path(true), "page_type": "dataprovider"}});
|
this._router.navigate(['/error'], {queryParams: {"page": this._location.path(true), "page_type": "dataprovider"}});
|
||||||
}
|
}
|
||||||
//this.errorMessage = 'No dataProvider found';
|
this.errorMessage = 'No dataProvider found';
|
||||||
this.showLoading = false;
|
this.showLoading = false;
|
||||||
this.seoService.createLinkForCanonicalURL(this.properties.baseLink + this.properties.searchLinkToDataProviders);
|
this.seoService.createLinkForCanonicalURL(this.properties.baseLink + this.properties.searchLinkToDataProviders);
|
||||||
}
|
}
|
||||||
|
|
|
@ -15,33 +15,34 @@ import {EnvProperties} from '../../utils/properties/env-properties';
|
||||||
<!-- || fetchDatasets.searchUtils.status == errorCodes.DONE-->
|
<!-- || fetchDatasets.searchUtils.status == errorCodes.DONE-->
|
||||||
<!-- || fetchSoftware.searchUtils.status == errorCodes.DONE-->
|
<!-- || fetchSoftware.searchUtils.status == errorCodes.DONE-->
|
||||||
<!-- || fetchOther.searchUtils.status == errorCodes.DONE)">-->
|
<!-- || fetchOther.searchUtils.status == errorCodes.DONE)">-->
|
||||||
|
<ng-container *ngIf="fetchPublications.searchUtils.totalResults > 0 || (fetchDatasets.searchUtils.totalResults > 0 ||
|
||||||
|
fetchSoftware.searchUtils.totalResults > 0 || fetchOther.searchUtils.totalResults > 0)">
|
||||||
<div class="uk-padding uk-padding-remove-top">
|
<div class="uk-padding uk-padding-remove-top">
|
||||||
<span class="uk-text-bold uk-text-small">Research Results Timeline</span>
|
<span class="uk-text-bold uk-text-small">Research outcomes Timeline</span>
|
||||||
<i-frame [url]=docsTimelineUrl ></i-frame>
|
<i-frame [url]=docsTimelineUrl ></i-frame>
|
||||||
</div>
|
</div>
|
||||||
<div class="uk-padding uk-padding-remove-top">
|
<div class="uk-padding uk-padding-remove-top">
|
||||||
<span class="uk-text-bold uk-text-small">Research Results Types</span>
|
<span class="uk-text-bold uk-text-small">Research outcomes Types</span>
|
||||||
<i-frame [url]=docsTypesUrl ></i-frame>
|
<i-frame [url]=docsTypesUrl ></i-frame>
|
||||||
</div>
|
</div>
|
||||||
<!-- </ng-container>-->
|
<!-- </ng-container>-->
|
||||||
|
|
||||||
<!-- <div *ngIf="fetchPublications.searchUtils.totalResults > 0 || (fetchDatasets.searchUtils.totalResults > 0-->
|
<!-- <div *ngIf="fetchPublications.searchUtils.totalResults > 0 || (fetchDatasets.searchUtils.totalResults > 0-->
|
||||||
<!-- || fetchSoftware.searchUtils.totalResults > 0 || fetchOther.searchUtils.totalResults > 0)"-->
|
<!-- || fetchSoftware.searchUtils.totalResults > 0 || fetchOther.searchUtils.totalResults > 0)"-->
|
||||||
<div
|
<div
|
||||||
class="uk-padding uk-padding-remove-top">
|
class="uk-padding uk-padding-remove-top">
|
||||||
<span class="uk-text-bold uk-text-small">Funders in Research Results of content provider</span>
|
<span class="uk-text-bold uk-text-small">Funders in research outcomes of content provider</span>
|
||||||
<i-frame [url]=docsFunderUrl ></i-frame>
|
<i-frame [url]=docsFunderUrl ></i-frame>
|
||||||
</div>
|
</div>
|
||||||
|
</ng-container>
|
||||||
|
|
||||||
<!-- <div *ngIf="fetchPublications.searchUtils.totalResults > 0 "-->
|
<div *ngIf="fetchPublications.searchUtils.totalResults > 0 "
|
||||||
<div
|
|
||||||
class="uk-padding uk-padding-remove-top">
|
class="uk-padding uk-padding-remove-top">
|
||||||
<span class="uk-text-bold uk-text-small">Projects with most Publications</span>
|
<span class="uk-text-bold uk-text-small">Projects with most Publications</span>
|
||||||
<i-frame [url]=pubsProjectsUrl ></i-frame>
|
<i-frame [url]=pubsProjectsUrl ></i-frame>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<!-- <div *ngIf="(fetchDatasets.searchUtils.totalResults > 0)"-->
|
<div *ngIf="(fetchDatasets.searchUtils.totalResults > 0)"
|
||||||
<div
|
|
||||||
class="uk-padding uk-padding-remove-top">
|
class="uk-padding uk-padding-remove-top">
|
||||||
<span class="uk-text-bold uk-text-small">Projects with most Research Data</span>
|
<span class="uk-text-bold uk-text-small">Projects with most Research Data</span>
|
||||||
<i-frame [url]=dataProjectsUrl></i-frame>
|
<i-frame [url]=dataProjectsUrl></i-frame>
|
||||||
|
@ -70,9 +71,9 @@ export class StatisticsTabComponent {
|
||||||
.subscribe((data: { envSpecific: EnvProperties }) => {
|
.subscribe((data: { envSpecific: EnvProperties }) => {
|
||||||
var properties = data.envSpecific;
|
var properties = data.envSpecific;
|
||||||
|
|
||||||
this.docsTimelineUrl =properties.statisticsFrameAPIURL+'chart.php?com=query&persistent=false&data={"query":"dtsrcYear","dtsrcName":"'+this.datasourceId+'","table": "result", "fields": [{"fld": "number", "agg": "count", "type": "line", "yaxis":1, "c":true}], "xaxis":{"name": "year", "agg": "avg"}, "group": "", "color": "", "type": "chart", "size":30, "sort": "xaxis", "xStyle":{"r": -30, "s": "-", "l": "-", "ft": "-", "wt": "-"}, "yaxisheaders": [""], "fieldsheaders": ["Research Results"], "in": [{"f":0, "text": "Yearly"}], "filters": [{"name":"year","max":"2016","min":"1997"},{"name": "result_datasources-datasource-name", "values":[""], "to": "-1"}],"having": [], "incfilters": [], "inchaving": [], "title": "", "subtitle": "", "xaxistitle": "Year"}&w=90%&h=90%';
|
this.docsTimelineUrl =properties.statisticsFrameAPIURL+'chart.php?com=query&persistent=false&data={"query":"dtsrcYear","dtsrcName":"'+this.datasourceId+'","table": "result", "fields": [{"fld": "number", "agg": "count", "type": "line", "yaxis":1, "c":true}], "xaxis":{"name": "year", "agg": "avg"}, "group": "", "color": "", "type": "chart", "size":80, "sort": "xaxis", "xStyle":{"r": -30, "s": "6", "l": "-", "ft": "-", "wt": "-"}, "yaxisheaders": [""], "fieldsheaders": ["Research Outcomes"], "in": [{"f":0, "text": "Yearly"}], "filters": [{"name":"year","max":"2016","min":"1997"},{"name": "result_datasources-datasource-name", "values":[""], "to": "-1"}],"having": [], "incfilters": [], "inchaving": [], "title": "", "subtitle": "", "xaxistitle": "Year"}&w=90%&h=90%';
|
||||||
this.docsTypesUrl = properties.statisticsFrameAPIURL+'chart.php?com=query&persistent=false&data={"query":"dtsrcPubs","dtsrcName":"'+this.datasourceId+'", "table": "result", "fields": [{"fld": "number", "agg": "count", "type": "pie", "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=90%&h=90%';
|
this.docsTypesUrl = properties.statisticsFrameAPIURL+'chart.php?com=query&persistent=false&data={"query":"dtsrcPubs","dtsrcName":"'+this.datasourceId+'", "table": "result", "fields": [{"fld": "number", "agg": "count", "type": "pie", "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 Outcomes"], "in": [], "filters": [{"name": "result_datasources-datasource-name", "values": [""], "to": "-1"}], "having": [], "incfilters": [], "inchaving": [], "title": "", "subtitle": "", "xaxistitle": ""}&w=90%&h=90%';
|
||||||
this.docsFunderUrl =properties.statisticsFrameAPIURL+'chart.php?com=query&persistent=false&data={"query":"dtsrcPubsFund","dtsrcName":"'+this.datasourceId+'", "table": "result", "fields": [{"fld": "number", "agg": "count", "type": "pie", "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=90%&h=90%';
|
this.docsFunderUrl =properties.statisticsFrameAPIURL+'chart.php?com=query&persistent=false&data={"query":"dtsrcPubsFund","dtsrcName":"'+this.datasourceId+'", "table": "result", "fields": [{"fld": "number", "agg": "count", "type": "pie", "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 Outcomes"], "in": [], "filters": [{"name": "result_datasources-datasource-name", "values": [""], "to": "-1"}], "having": [], "incfilters": [], "inchaving": [], "title": "", "subtitle": "", "xaxistitle": ""}&w=90%&h=90%';
|
||||||
this.dataProjectsUrl =properties.statisticsFrameAPIURL+'chart.php?com=query&persistent=false&data={"query":"dtsrcProjData","dtsrcName":"'+this.datasourceId+'", "table": "result", "fields": [{"fld": "number", "agg": "count", "type": "bar", "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 Data"], "in": [], "filters": [{"name": "result_datasources-datasource-name", "values": [""], "to": "-1"}], "having": [], "incfilters": [], "inchaving": [], "title": "", "subtitle": "", "xaxistitle": ""}&w=90%&h=90%';
|
this.dataProjectsUrl =properties.statisticsFrameAPIURL+'chart.php?com=query&persistent=false&data={"query":"dtsrcProjData","dtsrcName":"'+this.datasourceId+'", "table": "result", "fields": [{"fld": "number", "agg": "count", "type": "bar", "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 Data"], "in": [], "filters": [{"name": "result_datasources-datasource-name", "values": [""], "to": "-1"}], "having": [], "incfilters": [], "inchaving": [], "title": "", "subtitle": "", "xaxistitle": ""}&w=90%&h=90%';
|
||||||
this.pubsProjectsUrl =properties.statisticsFrameAPIURL+'chart.php?com=query&persistent=false&data={"query":"dtsrcProjPubs","dtsrcName":"'+this.datasourceId+'", "table": "result", "fields": [{"fld": "number", "agg": "count", "type": "bar", "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": ["Publications"], "in": [], "filters": [{"name": "result_datasources-datasource-name", "values": [""], "to": "-1"}], "having": [], "incfilters": [], "inchaving": [], "title": "", "subtitle": "", "xaxistitle": ""}&w=90%&h=90%';
|
this.pubsProjectsUrl =properties.statisticsFrameAPIURL+'chart.php?com=query&persistent=false&data={"query":"dtsrcProjPubs","dtsrcName":"'+this.datasourceId+'", "table": "result", "fields": [{"fld": "number", "agg": "count", "type": "bar", "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": ["Publications"], "in": [], "filters": [{"name": "result_datasources-datasource-name", "values": [""], "to": "-1"}], "having": [], "incfilters": [], "inchaving": [], "title": "", "subtitle": "", "xaxistitle": ""}&w=90%&h=90%';
|
||||||
});
|
});
|
||||||
|
|
|
@ -145,7 +145,7 @@ export class OrganizationComponent {
|
||||||
this.updateDescription("");
|
this.updateDescription("");
|
||||||
|
|
||||||
this.organizationId = params['organizationId'];
|
this.organizationId = params['organizationId'];
|
||||||
|
|
||||||
if (this.organizationId) {
|
if (this.organizationId) {
|
||||||
this.getOrganizationInfo();
|
this.getOrganizationInfo();
|
||||||
} else {
|
} else {
|
||||||
|
@ -294,7 +294,7 @@ export class OrganizationComponent {
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
this.seoService.createLinkForCanonicalURL(this.properties.baseLink + this.properties.searchLinkToOrganizations);
|
this.seoService.createLinkForCanonicalURL(this.properties.baseLink + this.properties.searchLinkToOrganizations);
|
||||||
//this.errorMessage = 'No organization found';
|
this.errorMessage = 'No organization found';
|
||||||
this.showLoading = false;
|
this.showLoading = false;
|
||||||
}
|
}
|
||||||
);
|
);
|
||||||
|
|
|
@ -143,10 +143,14 @@
|
||||||
<span class="uk-text-muted">Funder: </span>
|
<span class="uk-text-muted">Funder: </span>
|
||||||
{{projectInfo.funding.funderName}}
|
{{projectInfo.funding.funderName}}
|
||||||
</span>
|
</span>
|
||||||
<span *ngIf="projectInfo.funding.code" class="uk-display-inline-block">
|
<span *ngIf="projectInfo.funding.code" class="uk-margin-right uk-display-inline-block">
|
||||||
<span class="uk-text-muted">Project code: </span>
|
<span class="uk-text-muted">Project code: </span>
|
||||||
{{projectInfo.funding.code}}
|
{{projectInfo.funding.code}}
|
||||||
</span>
|
</span>
|
||||||
|
<span *ngIf="projectInfo.funding.callIdentifier" class="uk-display-inline-block">
|
||||||
|
<span class="uk-text-muted">Call for proposal: </span>
|
||||||
|
{{projectInfo.funding.callIdentifier}}
|
||||||
|
</span>
|
||||||
</li>
|
</li>
|
||||||
<li *ngIf="projectInfo.funding">
|
<li *ngIf="projectInfo.funding">
|
||||||
<span *ngIf="projectInfo.funding.fundingStream" class="uk-margin-right">
|
<span *ngIf="projectInfo.funding.fundingStream" class="uk-margin-right">
|
||||||
|
@ -676,7 +680,9 @@
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<!-- Statistics -->
|
<!-- Statistics -->
|
||||||
<modal-alert *ngIf="projectInfo"
|
<modal-alert *ngIf="projectInfo &&
|
||||||
|
(fetchPublications.searchUtils.totalResults > 0 || fetchDatasets.searchUtils.totalResults > 0
|
||||||
|
|| fetchSoftware.searchUtils.totalResults > 0 || fetchOrps.searchUtils.totalResults > 0)"
|
||||||
classBody="uk-width-xxlarge uk-padding-remove-right" #statisticsModal>
|
classBody="uk-width-xxlarge uk-padding-remove-right" #statisticsModal>
|
||||||
<landing-header [properties]="properties" [title]="projectName"
|
<landing-header [properties]="properties" [title]="projectName"
|
||||||
[subTitle]="projectInfo.acronym ? projectInfo.title : ''"
|
[subTitle]="projectInfo.acronym ? projectInfo.title : ''"
|
||||||
|
@ -695,15 +701,15 @@
|
||||||
(fetchPublications.searchUtils.status == errorCodes.DONE || fetchDatasets.searchUtils.status == errorCodes.DONE
|
(fetchPublications.searchUtils.status == errorCodes.DONE || fetchDatasets.searchUtils.status == errorCodes.DONE
|
||||||
|| fetchSoftware.searchUtils.status == errorCodes.DONE || fetchOrps.searchUtils.status == errorCodes.DONE)">
|
|| fetchSoftware.searchUtils.status == errorCodes.DONE || fetchOrps.searchUtils.status == errorCodes.DONE)">
|
||||||
<div class="uk-padding uk-padding-remove-top">
|
<div class="uk-padding uk-padding-remove-top">
|
||||||
<span class="uk-text-bold uk-text-small">Produced research results per year</span>
|
<span class="uk-text-bold uk-text-small">Produced research outcomes per year</span>
|
||||||
<i-frame [url]=chartScientificResultsUrl></i-frame>
|
<i-frame [url]=chartScientificResultsUrl></i-frame>
|
||||||
</div>
|
</div>
|
||||||
<div class="uk-padding uk-padding-remove-top">
|
<div class="uk-padding uk-padding-remove-top">
|
||||||
<span class="uk-text-bold uk-text-small">Access mode of research results</span>
|
<span class="uk-text-bold uk-text-small">Access mode of research outcomes</span>
|
||||||
<i-frame [url]=chartAccessModeUrl></i-frame>
|
<i-frame [url]=chartAccessModeUrl></i-frame>
|
||||||
</div>
|
</div>
|
||||||
<div class="uk-padding uk-padding-remove-top">
|
<div class="uk-padding uk-padding-remove-top">
|
||||||
<span class="uk-text-bold uk-text-small">Research results per datasource</span>
|
<span class="uk-text-bold uk-text-small">Research outcomes per datasource</span>
|
||||||
<i-frame [url]=chartDatasourcesUrl></i-frame>
|
<i-frame [url]=chartDatasourcesUrl></i-frame>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
|
@ -329,7 +329,7 @@ export class ProjectComponent {
|
||||||
|
|
||||||
private getProjectInfo(id: string) {
|
private getProjectInfo(id: string) {
|
||||||
this.warningMessage = '';
|
this.warningMessage = '';
|
||||||
this.errorMessage = ""
|
this.errorMessage = "";
|
||||||
this.showLoading = true;
|
this.showLoading = true;
|
||||||
|
|
||||||
this.projectInfo = null;
|
this.projectInfo = null;
|
||||||
|
@ -347,7 +347,7 @@ export class ProjectComponent {
|
||||||
this._router.navigate(['/error'], {queryParams: {"page": this._location.path(true), "page_type": "project"}});
|
this._router.navigate(['/error'], {queryParams: {"page": this._location.path(true), "page_type": "project"}});
|
||||||
}
|
}
|
||||||
this.seoService.createLinkForCanonicalURL(this.properties.baseLink + this.properties.searchLinkToProjects);
|
this.seoService.createLinkForCanonicalURL(this.properties.baseLink + this.properties.searchLinkToProjects);
|
||||||
//this.errorMessage = 'No project found';
|
this.errorMessage = 'No project found';
|
||||||
this.showLoading = false;
|
this.showLoading = false;
|
||||||
}
|
}
|
||||||
);
|
);
|
||||||
|
@ -355,7 +355,7 @@ export class ProjectComponent {
|
||||||
|
|
||||||
private getProjectInfoByGrantId(grantId: string, funder: string) {
|
private getProjectInfoByGrantId(grantId: string, funder: string) {
|
||||||
this.warningMessage = '';
|
this.warningMessage = '';
|
||||||
this.errorMessage = ""
|
this.errorMessage = "";
|
||||||
this.showLoading = true;
|
this.showLoading = true;
|
||||||
|
|
||||||
this.projectInfo = null;
|
this.projectInfo = null;
|
||||||
|
@ -372,6 +372,9 @@ export class ProjectComponent {
|
||||||
err => {
|
err => {
|
||||||
//console.log(err);
|
//console.log(err);
|
||||||
this.handleError("Error getting project for grant id: " + grantId + " and funder: " + funder, err);
|
this.handleError("Error getting project for grant id: " + grantId + " and funder: " + funder, err);
|
||||||
|
if(err.status == 404) {
|
||||||
|
this._router.navigate(['/error'], {queryParams: {"page": this._location.path(true), "page_type": "project"}});
|
||||||
|
}
|
||||||
this.seoService.createLinkForCanonicalURL(this.properties.baseLink + this.properties.searchLinkToProjects);
|
this.seoService.createLinkForCanonicalURL(this.properties.baseLink + this.properties.searchLinkToProjects);
|
||||||
this.errorMessage = 'No project found';
|
this.errorMessage = 'No project found';
|
||||||
this.showLoading = false;
|
this.showLoading = false;
|
||||||
|
|
|
@ -98,8 +98,8 @@ export class ProjectService {
|
||||||
|
|
||||||
parseProjectInfo (data: any, properties:EnvProperties):any {
|
parseProjectInfo (data: any, properties:EnvProperties):any {
|
||||||
this.projectInfo = new ProjectInfo();
|
this.projectInfo = new ProjectInfo();
|
||||||
this.projectInfo.funding = {funderName: "", funderShortName: "", code: "", fundingStream: "",
|
this.projectInfo.funding = {funderName: "", funderShortName: "", code: "", callIdentifier: "",
|
||||||
budget: "", contribution: "", currency: ""};
|
fundingStream: "", budget: "", contribution: "", currency: ""};
|
||||||
|
|
||||||
// ['result']['header']['dri:objIdentifier']
|
// ['result']['header']['dri:objIdentifier']
|
||||||
if(data[3] != null) {
|
if(data[3] != null) {
|
||||||
|
@ -157,6 +157,7 @@ export class ProjectService {
|
||||||
this.projectInfo.openAccessMandatePublications = data[0].oamandatepublications;
|
this.projectInfo.openAccessMandatePublications = data[0].oamandatepublications;
|
||||||
this.projectInfo.specialClause39 = data[0].ecsc39;
|
this.projectInfo.specialClause39 = data[0].ecsc39;
|
||||||
this.projectInfo.openAccessMandateDatasets = data[0].ecarticle29_3;
|
this.projectInfo.openAccessMandateDatasets = data[0].ecarticle29_3;
|
||||||
|
this.projectInfo.funding.callIdentifier = data[0].callidentifier;
|
||||||
}
|
}
|
||||||
this.projectInfo.funding.budget = data[0].totalcost;//"10000";
|
this.projectInfo.funding.budget = data[0].totalcost;//"10000";
|
||||||
this.projectInfo.funding.contribution = data[0].fundedamount;//"200100";
|
this.projectInfo.funding.contribution = data[0].fundedamount;//"200100";
|
||||||
|
|
|
@ -3,7 +3,8 @@ export class ProjectInfo {
|
||||||
acronym: string;
|
acronym: string;
|
||||||
title: string;
|
title: string;
|
||||||
|
|
||||||
funding: {funderName: string, funderShortName: string, code: string, fundingStream: string, budget: string, contribution: string, currency: string};
|
funding: {funderName: string, funderShortName: string, code: string, callIdentifier: string,
|
||||||
|
fundingStream: string, budget: string, contribution: string, currency: string};
|
||||||
startDate: number;
|
startDate: number;
|
||||||
endDate: number;
|
endDate: number;
|
||||||
currentDate: number;
|
currentDate: number;
|
||||||
|
|
|
@ -47,12 +47,12 @@
|
||||||
</button>
|
</button>
|
||||||
<button [class]="'uk-button uk-button-default uk-button-small uk-text-small'
|
<button [class]="'uk-button uk-button-default uk-button-small uk-text-small'
|
||||||
+ ((stringToNum(filter.selectedToValue) == currentYear && stringToNum(filter.selectedFromValue) == currentYear-5) ? ' uk-text-bold' : '')"
|
+ ((stringToNum(filter.selectedToValue) == currentYear && stringToNum(filter.selectedFromValue) == currentYear-5) ? ' uk-text-bold' : '')"
|
||||||
(click)="yearChanged(5)">Last 5 years
|
(click)="yearChanged(4)">Last 5 years
|
||||||
</button>
|
</button>
|
||||||
<button [class]="'uk-button uk-button-default uk-button-small uk-text-small'
|
<button [class]="'uk-button uk-button-default uk-button-small uk-text-small'
|
||||||
+ ((stringToNum(filter.selectedToValue) == currentYear && stringToNum(filter.selectedFromValue) == currentYear-10) ? ' uk-text-bold' : '')"
|
+ ((stringToNum(filter.selectedToValue) == currentYear && stringToNum(filter.selectedFromValue) == currentYear-10) ? ' uk-text-bold' : '')"
|
||||||
|
|
||||||
(click)="yearChanged(10)">Last 10 years
|
(click)="yearChanged(9)">Last 10 years
|
||||||
</button>
|
</button>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
Loading…
Reference in New Issue