mirror of
https://github.com/DSpace/dspace-angular.git
synced 2025-10-07 01:54:15 +00:00
[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
|
* 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 {
|
export interface WorkspaceitemSectionIdentifiersObject {
|
||||||
doi?: string
|
identifiers?: Identifier[]
|
||||||
handle?: string
|
|
||||||
otherIdentifiers?: string[]
|
|
||||||
displayTypes?: string[]
|
displayTypes?: string[]
|
||||||
}
|
}
|
||||||
|
@@ -3,41 +3,18 @@ Template for the identifiers submission section component
|
|||||||
@author Kim Shepherd
|
@author Kim Shepherd
|
||||||
-->
|
-->
|
||||||
<!-- Main identifier data -->
|
<!-- Main identifier data -->
|
||||||
<!--<ng-container *ngVar="(getIdentifierData() | async) as identifierData">-->
|
|
||||||
<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>
|
<span>{{'submission.sections.identifiers.info' | translate}}</span>
|
||||||
<ul>
|
<ul>
|
||||||
<!-- Handles -->
|
<ng-container *ngFor="let identifier of identifierData.identifiers">
|
||||||
<ng-container *ngIf="(!identifierData || identifierData.displayTypes.includes('handle'))">
|
<ng-container *ngIf="identifierData.displayTypes.includes(identifier.identifierType) && identifier.value">
|
||||||
<ng-container *ngIf="!(identifierData && identifierData.handle)">
|
<li>{{'submission.sections.identifiers.' + identifier.identifierType + '_label' | translate}}
|
||||||
<li>{{'submission.sections.identifiers.no_handle' | translate}}</li>
|
{{identifier.value}}</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>
|
</ng-container>
|
||||||
</ng-container>
|
</ng-container>
|
||||||
</ul>
|
</ul>
|
||||||
</div>
|
</div>
|
||||||
</ng-container>
|
</ng-container>
|
||||||
|
</ng-container>
|
||||||
|
Reference in New Issue
Block a user