mirror of
https://github.com/DSpace/dspace-angular.git
synced 2025-10-07 10:04:11 +00:00
The collection is displayed in the workflow task
This commit is contained in:
@@ -2,6 +2,7 @@
|
||||
<ds-themed-item-list-preview [item]="item$.value"
|
||||
[object]="object"
|
||||
[showSubmitter]="showSubmitter"
|
||||
[workflowItem]="workflowitem$.value"
|
||||
[status]="status"></ds-themed-item-list-preview>
|
||||
|
||||
<div class="row">
|
||||
|
@@ -0,0 +1,16 @@
|
||||
<div>
|
||||
<div class="row" *ngIf="collection">
|
||||
<div class="col-12">
|
||||
<div class="col-12">
|
||||
<i>
|
||||
<small>{{"collection.listelement.badge" | translate}}:</small>
|
||||
</i>
|
||||
|
||||
<a [href]="uiBaseUrl+'/collections/'+collection.uuid">
|
||||
{{collection.metadata["dc.title"][0]["value"]}}
|
||||
</a>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<ng-template #vcr></ng-template>
|
||||
</div>
|
@@ -1,9 +1,13 @@
|
||||
import { Component, Input } from '@angular/core';
|
||||
import { ChangeDetectorRef, Component, ComponentFactoryResolver, Input } from '@angular/core';
|
||||
import { ThemedComponent } from '../../../theme-support/themed.component';
|
||||
import { ItemListPreviewComponent } from './item-list-preview.component';
|
||||
import { Item } from '../../../../core/shared/item.model';
|
||||
import { MyDspaceItemStatusType } from '../../../object-collection/shared/mydspace-item-status/my-dspace-item-status-type';
|
||||
import { SearchResult } from '../../../search/models/search-result.model';
|
||||
import { WorkflowItem } from 'src/app/core/submission/models/workflowitem.model';
|
||||
import { ThemeService } from 'src/app/shared/theme-support/theme.service';
|
||||
import { CollectionDataService } from 'src/app/core/data/collection-data.service';
|
||||
import { environment } from '../../../../../../src/environments/environment';
|
||||
|
||||
/**
|
||||
* Themed wrapper for ItemListPreviewComponent
|
||||
@@ -11,7 +15,7 @@ import { SearchResult } from '../../../search/models/search-result.model';
|
||||
@Component({
|
||||
selector: 'ds-themed-item-list-preview',
|
||||
styleUrls: [],
|
||||
templateUrl: '../../../theme-support/themed.component.html',
|
||||
templateUrl: 'themed-item-list-preview.component.html'
|
||||
})
|
||||
export class ThemedItemListPreviewComponent extends ThemedComponent<ItemListPreviewComponent> {
|
||||
protected inAndOutputNames: (keyof ItemListPreviewComponent & keyof this)[] = ['item', 'object', 'status', 'showSubmitter'];
|
||||
@@ -24,6 +28,43 @@ export class ThemedItemListPreviewComponent extends ThemedComponent<ItemListPrev
|
||||
|
||||
@Input() showSubmitter = false;
|
||||
|
||||
@Input() workflowItem: WorkflowItem;
|
||||
|
||||
collection: any = null;
|
||||
|
||||
uiBaseUrl: string = environment.ui.baseUrl;
|
||||
|
||||
constructor(
|
||||
protected resolver: ComponentFactoryResolver,
|
||||
protected cdr: ChangeDetectorRef,
|
||||
protected themeService: ThemeService,
|
||||
protected collectionDataService: CollectionDataService
|
||||
){
|
||||
super(resolver, cdr, themeService)
|
||||
}
|
||||
|
||||
ngOnInit() {
|
||||
super.ngOnInit()
|
||||
this.getCollectionName()
|
||||
}
|
||||
|
||||
protected getCollectionName(): void {
|
||||
|
||||
if (!this.item) {
|
||||
return;
|
||||
}
|
||||
|
||||
const collectionId = this.workflowItem?.sections.collection;
|
||||
|
||||
if (!collectionId) {
|
||||
return;
|
||||
}
|
||||
|
||||
this.collectionDataService.findByHref(`${environment.rest.baseUrl}/api/core/collections/${collectionId}`).subscribe(collection => {
|
||||
this.collection = collection?.payload;
|
||||
console.log("collection", this.collection)
|
||||
});
|
||||
}
|
||||
|
||||
protected getComponentName(): string {
|
||||
return 'ItemListPreviewComponent';
|
||||
|
@@ -2,6 +2,7 @@
|
||||
<ds-themed-item-list-preview [item]="item$.value"
|
||||
[object]="object"
|
||||
[showSubmitter]="showSubmitter"
|
||||
[workflowItem]="workflowitem$.value"
|
||||
[status]="status"></ds-themed-item-list-preview>
|
||||
<div class="row">
|
||||
<div [ngClass]="showThumbnails ? 'offset-3 offset-md-2 pl-3' : ''">
|
||||
|
Reference in New Issue
Block a user