93 lines
4.4 KiB
TypeScript
93 lines
4.4 KiB
TypeScript
import {Component, Input} from '@angular/core';
|
|
import {EnvProperties} from "../../utils/properties/env-properties";
|
|
|
|
@Component({
|
|
selector: 'showPublisher, [showPublisher]',
|
|
template: `
|
|
<div *ngIf="publishDate || journal && (journal['journal'] || journal['issn'] || journal['lissn']
|
|
|| journal['volume'] || journal['eissn'] || journal['issue'])" class="uk-text-small">
|
|
<span *ngIf="publishDate" class="uk-margin-right">
|
|
<span class="uk-text-meta">Published: </span>
|
|
{{publishDate | date: 'dd MMM yyyy' : 'UTC'}}
|
|
</span>
|
|
<span *ngIf="journal && (journal['journal'] || journal['issn'] || journal['lissn']
|
|
|| journal['volume'] || journal['eissn'] || journal['issue'])">
|
|
<span class="uk-text-meta">Journal: </span>
|
|
<span *ngIf="journal['journal']">{{journal['journal']}}</span>
|
|
<span *ngIf="journal['journal'] && (journal['volume'] || journal['issue'])">, </span>
|
|
<ng-container *ngIf="journal['volume']">
|
|
<span class="uk-display-inline-block">
|
|
volume
|
|
<span *ngIf="journal['volume'] > 0">{{journal['volume'] | number}}</span>
|
|
<span *ngIf="!(journal['volume'] > 0)">{{journal['volume']}}</span>
|
|
</span>
|
|
<span *ngIf="journal['issue'] || journal['start_page'] || journal['end_page']">, </span>
|
|
</ng-container>
|
|
<ng-container *ngIf="journal['issue']">
|
|
<span class="uk-display-inline-block">
|
|
issue
|
|
<span *ngIf="journal['issue'] > 0">{{journal['issue'] | number}}</span>
|
|
<span *ngIf="!(journal['issue'] > 0)">{{journal['issue']}}</span>
|
|
</span>
|
|
<span *ngIf="journal['start_page'] || journal['end_page']">, </span>
|
|
</ng-container>
|
|
<span *ngIf="(journal['volume'] || journal['issue']) && (journal['start_page'] || journal['end_page'])"
|
|
class="uk-display-inline-block">
|
|
{{(journal['start_page'] && journal['end_page']) ? 'pages' : 'page'}}
|
|
<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>
|
|
<span *ngIf=" journal['journal'] && (journal['issn'] || journal['eissn'] || journal['lissn'])"> (</span>
|
|
<ng-container *ngIf="journal['issn']">
|
|
<span class="uk-display-inline-block">issn: {{journal['issn']}}</span>
|
|
<span>, </span>
|
|
</ng-container>
|
|
<ng-container *ngIf="journal['eissn']">
|
|
<span class="uk-display-inline-block">eissn: {{journal['eissn']}}</span>
|
|
<span>, </span>
|
|
</ng-container>
|
|
<span *ngIf="journal['lissn']" class="uk-display-inline-block">
|
|
<span class="uk-display-inline-block">lissn: {{journal['lissn']}}</span>
|
|
<span>, </span>
|
|
</span>
|
|
<span *ngIf="journal && (journal['issn'] ||journal['lissn'] || journal['eissn'] )">
|
|
<a target="_blank" class="uk-display-inline-block"
|
|
[href]="properties.sherpaURL+(journal['issn']?journal['issn']:(journal['eissn']?journal['eissn']:journal['lissn'] ))+properties.sherpaURLSuffix"
|
|
uk-tooltip="title: View information on Sherpa/RoMEO ">
|
|
<img src="assets/common-assets/common/SHERPA-RoMEO-short-logo.gif" width=16 height=16 alt="" loading="lazy">
|
|
Copyright policy<span class="custom-external custom-icon space"></span>
|
|
</a>
|
|
</span>
|
|
<span *ngIf=" journal['journal'] && (journal['issn'] || journal['eissn'] || journal['lissn'])">)</span>
|
|
</span>
|
|
</div>
|
|
<div *ngIf="publisher" class="uk-text-small uk-margin-small-top">
|
|
<span class="uk-text-meta">Publisher: </span> {{publisher}}
|
|
</div>
|
|
`
|
|
})
|
|
export class ShowPublisherComponent {
|
|
@Input() publishDate: Date;
|
|
@Input() publisher;
|
|
@Input() journal;
|
|
//@Input() sherpaUrl = 'http://www.sherpa.ac.uk/romeo/search.php?issn=';
|
|
//http://sherpa.ac.uk/romeo/issn/2304-6775
|
|
@Input() properties: EnvProperties;
|
|
|
|
|
|
constructor() {
|
|
|
|
}
|
|
|
|
ngOnInit() {
|
|
}
|
|
|
|
}
|