[Trunk|Library]
Landing Pages of results: add new component showPublisher that contains information for publisher & journal add showPublisher components in all results landing pages add sherpa/Romeo link parse journal information also from dataset, software, other results git-svn-id: https://svn.driver.research-infrastructures.eu/driver/dnet40/modules/uoa-services-library/trunk/ng-openaire-library/src/app@55673 d315682c-612b-4755-9ff5-7f18f6832af3
This commit is contained in:
parent
d7eca8aa77
commit
a6ade652e3
|
@ -41,9 +41,9 @@
|
|||
</div>
|
||||
|
||||
<ul class="uk-list">
|
||||
<li *ngIf="datasetInfo.publisher"><span class="uk-text-bold">Publisher:</span> {{datasetInfo.publisher}}</li>
|
||||
|
||||
<li *ngIf="datasetInfo.embargoEndDate"><span class="uk-text-bold">Embargo end date:</span> {{datasetInfo.embargoEndDate}}</li>
|
||||
<showPublisher [publisher]="datasetInfo.publisher"
|
||||
[journal]="datasetInfo.journal"></showPublisher>
|
||||
<li *ngIf="datasetInfo.embargoEndDate"><span class="uk-text-bold">Embargo end date:</span> {{datasetInfo.embargoEndDate}}</li>
|
||||
<li *ngIf="datasetInfo.identifiers && datasetInfo.identifiers.size > 0">
|
||||
<showIdentifiers [identifiers]="datasetInfo.identifiers"></showIdentifiers>
|
||||
</li>
|
||||
|
|
|
@ -43,7 +43,8 @@ export class DatasetService {
|
|||
res[1]['language'], //11
|
||||
res[1]['country'], //12
|
||||
res[2], //13
|
||||
(res[1]['extraInfo']!= undefined && res[1]['extraInfo']['citations']!= undefined)? res[1]['extraInfo']['citations']['citation']:null //14
|
||||
(res[1]['extraInfo']!= undefined && res[1]['extraInfo']['citations']!= undefined)? res[1]['extraInfo']['citations']['citation']:null, //14
|
||||
res[1]['journal'] //15
|
||||
]).map(res => this.parseDatasetInfo(res));
|
||||
}
|
||||
|
||||
|
@ -235,7 +236,18 @@ export class DatasetService {
|
|||
});
|
||||
}
|
||||
this.datasetInfo.similarResearchResults = this.parsingFunctions.sortByPercentage(this.datasetInfo.similarResearchResults);
|
||||
if(data[15] != null) {
|
||||
this.datasetInfo.journal = {"journal": "", "issn": "", "lissn": "", "eissn": "", "issue": "", "volume": "", "start_page": "", "end_page": ""}
|
||||
|
||||
this.datasetInfo.journal['journal'] = data[15].content;
|
||||
this.datasetInfo.journal['issn'] = data[15].issn;
|
||||
this.datasetInfo.journal['lissn'] = data[15].lissn;
|
||||
this.datasetInfo.journal['eissn'] = data[15].eissn;
|
||||
this.datasetInfo.journal['issue'] = data[15].iss;
|
||||
this.datasetInfo.journal['volume'] = data[15].vol;
|
||||
this.datasetInfo.journal['start_page'] = data[15].sp;
|
||||
this.datasetInfo.journal['end_page'] = data[15].ep;
|
||||
}
|
||||
|
||||
return this.datasetInfo;
|
||||
}
|
||||
|
|
|
@ -12,20 +12,22 @@ import {FundedByComponent} from './fundedBy.component';
|
|||
import {PublishedInComponent} from './publishedIn.component';
|
||||
import {AvailableOnComponent} from './availableOn.component';
|
||||
import {TabTableComponent} from './tabTable.component';
|
||||
import {ShowPublisherComponent} from "./showPublisher.component";
|
||||
|
||||
@NgModule({
|
||||
imports: [
|
||||
CommonModule, FormsModule, RouterModule, PagingModule
|
||||
],
|
||||
declarations: [
|
||||
ShowPublisherComponent,
|
||||
ShowAuthorsComponent,ShowIdentifiersComponent,ShowSubjectsComponent,
|
||||
FundedByComponent,PublishedInComponent,AvailableOnComponent,TabTableComponent
|
||||
],
|
||||
providers:[
|
||||
],
|
||||
exports: [
|
||||
ShowAuthorsComponent,ShowIdentifiersComponent,ShowSubjectsComponent,
|
||||
FundedByComponent,PublishedInComponent,AvailableOnComponent,TabTableComponent
|
||||
ShowAuthorsComponent, ShowIdentifiersComponent, ShowSubjectsComponent,
|
||||
FundedByComponent, PublishedInComponent, AvailableOnComponent, TabTableComponent, ShowPublisherComponent
|
||||
]
|
||||
})
|
||||
export class ResultLandingModule { }
|
||||
|
|
|
@ -0,0 +1,71 @@
|
|||
import {Component, Input} from '@angular/core';
|
||||
|
||||
@Component({
|
||||
selector: 'showPublisher',
|
||||
template: `
|
||||
<li *ngIf="publisher"><span class="uk-text-bold">Publisher:</span> {{publisher}}</li>
|
||||
<li *ngIf="journal &&
|
||||
(journal['journal'] || journal['issn'] || journal['lissn']
|
||||
|| journal['volume'] || journal['eissn'] || journal['issue'])">
|
||||
<span class="uk-text-bold">Journal:</span>
|
||||
<span *ngIf="journal['journal']">{{journal['journal']}}</span
|
||||
><span *ngIf="journal['journal'] && (journal['volume'] || journal['issue'])">,</span>
|
||||
<span *ngIf="journal['volume']"
|
||||
>volume
|
||||
<span *ngIf="journal['volume'] > 0">{{journal['volume'] | number}}</span
|
||||
><span *ngIf="!(journal['volume'] > 0)">{{journal['volume']}}</span
|
||||
><span *ngIf="journal['issue'] || journal['start_page'] || journal['end_page']">,</span>
|
||||
</span>
|
||||
<span *ngIf="journal['issue']"
|
||||
>issue
|
||||
<span *ngIf="journal['issue'] > 0">{{journal['issue'] | number}}</span
|
||||
><span *ngIf="!(journal['issue'] > 0)">{{journal['issue']}}</span
|
||||
><span *ngIf="journal['start_page'] || journal['end_page']">,</span>
|
||||
</span>
|
||||
<span *ngIf="(journal['volume'] || journal['issue']) &&
|
||||
(journal['start_page'] && journal['end_page'])">pages</span>
|
||||
<span *ngIf="(journal['volume'] || journal['issue']) &&
|
||||
((journal['start_page'] && !journal['end_page']) ||
|
||||
(!journal['start_page'] && journal['end_page']))">page</span>
|
||||
<span *ngIf="journal['start_page']"
|
||||
><span *ngIf="journal['start_page'] > 0">{{journal['start_page'] | number}}</span
|
||||
><span *ngIf="!(journal['start_page'] > 0)">{{journal['start_page']}}</span
|
||||
></span
|
||||
><span *ngIf="journal['start_page'] && journal['end_page']">-</span
|
||||
><span *ngIf="journal['end_page']"
|
||||
><span *ngIf="journal['end_page'] > 0">{{journal['end_page'] | number}}</span
|
||||
><span *ngIf="!(journal['end_page'] > 0)">{{journal['end_page']}}</span
|
||||
></span>
|
||||
<span *ngIf="journal['issn'] || journal['eissn'] || journal['lissn']">(</span
|
||||
><span *ngIf="journal['issn']">issn: {{journal['issn']}}<span *ngIf="journal['eissn'] || journal['lissn']">, </span
|
||||
></span
|
||||
><span *ngIf="journal['eissn']">eissn: {{journal['eissn']}}<span *ngIf="journal['lissn']">, </span
|
||||
></span
|
||||
><span *ngIf="journal['lissn']">lissn: {{journal['lissn']}}
|
||||
></span
|
||||
><span *ngIf="journal['issn'] || journal['eissn'] || journal['lissn']">)</span>
|
||||
</li>
|
||||
<li *ngIf="journal && (journal['issn'] ||
|
||||
journal['lissn'] || journal['eissn'] )">
|
||||
<span class="custom-external custom-icon" uk-tooltip="title: Publisher copyright policies & self-archiving">
|
||||
<a target="_blank"
|
||||
[href]="sherpaUrl+(journal['issn']?journal['issn']:(journal['eissn']?journal['eissn']:journal['lissn'] ))">
|
||||
Link to Sherpa/RoMEO</a></span>
|
||||
</li>
|
||||
|
||||
`
|
||||
})
|
||||
|
||||
export class ShowPublisherComponent {
|
||||
@Input() publisher;
|
||||
@Input() journal;
|
||||
@Input() sherpaUrl= 'http://www.sherpa.ac.uk/romeo/search.php?issn=';
|
||||
|
||||
|
||||
constructor() {
|
||||
|
||||
}
|
||||
|
||||
ngOnInit() {}
|
||||
|
||||
}
|
|
@ -28,7 +28,8 @@
|
|||
</div>
|
||||
|
||||
<ul class="uk-list">
|
||||
<li *ngIf="orpInfo.publisher"><span class="uk-text-bold">Publisher:</span> {{orpInfo.publisher}}</li>
|
||||
<showPublisher [publisher]="orpInfo.publisher"
|
||||
[journal]="orpInfo.journal"></showPublisher>
|
||||
<li *ngIf="orpInfo.embargoEndDate"><span class="uk-text-bold">Embargo end date:</span> {{orpInfo.embargoEndDate}}</li>
|
||||
<li *ngIf="orpInfo.identifiers && orpInfo.identifiers.size > 0">
|
||||
<showIdentifiers [identifiers]="orpInfo.identifiers"></showIdentifiers>
|
||||
|
|
|
@ -41,7 +41,8 @@ export class OrpService {
|
|||
res[1]['oaf:result']['language'], //11
|
||||
res[1]['oaf:result']['country'], //12
|
||||
res[2], //13
|
||||
(res[1]['extraInfo']!= undefined && res[1]['extraInfo']['citations']!= undefined)? res[1]['extraInfo']['citations']['citation']:null //14
|
||||
(res[1]['extraInfo']!= undefined && res[1]['extraInfo']['citations']!= undefined)? res[1]['extraInfo']['citations']['citation']:null, //14
|
||||
res[1]['oaf:result']['journal'] //15
|
||||
]).map(res => this.parseOrpInfo(res));
|
||||
}
|
||||
|
||||
|
@ -202,7 +203,18 @@ export class OrpService {
|
|||
});
|
||||
}
|
||||
this.orpInfo.similarResearchResults = this.parsingFunctions.sortByPercentage(this.orpInfo.similarResearchResults);
|
||||
if(data[15] != null) {
|
||||
this.orpInfo.journal = {"journal": "", "issn": "", "lissn": "", "eissn": "", "issue": "", "volume": "", "start_page": "", "end_page": ""}
|
||||
|
||||
this.orpInfo.journal['journal'] = data[15].content;
|
||||
this.orpInfo.journal['issn'] = data[15].issn;
|
||||
this.orpInfo.journal['lissn'] = data[15].lissn;
|
||||
this.orpInfo.journal['eissn'] = data[15].eissn;
|
||||
this.orpInfo.journal['issue'] = data[15].iss;
|
||||
this.orpInfo.journal['volume'] = data[15].vol;
|
||||
this.orpInfo.journal['start_page'] = data[15].sp;
|
||||
this.orpInfo.journal['end_page'] = data[15].ep;
|
||||
}
|
||||
|
||||
return this.orpInfo;
|
||||
}
|
||||
|
|
|
@ -32,49 +32,8 @@
|
|||
</div>
|
||||
|
||||
<ul class="uk-list">
|
||||
<li *ngIf="publicationInfo.publisher"><span class="uk-text-bold">Publisher:</span> {{publicationInfo.publisher}}</li>
|
||||
<li *ngIf="publicationInfo.journal &&
|
||||
(publicationInfo.journal['journal'] || publicationInfo.journal['issn'] || publicationInfo.journal['lissn']
|
||||
|| publicationInfo.journal['volume'] || publicationInfo.journal['eissn'] || publicationInfo.journal['issue'])">
|
||||
<span class="uk-text-bold">Journal:</span>
|
||||
<span *ngIf="publicationInfo.journal['journal']">{{publicationInfo.journal['journal']}}</span
|
||||
><span *ngIf="publicationInfo.journal['journal'] && (publicationInfo.journal['volume'] || publicationInfo.journal['issue'])">,</span>
|
||||
<span *ngIf="publicationInfo.journal['volume']"
|
||||
>volume
|
||||
<span *ngIf="publicationInfo.journal['volume'] > 0">{{publicationInfo.journal['volume'] | number}}</span
|
||||
><span *ngIf="!(publicationInfo.journal['volume'] > 0)">{{publicationInfo.journal['volume']}}</span
|
||||
><span *ngIf="publicationInfo.journal['issue'] || publicationInfo.journal['start_page'] || publicationInfo.journal['end_page']">,</span>
|
||||
</span>
|
||||
<span *ngIf="publicationInfo.journal['issue']"
|
||||
>issue
|
||||
<span *ngIf="publicationInfo.journal['issue'] > 0">{{publicationInfo.journal['issue'] | number}}</span
|
||||
><span *ngIf="!(publicationInfo.journal['issue'] > 0)">{{publicationInfo.journal['issue']}}</span
|
||||
><span *ngIf="publicationInfo.journal['start_page'] || publicationInfo.journal['end_page']">,</span>
|
||||
</span>
|
||||
<span *ngIf="(publicationInfo.journal['volume'] || publicationInfo.journal['issue']) &&
|
||||
(publicationInfo.journal['start_page'] && publicationInfo.journal['end_page'])">pages</span>
|
||||
<span *ngIf="(publicationInfo.journal['volume'] || publicationInfo.journal['issue']) &&
|
||||
((publicationInfo.journal['start_page'] && !publicationInfo.journal['end_page']) ||
|
||||
(!publicationInfo.journal['start_page'] && publicationInfo.journal['end_page']))">page</span>
|
||||
<span *ngIf="publicationInfo.journal['start_page']"
|
||||
><span *ngIf="publicationInfo.journal['start_page'] > 0">{{publicationInfo.journal['start_page'] | number}}</span
|
||||
><span *ngIf="!(publicationInfo.journal['start_page'] > 0)">{{publicationInfo.journal['start_page']}}</span
|
||||
></span
|
||||
><span *ngIf="publicationInfo.journal['start_page'] && publicationInfo.journal['end_page']">-</span
|
||||
><span *ngIf="publicationInfo.journal['end_page']"
|
||||
><span *ngIf="publicationInfo.journal['end_page'] > 0">{{publicationInfo.journal['end_page'] | number}}</span
|
||||
><span *ngIf="!(publicationInfo.journal['end_page'] > 0)">{{publicationInfo.journal['end_page']}}</span
|
||||
></span>
|
||||
<span *ngIf="publicationInfo.journal['issn'] || publicationInfo.journal['eissn'] || publicationInfo.journal['lissn']">(</span
|
||||
><span *ngIf="publicationInfo.journal['issn']">issn: {{publicationInfo.journal['issn']}}<span *ngIf="publicationInfo.journal['eissn'] || publicationInfo.journal['lissn']">, </span
|
||||
></span
|
||||
><span *ngIf="publicationInfo.journal['eissn']">eissn: {{publicationInfo.journal['eissn']}}<span *ngIf="publicationInfo.journal['lissn']">, </span
|
||||
></span
|
||||
><span *ngIf="publicationInfo.journal['lissn']">lissn: {{publicationInfo.journal['lissn']}}
|
||||
></span
|
||||
><span *ngIf="publicationInfo.journal['issn'] || publicationInfo.journal['eissn'] || publicationInfo.journal['lissn']">)</span>
|
||||
</li>
|
||||
|
||||
<showPublisher [publisher]="publicationInfo.publisher"
|
||||
[journal]="publicationInfo.journal"></showPublisher>
|
||||
<li *ngIf="publicationInfo.embargoEndDate"><span class="uk-text-bold">Embargo end date:</span> {{publicationInfo.embargoEndDate}}</li>
|
||||
<li *ngIf="publicationInfo.identifiers && publicationInfo.identifiers.size > 0">
|
||||
<showIdentifiers [identifiers]="publicationInfo.identifiers"></showIdentifiers>
|
||||
|
|
|
@ -38,7 +38,8 @@
|
|||
</div>
|
||||
|
||||
<ul class="uk-list">
|
||||
<li *ngIf="softwareInfo.publisher"><span class="uk-text-bold">Publisher:</span> {{softwareInfo.publisher}}</li>
|
||||
<showPublisher [publisher]="softwareInfo.publisher"
|
||||
[journal]="softwareInfo.journal"></showPublisher>
|
||||
|
||||
<li *ngIf="softwareInfo.embargoEndDate"><span class="uk-text-bold">Embargo end date:</span> {{softwareInfo.embargoEndDate}}</li>
|
||||
<li *ngIf="softwareInfo.identifiers && softwareInfo.identifiers.size > 0">
|
||||
|
|
|
@ -43,7 +43,8 @@ export class SoftwareService {
|
|||
res[1]['language'],
|
||||
res[1]['country'],
|
||||
res[1]['programmingLanguage'],
|
||||
res[2]
|
||||
res[2],
|
||||
res[1]['journal'] //15
|
||||
]).map(res => this.parseSoftwareInfo(res));
|
||||
}
|
||||
|
||||
|
@ -223,7 +224,18 @@ export class SoftwareService {
|
|||
});
|
||||
}
|
||||
this.softwareInfo.similarResearchResults = this.parsingFunctions.sortByPercentage(this.softwareInfo.similarResearchResults);
|
||||
if(data[15] != null) {
|
||||
this.softwareInfo.journal = {"journal": "", "issn": "", "lissn": "", "eissn": "", "issue": "", "volume": "", "start_page": "", "end_page": ""}
|
||||
|
||||
this.softwareInfo.journal['journal'] = data[15].content;
|
||||
this.softwareInfo.journal['issn'] = data[15].issn;
|
||||
this.softwareInfo.journal['lissn'] = data[15].lissn;
|
||||
this.softwareInfo.journal['eissn'] = data[15].eissn;
|
||||
this.softwareInfo.journal['issue'] = data[15].iss;
|
||||
this.softwareInfo.journal['volume'] = data[15].vol;
|
||||
this.softwareInfo.journal['start_page'] = data[15].sp;
|
||||
this.softwareInfo.journal['end_page'] = data[15].ep;
|
||||
}
|
||||
return this.softwareInfo;
|
||||
}
|
||||
}
|
||||
|
|
|
@ -210,16 +210,19 @@ export class COOKIE{
|
|||
this.setCookie(name, '', -1);
|
||||
}
|
||||
public static setCookie(name: string, value: string, expireDays: number, path: string = '/') {
|
||||
//TODO fix domain?
|
||||
let d:Date = new Date();
|
||||
d.setTime(d.getTime() + expireDays * 24 * 60 * 60 * 1000);
|
||||
let expires:string = `expires=${d.toUTCString()}`;
|
||||
// let cpath:string = path ? `; path=${path}` : '';
|
||||
let domain = "";
|
||||
if(document.domain.indexOf(".di.uoa.gr")!= -1){ // for development
|
||||
domain = ".di.uoa.gr";
|
||||
}else if(document.domain.indexOf(".openaire.eu") != -1){
|
||||
domain = ".openaire.eu";
|
||||
if(typeof document !== 'undefined'){
|
||||
if(document.domain.indexOf(".di.uoa.gr")!= -1){ // for development
|
||||
domain = ".di.uoa.gr";
|
||||
}else if(document.domain.indexOf(".openaire.eu") != -1){
|
||||
domain = ".openaire.eu";
|
||||
}
|
||||
document.cookie = name+'='+value+'; path='+path+'; domain='+domain+';';
|
||||
}
|
||||
document.cookie = name+'='+value+'; path='+path+'; domain='+domain+';';
|
||||
}
|
||||
}
|
||||
|
|
|
@ -15,6 +15,7 @@ export class DatasetInfo {
|
|||
"type": string, "year":string}[];
|
||||
identifiers: Map<string, string[]>;
|
||||
publisher: string;
|
||||
journal: {"journal": string, "issn": string, "lissn": string, "eissn": string, "issue": string, "volume": string, "start_page": string, "end_page": string};
|
||||
languages: string[];
|
||||
countries: string[];
|
||||
subjects: string[];
|
||||
|
|
|
@ -13,6 +13,7 @@ export class OrpInfo {
|
|||
"type": string, "year":string}[];
|
||||
identifiers: Map<string, string[]>;
|
||||
publisher: string;
|
||||
journal: {"journal": string, "issn": string, "lissn": string, "eissn": string, "issue": string, "volume": string, "start_page": string, "end_page": string};
|
||||
languages: string[];
|
||||
countries: string[];
|
||||
subjects: string[];
|
||||
|
|
|
@ -14,6 +14,7 @@ export class SoftwareInfo {
|
|||
"type": string, "year":string}[];
|
||||
identifiers: Map<string, string[]>;
|
||||
publisher: string;
|
||||
journal: {"journal": string, "issn": string, "lissn": string, "eissn": string, "issue": string, "volume": string, "start_page": string, "end_page": string};
|
||||
languages: string[];
|
||||
countries: string[];
|
||||
subjects: string[];
|
||||
|
|
Loading…
Reference in New Issue