Fix tabs in publication landing page (bug caused from merge) | special clause 39 icon added in project landing and search results | acronym and project code added in search results
git-svn-id: https://svn.driver.research-infrastructures.eu/driver/dnet40/modules/uoa-services-portal/trunk@46142 d315682c-612b-4755-9ff5-7f18f6832af3
This commit is contained in:
parent
613f602e98
commit
94857a762a
|
@ -6,7 +6,10 @@
|
||||||
<div class="uk-width-7-10">
|
<div class="uk-width-7-10">
|
||||||
<!--h3 *ngIf="projectInfo.acronym != undefined && projectInfo.acronym != ''">{{projectInfo.acronym}}</h3>
|
<!--h3 *ngIf="projectInfo.acronym != undefined && projectInfo.acronym != ''">{{projectInfo.acronym}}</h3>
|
||||||
<h3 *ngIf="projectInfo.acronym == undefined || projectInfo.acronym == ''">{{projectInfo.title}}</h3-->
|
<h3 *ngIf="projectInfo.acronym == undefined || projectInfo.acronym == ''">{{projectInfo.title}}</h3-->
|
||||||
<h2>{{projectName}}</h2>
|
<div class="projectIcon">
|
||||||
|
<h2 *ngIf="projectInfo.specialClause39==true" class="sc39">{{projectName}}</h2>
|
||||||
|
<h2 *ngIf="projectInfo.specialClause39!=true">{{projectName}}</h2>
|
||||||
|
</div>
|
||||||
|
|
||||||
<dl class="uk-description-list-horizontal custom-description-list-horizontal">
|
<dl class="uk-description-list-horizontal custom-description-list-horizontal">
|
||||||
<dt *ngIf="projectInfo.title != undefined && projectInfo.title != ''">Title: </dt>
|
<dt *ngIf="projectInfo.title != undefined && projectInfo.title != ''">Title: </dt>
|
||||||
|
@ -163,7 +166,7 @@
|
||||||
<li>
|
<li>
|
||||||
Share - Bookmark
|
Share - Bookmark
|
||||||
</li>
|
</li>
|
||||||
<li>
|
<li *ngIf="fetchPublications.searchUtils.totalResults > 10">
|
||||||
<a href="{{linkToSearchPublications}}">
|
<a href="{{linkToSearchPublications}}">
|
||||||
View all Project Publications
|
View all Project Publications
|
||||||
</a>
|
</a>
|
||||||
|
|
|
@ -3,7 +3,6 @@ import { NgModule} from '@angular/core';
|
||||||
import { CommonModule } from '@angular/common';
|
import { CommonModule } from '@angular/common';
|
||||||
import { FormsModule } from '@angular/forms';
|
import { FormsModule } from '@angular/forms';
|
||||||
import { RouterModule } from '@angular/router';
|
import { RouterModule } from '@angular/router';
|
||||||
import { RouterModule } from '@angular/router';
|
|
||||||
|
|
||||||
import { ProjectServiceModule} from './projectService.module';
|
import { ProjectServiceModule} from './projectService.module';
|
||||||
// import {HtmlProgressReportService} from './htmlProgressReport.service';
|
// import {HtmlProgressReportService} from './htmlProgressReport.service';
|
||||||
|
|
|
@ -103,7 +103,11 @@ export class ProjectService {
|
||||||
|
|
||||||
if(data[0] != null) {
|
if(data[0] != null) {
|
||||||
this.projectInfo.acronym = data[0].acronym;
|
this.projectInfo.acronym = data[0].acronym;
|
||||||
this.projectInfo.title = data[0].title;
|
if(Array.isArray(data[0]['title'])) {
|
||||||
|
this.projectInfo.title = data[0].title[0];
|
||||||
|
} else {
|
||||||
|
this.projectInfo.title = data[0].title;
|
||||||
|
}
|
||||||
this.projectInfo.callIdentifier = data[0].callidentifier;
|
this.projectInfo.callIdentifier = data[0].callidentifier;
|
||||||
this.projectInfo.contractNum = data[0].code;
|
this.projectInfo.contractNum = data[0].code;
|
||||||
this.projectInfo.startDate = data[0].startdate;
|
this.projectInfo.startDate = data[0].startdate;
|
||||||
|
|
|
@ -103,7 +103,7 @@
|
||||||
</li>
|
</li>
|
||||||
</ul>
|
</ul>
|
||||||
|
|
||||||
<ul id="{{'tab-content'+articleId}}" class="uk-switcher uk-margin">
|
<ul id="tab-content" class="uk-switcher uk-margin">
|
||||||
<li id="citationsTab-content">
|
<li id="citationsTab-content">
|
||||||
|
|
||||||
<div *ngIf="publicationInfo.references == undefined" class = "uk-alert" >
|
<div *ngIf="publicationInfo.references == undefined" class = "uk-alert" >
|
||||||
|
|
|
@ -13,7 +13,7 @@ import {RouterHelper} from '../../utils/routerHelper.class';
|
||||||
<div *ngIf="status == errorCodes.NOT_AVAILABLE" class="uk-alert uk-alert-danger uk-animation-fade" role="alert">Service not available</div>
|
<div *ngIf="status == errorCodes.NOT_AVAILABLE" class="uk-alert uk-alert-danger uk-animation-fade" role="alert">Service not available</div>
|
||||||
|
|
||||||
<li *ngFor="let result of results" class="uk-animation-fade">
|
<li *ngFor="let result of results" class="uk-animation-fade">
|
||||||
<h4 [class] = result.title.accessMode [title] = result.title.accessMode >
|
<h4 class = "{{result.title.accessMode}} {{result.title.sc39}}" [title] = result.title.accessMode >
|
||||||
<!--a href="{{result['title'].url}}"-->
|
<!--a href="{{result['title'].url}}"-->
|
||||||
<!--a [queryParams]="{articleId: 'od_______908::3a5b2885656a91307156325644e73b92'}" routerLinkActive="router-link-active" routerLink="search/publication"-->
|
<!--a [queryParams]="{articleId: 'od_______908::3a5b2885656a91307156325644e73b92'}" routerLinkActive="router-link-active" routerLink="search/publication"-->
|
||||||
<a [queryParams]="routerHelper.createQueryParam(urlParam,result.id)" routerLinkActive="router-link-active" routerLink="/search/{{type}}">
|
<a [queryParams]="routerHelper.createQueryParam(urlParam,result.id)" routerLinkActive="router-link-active" routerLink="/search/{{type}}">
|
||||||
|
@ -85,7 +85,7 @@ import {RouterHelper} from '../../utils/routerHelper.class';
|
||||||
<div *ngIf="result['organizations'] != undefined && result['organizations'].length > 0">
|
<div *ngIf="result['organizations'] != undefined && result['organizations'].length > 0">
|
||||||
<span> Organizations: </span>
|
<span> Organizations: </span>
|
||||||
<span *ngFor="let organization of result['organizations'] let i=index">
|
<span *ngFor="let organization of result['organizations'] let i=index">
|
||||||
<!--a *ngIf="organization.url != undefined" href="{{organization.url}}"-->
|
<!--a *ngIf="organization.url != undefined" href="{{organization.url}}"-->
|
||||||
<a *ngIf="organization.id != undefined" [queryParams]="{organizationId: organization.id}" routerLinkActive="router-link-active" routerLink="/search/organization">
|
<a *ngIf="organization.id != undefined" [queryParams]="{organizationId: organization.id}" routerLinkActive="router-link-active" routerLink="/search/organization">
|
||||||
{{organization.name}}
|
{{organization.name}}
|
||||||
</a>
|
</a>
|
||||||
|
|
|
@ -242,7 +242,7 @@ private _getResults(parameters:string,refine:boolean, page: number, size: number
|
||||||
}
|
}
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
/*
|
||||||
public getAggregatorResults(id:string, page: number, size: number){
|
public getAggregatorResults(id:string, page: number, size: number){
|
||||||
this.subResults = this._searchPublicationsService.searchAggregators('&fq=collectedfromdatasourceid exact "'+id+'"',"&refine=true&fields=resulthostingdatasource" , page, size).subscribe(
|
this.subResults = this._searchPublicationsService.searchAggregators('&fq=collectedfromdatasourceid exact "'+id+'"',"&refine=true&fields=resulthostingdatasource" , page, size).subscribe(
|
||||||
data => {
|
data => {
|
||||||
|
@ -264,7 +264,7 @@ public getAggregatorResults(id:string, page: number, size: number){
|
||||||
this.searchUtils.status = errorCodes.ERROR;
|
this.searchUtils.status = errorCodes.ERROR;
|
||||||
}
|
}
|
||||||
);
|
);
|
||||||
}
|
}*/
|
||||||
|
|
||||||
public queryChanged($event) {
|
public queryChanged($event) {
|
||||||
var parameters = $event.value;
|
var parameters = $event.value;
|
||||||
|
|
|
@ -247,7 +247,7 @@ export class SearchDataprovidersService {
|
||||||
|
|
||||||
var result: SearchResult = new SearchResult();
|
var result: SearchResult = new SearchResult();
|
||||||
|
|
||||||
result['title'] = {"name": '', "accessMode": ''};
|
result['title'] = {"name": '', "accessMode": '', "sc39": ''};
|
||||||
|
|
||||||
result['title'].name = resData.officialname;
|
result['title'].name = resData.officialname;
|
||||||
|
|
||||||
|
|
|
@ -146,7 +146,7 @@ export class SearchDatasetsService {
|
||||||
|
|
||||||
var result: SearchResult = new SearchResult();
|
var result: SearchResult = new SearchResult();
|
||||||
|
|
||||||
result['title'] = {"name": '', "accessMode": ''};
|
result['title'] = {"name": '', "accessMode": '', "sc39": ''};
|
||||||
|
|
||||||
if(Array.isArray(resData['title'])) {
|
if(Array.isArray(resData['title'])) {
|
||||||
result['title'].name = resData['title'][0].content;
|
result['title'].name = resData['title'][0].content;
|
||||||
|
|
|
@ -97,7 +97,7 @@ export class SearchOrganizationsService {
|
||||||
|
|
||||||
var result: SearchResult = new SearchResult();
|
var result: SearchResult = new SearchResult();
|
||||||
|
|
||||||
result['title'] = {"name": '', "accessMode": ''};
|
result['title'] = {"name": '', "accessMode": '', "sc39": ''};
|
||||||
|
|
||||||
result['title'].name = resData.legalshortname;
|
result['title'].name = resData.legalshortname;
|
||||||
if(result['title'].name == '') {
|
if(result['title'].name == '') {
|
||||||
|
|
|
@ -75,7 +75,7 @@ export class SearchPeopleService {
|
||||||
|
|
||||||
var result: SearchResult = new SearchResult();
|
var result: SearchResult = new SearchResult();
|
||||||
|
|
||||||
result['title'] = {"name": '', "accessMode": ''};
|
result['title'] = {"name": '', "accessMode": '', "sc39": ''};
|
||||||
|
|
||||||
result['title'].name = resData.fullname;
|
result['title'].name = resData.fullname;
|
||||||
|
|
||||||
|
|
|
@ -128,17 +128,30 @@ export class SearchProjectsService {
|
||||||
|
|
||||||
var result: SearchResult = new SearchResult();
|
var result: SearchResult = new SearchResult();
|
||||||
|
|
||||||
result['title'] = {"name": '', "accessMode": ''};
|
result['title'] = {"name": '', "accessMode": '', "sc39": ''};
|
||||||
|
if(resData['acronym'] != undefined && resData['acronym'] != "") {
|
||||||
|
result['title'].name = resData['acronym'] + " - ";
|
||||||
|
}
|
||||||
if(Array.isArray(resData['title'])) {
|
if(Array.isArray(resData['title'])) {
|
||||||
// resData['title'][0].hasOwnProperty("content") {
|
// resData['title'][0].hasOwnProperty("content") {
|
||||||
result['title'].name = resData['title'][0];
|
result['title'].name += resData['title'][0];
|
||||||
// }
|
// }
|
||||||
} else {
|
} else {
|
||||||
// resData['title'].hasOwnProperty("content") {
|
// resData['title'].hasOwnProperty("content") {
|
||||||
result['title'].name = resData['title'];
|
result['title'].name += resData['title'];
|
||||||
// }
|
// }
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if(result['title'].name != '') {
|
||||||
|
result['title'].name += " ("+resData['code']+")"
|
||||||
|
}
|
||||||
|
|
||||||
|
if(resData['ecsc39'] == true) {
|
||||||
|
result['title'].sc39 = "sc39";
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
// if(resData['title'].hasOwnProperty("content")) {
|
// if(resData['title'].hasOwnProperty("content")) {
|
||||||
// result['title'].name = resData['title'].content;
|
// result['title'].name = resData['title'].content;
|
||||||
// }
|
// }
|
||||||
|
|
|
@ -57,7 +57,7 @@ export class SearchPublicationsService {
|
||||||
.map(res => this.parseResults(res));
|
.map(res => this.parseResults(res));
|
||||||
}
|
}
|
||||||
|
|
||||||
searchAggregators (params: string, refineParams:string, page: number, size: number ):any {
|
searchAggregators (id: string, params: string, refineParams:string, page: number, size: number ):any {
|
||||||
|
|
||||||
let link = OpenaireProperties.getSearchAPIURLLast()+"publications";
|
let link = OpenaireProperties.getSearchAPIURLLast()+"publications";
|
||||||
|
|
||||||
|
@ -72,7 +72,7 @@ export class SearchPublicationsService {
|
||||||
|
|
||||||
let key = url;
|
let key = url;
|
||||||
if (this._cache.has(key)) {
|
if (this._cache.has(key)) {
|
||||||
return Observable.of(this._cache.get(key)).map(res => this.parseRefineResults(res['refineResults']));
|
return Observable.of(this._cache.get(key)).map(res => this.parseRefineResults(id, res['refineResults']));
|
||||||
}
|
}
|
||||||
|
|
||||||
return this.http.get(url)
|
return this.http.get(url)
|
||||||
|
@ -80,7 +80,7 @@ export class SearchPublicationsService {
|
||||||
.do(res => {
|
.do(res => {
|
||||||
this._cache.set(key, res);
|
this._cache.set(key, res);
|
||||||
})
|
})
|
||||||
.map(res => this.parseRefineResults(res['refineResults']));
|
.map(res => this.parseRefineResults(id, res['refineResults']));
|
||||||
}
|
}
|
||||||
|
|
||||||
searchPublicationsByDois (DOIs: string[], refineParams:string, page: number, size: number, refineFields:string[] ):any {
|
searchPublicationsByDois (DOIs: string[], refineParams:string, page: number, size: number, refineFields:string[] ):any {
|
||||||
|
@ -209,7 +209,7 @@ export class SearchPublicationsService {
|
||||||
|
|
||||||
var result: SearchResult = new SearchResult();
|
var result: SearchResult = new SearchResult();
|
||||||
|
|
||||||
result['title'] = {"name": '', "accessMode": ''};
|
result['title'] = {"name": '', "accessMode": '', "sc39": ''};
|
||||||
|
|
||||||
if(Array.isArray(resData['title'])) {
|
if(Array.isArray(resData['title'])) {
|
||||||
// resData['title'][0].hasOwnProperty("content") {
|
// resData['title'][0].hasOwnProperty("content") {
|
||||||
|
@ -392,7 +392,7 @@ export class SearchPublicationsService {
|
||||||
return results;
|
return results;
|
||||||
}
|
}
|
||||||
|
|
||||||
parseRefineResults(data: any): any {
|
parseRefineResults(id: string, data: any): any {
|
||||||
var results:any = [];
|
var results:any = [];
|
||||||
if(data.hasOwnProperty("resulthostingdatasource")) {
|
if(data.hasOwnProperty("resulthostingdatasource")) {
|
||||||
let length = Array.isArray(data['resulthostingdatasource']) ? data['resulthostingdatasource'].length : 1;
|
let length = Array.isArray(data['resulthostingdatasource']) ? data['resulthostingdatasource'].length : 1;
|
||||||
|
@ -406,7 +406,9 @@ export class SearchPublicationsService {
|
||||||
//result['url'] = OpenaireProperties.getsearchLinkToDataProvider()+result['id'];
|
//result['url'] = OpenaireProperties.getsearchLinkToDataProvider()+result['id'];
|
||||||
result['count'] = datasource.count;
|
result['count'] = datasource.count;
|
||||||
|
|
||||||
results.push(result);
|
if(result['id'] != id && result['name'] != "Unknown Repository") {
|
||||||
|
results.push(result);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
return results;
|
return results;
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
export class SearchResult {
|
export class SearchResult {
|
||||||
title: { "name": string, "accessMode": string};
|
title: { "name": string, "accessMode": string, "sc39": string};
|
||||||
id:string;
|
id:string;
|
||||||
DOI:string;
|
DOI:string;
|
||||||
//publications & datasets & organizations:
|
//publications & datasets & organizations:
|
||||||
|
@ -26,5 +26,5 @@ export class SearchResult {
|
||||||
compatibility: string;
|
compatibility: string;
|
||||||
countries: string[];
|
countries: string[];
|
||||||
constructor(){}
|
constructor(){}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
|
@ -180,7 +180,7 @@ public getResultsForDataproviders(id:string, resultsFrom:string, page: number, s
|
||||||
}
|
}
|
||||||
|
|
||||||
public getAggregatorResults(id:string, page: number, size: number){
|
public getAggregatorResults(id:string, page: number, size: number){
|
||||||
this.subResults = this._searchPublicationsService.searchAggregators('&fq=collectedfromdatasourceid exact "'+id+'"',"&refine=true&fields=resulthostingdatasource" , page, size).subscribe(
|
this.subResults = this._searchPublicationsService.searchAggregators(id, '&fq=collectedfromdatasourceid exact "'+id+'"',"&refine=true&fields=resulthostingdatasource" , page, size).subscribe(
|
||||||
data => {
|
data => {
|
||||||
this.results = data;
|
this.results = data;
|
||||||
|
|
||||||
|
|
|
@ -118,6 +118,15 @@
|
||||||
padding-right: 18px;
|
padding-right: 18px;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
.sc39 {
|
||||||
|
background: rgba(0, 0, 0, 0) url("/assets/sc39.png") no-repeat scroll right center;
|
||||||
|
padding-right: 24px;
|
||||||
|
}
|
||||||
|
|
||||||
|
.projectIcon {
|
||||||
|
display: inline-table;
|
||||||
|
}
|
||||||
|
|
||||||
</style>
|
</style>
|
||||||
|
|
||||||
</head>
|
</head>
|
||||||
|
|
Loading…
Reference in New Issue