mirror of
https://github.com/DSpace/dspace-angular.git
synced 2025-10-11 12:03:03 +00:00
55946: Refactoring of object-select and collection-select component
This commit is contained in:
@@ -0,0 +1,29 @@
|
||||
import { Component } from '@angular/core';
|
||||
import { Collection } from '../../../core/shared/collection.model';
|
||||
import { ObjectSelectComponent } from '../object-select/object-select.component';
|
||||
import { isNotEmpty } from '../../empty.util';
|
||||
import { ObjectSelectService } from '../object-select.service';
|
||||
|
||||
@Component({
|
||||
selector: 'ds-collection-select',
|
||||
styleUrls: ['./collection-select.component.scss'],
|
||||
templateUrl: './collection-select.component.html'
|
||||
})
|
||||
|
||||
/**
|
||||
* A component used to select collections from a specific list and returning the UUIDs of the selected collections
|
||||
*/
|
||||
export class CollectionSelectComponent extends ObjectSelectComponent<Collection> {
|
||||
|
||||
constructor(protected objectSelectService: ObjectSelectService) {
|
||||
super(objectSelectService);
|
||||
}
|
||||
|
||||
ngOnInit(): void {
|
||||
super.ngOnInit();
|
||||
if (!isNotEmpty(this.confirmButton)) {
|
||||
this.confirmButton = 'collection.select.confirm';
|
||||
}
|
||||
}
|
||||
|
||||
}
|
Reference in New Issue
Block a user