forked from hazza/dspace-angular
[TLC-249] Improve model of identifier data in workspace section
This commit is contained in:
@@ -1,9 +1,9 @@
|
||||
/*
|
||||
* Object model for the data returned by the REST API to present minted identifiers in a submission section
|
||||
*/
|
||||
import { Identifier } from '../../../shared/object-list/identifier-data/identifier.model';
|
||||
|
||||
export interface WorkspaceitemSectionIdentifiersObject {
|
||||
doi?: string
|
||||
handle?: string
|
||||
otherIdentifiers?: string[]
|
||||
identifiers?: Identifier[]
|
||||
displayTypes?: string[]
|
||||
}
|
||||
|
@@ -3,41 +3,18 @@ Template for the identifiers submission section component
|
||||
@author Kim Shepherd
|
||||
-->
|
||||
<!-- Main identifier data -->
|
||||
<!--<ng-container *ngVar="(getIdentifierData() | async) as identifierData">-->
|
||||
<ng-container *ngVar="(getIdentifierData() | async) as identifierData">
|
||||
<div>
|
||||
<ng-container *ngIf="identifierData && identifierData.identifiers">
|
||||
<div>
|
||||
<span>{{'submission.sections.identifiers.info' | translate}}</span>
|
||||
<ul>
|
||||
<!-- Handles -->
|
||||
<ng-container *ngIf="(!identifierData || identifierData.displayTypes.includes('handle'))">
|
||||
<ng-container *ngIf="!(identifierData && identifierData.handle)">
|
||||
<li>{{'submission.sections.identifiers.no_handle' | translate}}</li>
|
||||
</ng-container>
|
||||
<ng-container *ngIf="(identifierData && identifierData.handle)">
|
||||
<li>{{'submission.sections.identifiers.handle_label' | translate}}{{identifierData.handle}}</li>
|
||||
</ng-container>
|
||||
</ng-container>
|
||||
|
||||
<!-- DOIs -->
|
||||
<ng-container *ngIf="(!identifierData || identifierData.displayTypes.includes('doi'))">
|
||||
<ng-container *ngIf="!(identifierData && identifierData.doi)">
|
||||
<li>{{'submission.sections.identifiers.no_doi' | translate}}</li>
|
||||
</ng-container>
|
||||
<ng-container *ngIf="(identifierData && identifierData.doi)">
|
||||
<li>{{'submission.sections.identifiers.doi_label' | translate}}
|
||||
{{identifierData.doi}}
|
||||
</li>
|
||||
</ng-container>
|
||||
</ng-container>
|
||||
|
||||
<!-- Other identifiers -->
|
||||
<ng-container *ngIf="(!identifierData || identifierData.displayTypes.includes('other'))">
|
||||
<ng-container *ngIf="(identifierData && identifierData.otherIdentifiers && identifierData.otherIdentifiers.length > 0)">
|
||||
<li>{{'submission.sections.identifiers.otherIdentifiers_label' | translate}}
|
||||
{{identifierData.otherIdentifiers.join(',')}}
|
||||
</li>
|
||||
<ng-container *ngFor="let identifier of identifierData.identifiers">
|
||||
<ng-container *ngIf="identifierData.displayTypes.includes(identifier.identifierType) && identifier.value">
|
||||
<li>{{'submission.sections.identifiers.' + identifier.identifierType + '_label' | translate}}
|
||||
{{identifier.value}}</li>
|
||||
</ng-container>
|
||||
</ng-container>
|
||||
</ul>
|
||||
</div>
|
||||
</ng-container>
|
||||
</ng-container>
|
||||
|
Reference in New Issue
Block a user