openaire-library/landingPages/landing-utils/showPublisher.component.ts

77 lines
3.6 KiB
TypeScript

import {Component, Input} from '@angular/core';
import {EnvProperties} from "../../utils/properties/env-properties";
@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['journal'] && (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 && journal['lissn']">lissn: {{journal['lissn']}}
></span
><span *ngIf=" journal['journal'] && (journal['issn'] || journal['eissn'] || journal['lissn'])">)</span>
</li>
<li *ngIf=" properties.environment != 'production' && 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=';
@Input() properties:EnvProperties;
constructor() {
}
ngOnInit() {
}
}