2019-05-22 17:04:10 +02:00
|
|
|
import {Component, Input} from '@angular/core';
|
2019-05-29 15:56:09 +02:00
|
|
|
import {EnvProperties} from "../../utils/properties/env-properties";
|
2019-05-22 17:04:10 +02:00
|
|
|
|
|
|
|
@Component({
|
|
|
|
selector: 'showPublisher',
|
|
|
|
template: `
|
2019-06-06 12:02:37 +02:00
|
|
|
<li *ngIf="publisher"><span class="uk-text-bold">Publisher: </span> {{publisher}}</li>
|
2019-05-22 17:04:10 +02:00
|
|
|
<li *ngIf="journal &&
|
|
|
|
(journal['journal'] || journal['issn'] || journal['lissn']
|
|
|
|
|| journal['volume'] || journal['eissn'] || journal['issue'])">
|
2019-06-06 12:02:37 +02:00
|
|
|
<span class="uk-text-bold">Journal: </span>
|
2019-05-22 17:04:10 +02:00
|
|
|
<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
|
2019-05-27 12:36:09 +02:00
|
|
|
><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>
|
2019-06-06 12:02:37 +02:00
|
|
|
<span *ngIf=" journal['journal'] && (journal['issn'] || journal['eissn'] || journal['lissn'])"> (</span
|
2019-05-27 12:36:09 +02:00
|
|
|
><span *ngIf="journal['issn']">issn: {{journal['issn']}}<span
|
|
|
|
*ngIf="journal['eissn'] || journal['lissn']">, </span
|
2019-05-22 17:04:10 +02:00
|
|
|
></span
|
2019-05-27 12:36:09 +02:00
|
|
|
><span *ngIf="journal['eissn']">eissn: {{journal['eissn']}}<span *ngIf="journal['lissn']">, </span
|
|
|
|
></span
|
|
|
|
><span *ngIf="journal && journal['lissn']">lissn: {{journal['lissn']}}
|
|
|
|
></span
|
|
|
|
><span *ngIf=" journal['journal'] && (journal['issn'] || journal['eissn'] || journal['lissn'])">)</span>
|
2019-05-22 17:04:10 +02:00
|
|
|
</li>
|
2019-05-29 15:56:09 +02:00
|
|
|
<li *ngIf=" properties.environment != 'production' && journal && (journal['issn'] ||
|
2019-05-22 17:04:10 +02:00
|
|
|
journal['lissn'] || journal['eissn'] )">
|
2019-05-27 12:36:09 +02:00
|
|
|
<span class="custom-external custom-icon"
|
2019-07-03 11:37:48 +02:00
|
|
|
uk-tooltip="title: Visit Journal in Sherpa/RoMEO ">
|
2019-05-22 17:04:10 +02:00
|
|
|
<a target="_blank"
|
|
|
|
[href]="sherpaUrl+(journal['issn']?journal['issn']:(journal['eissn']?journal['eissn']:journal['lissn'] ))">
|
2019-07-03 11:37:48 +02:00
|
|
|
Publisher copyright policies & self-archiving <img src="assets/common-assets/common/SHERPA-RoMEO-short-logo.gif" width=16 height=16 alt=""></a></span>
|
2019-05-22 17:04:10 +02:00
|
|
|
</li>
|
|
|
|
|
2019-05-27 12:36:09 +02:00
|
|
|
`
|
2019-05-22 17:04:10 +02:00
|
|
|
})
|
|
|
|
|
|
|
|
export class ShowPublisherComponent {
|
|
|
|
@Input() publisher;
|
|
|
|
@Input() journal;
|
2019-05-27 12:36:09 +02:00
|
|
|
@Input() sherpaUrl = 'http://www.sherpa.ac.uk/romeo/search.php?issn=';
|
2019-05-29 15:56:09 +02:00
|
|
|
@Input() properties:EnvProperties;
|
2019-05-22 17:04:10 +02:00
|
|
|
|
|
|
|
|
|
|
|
constructor() {
|
|
|
|
|
|
|
|
}
|
|
|
|
|
2019-05-27 12:36:09 +02:00
|
|
|
ngOnInit() {
|
|
|
|
}
|
2019-05-22 17:04:10 +02:00
|
|
|
|
|
|
|
}
|