mirror of
https://github.com/DSpace/dspace-angular.git
synced 2025-10-12 12:33:07 +00:00
[TLC-249] Addressing review feedback #2
Update WorkspaceitemSectionIdentifiersObject model to include a display types string array, so identifier types can be included or excluded from the step as needed. Update section template to work with the above new data As per todonohue's feedback on 2022-01-18
This commit is contained in:
@@ -5,4 +5,5 @@ export interface WorkspaceitemSectionIdentifiersObject {
|
|||||||
doi?: string
|
doi?: string
|
||||||
handle?: string
|
handle?: string
|
||||||
otherIdentifiers?: string[]
|
otherIdentifiers?: string[]
|
||||||
|
displayTypes?: string[]
|
||||||
}
|
}
|
||||||
|
@@ -3,8 +3,8 @@ import { map } from 'rxjs/operators';
|
|||||||
import { Observable } from 'rxjs';
|
import { Observable } from 'rxjs';
|
||||||
import { hasValue } from '../../empty.util';
|
import { hasValue } from '../../empty.util';
|
||||||
import { Item } from 'src/app/core/shared/item.model';
|
import { Item } from 'src/app/core/shared/item.model';
|
||||||
import {IdentifierData} from './identifier-data.model';
|
import { IdentifierData } from './identifier-data.model';
|
||||||
import {IdentifierDataService} from '../../../core/data/identifier-data.service';
|
import { IdentifierDataService } from '../../../core/data/identifier-data.service';
|
||||||
|
|
||||||
@Component({
|
@Component({
|
||||||
selector: 'ds-identifier-data',
|
selector: 'ds-identifier-data',
|
||||||
|
@@ -9,13 +9,17 @@ Template for the identifiers submission section component
|
|||||||
<span>{{'submission.sections.identifiers.info' | translate}}</span>
|
<span>{{'submission.sections.identifiers.info' | translate}}</span>
|
||||||
<ul>
|
<ul>
|
||||||
<!-- Handles -->
|
<!-- Handles -->
|
||||||
|
<ng-container *ngIf="(!identifierData || identifierData.displayTypes.includes('handle'))">
|
||||||
<ng-container *ngIf="!(identifierData && identifierData.handle)">
|
<ng-container *ngIf="!(identifierData && identifierData.handle)">
|
||||||
<li>{{'submission.sections.identifiers.no_handle' | translate}}</li>
|
<li>{{'submission.sections.identifiers.no_handle' | translate}}</li>
|
||||||
</ng-container>
|
</ng-container>
|
||||||
<ng-container *ngIf="(identifierData && identifierData.handle)">
|
<ng-container *ngIf="(identifierData && identifierData.handle)">
|
||||||
<li>{{'submission.sections.identifiers.handle_label' | translate}}{{identifierData.handle}}</li>
|
<li>{{'submission.sections.identifiers.handle_label' | translate}}{{identifierData.handle}}</li>
|
||||||
</ng-container>
|
</ng-container>
|
||||||
|
</ng-container>
|
||||||
|
|
||||||
<!-- DOIs -->
|
<!-- DOIs -->
|
||||||
|
<ng-container *ngIf="(!identifierData || identifierData.displayTypes.includes('doi'))">
|
||||||
<ng-container *ngIf="!(identifierData && identifierData.doi)">
|
<ng-container *ngIf="!(identifierData && identifierData.doi)">
|
||||||
<li>{{'submission.sections.identifiers.no_doi' | translate}}</li>
|
<li>{{'submission.sections.identifiers.no_doi' | translate}}</li>
|
||||||
</ng-container>
|
</ng-container>
|
||||||
@@ -24,12 +28,16 @@ Template for the identifiers submission section component
|
|||||||
{{identifierData.doi}}
|
{{identifierData.doi}}
|
||||||
</li>
|
</li>
|
||||||
</ng-container>
|
</ng-container>
|
||||||
|
</ng-container>
|
||||||
|
|
||||||
<!-- Other identifiers -->
|
<!-- Other identifiers -->
|
||||||
|
<ng-container *ngIf="(!identifierData || identifierData.displayTypes.includes('other'))">
|
||||||
<ng-container *ngIf="(identifierData && identifierData.otherIdentifiers && identifierData.otherIdentifiers.length > 0)">
|
<ng-container *ngIf="(identifierData && identifierData.otherIdentifiers && identifierData.otherIdentifiers.length > 0)">
|
||||||
<li>{{'submission.sections.identifiers.otherIdentifiers_label' | translate}}
|
<li>{{'submission.sections.identifiers.otherIdentifiers_label' | translate}}
|
||||||
{{identifierData.otherIdentifiers.join(',')}}
|
{{identifierData.otherIdentifiers.join(',')}}
|
||||||
</li>
|
</li>
|
||||||
</ng-container>
|
</ng-container>
|
||||||
|
</ng-container>
|
||||||
</ul>
|
</ul>
|
||||||
</div>
|
</div>
|
||||||
</ng-container>
|
</ng-container>
|
||||||
|
Reference in New Issue
Block a user