diff --git a/src/app/shared/dso-selector/dso-selector/dso-selector.component.ts b/src/app/shared/dso-selector/dso-selector/dso-selector.component.ts
index c8d11891ba..3900de8571 100644
--- a/src/app/shared/dso-selector/dso-selector/dso-selector.component.ts
+++ b/src/app/shared/dso-selector/dso-selector/dso-selector.component.ts
@@ -31,6 +31,7 @@ import { getFirstCompletedRemoteData, getFirstSucceededRemoteDataPayload } from
import { hasNoValue, hasValue, isEmpty, isNotEmpty } from '../../empty.util';
import { buildPaginatedList, PaginatedList } from '../../../core/data/paginated-list.model';
import { SearchResult } from '../../search/models/search-result.model';
+import {SortDirection, SortOptions} from '../../../core/cache/models/sort-options.model';
import { RemoteData } from '../../../core/data/remote-data';
import { NotificationsService } from '../../notifications/notifications.service';
import { TranslateService } from '@ngx-translate/core';
@@ -69,6 +70,11 @@ export class DSOSelectorComponent implements OnInit, OnDestroy {
*/
@Input() types: DSpaceObjectType[];
+ /**
+ * The sorting options
+ */
+ @Input() sort: SortOptions;
+
// list of allowed selectable dsoTypes
typesString: string;
@@ -227,7 +233,8 @@ export class DSOSelectorComponent implements OnInit, OnDestroy {
dsoTypes: this.types,
pagination: Object.assign({}, this.defaultPagination, {
currentPage: page
- })
+ }),
+ sort: this.sort
}),
null,
useCache,
diff --git a/src/app/shared/dso-selector/modal-wrappers/create-community-parent-selector/create-community-parent-selector.component.html b/src/app/shared/dso-selector/modal-wrappers/create-community-parent-selector/create-community-parent-selector.component.html
index 4a22672988..a13be63880 100644
--- a/src/app/shared/dso-selector/modal-wrappers/create-community-parent-selector/create-community-parent-selector.component.html
+++ b/src/app/shared/dso-selector/modal-wrappers/create-community-parent-selector/create-community-parent-selector.component.html
@@ -14,6 +14,6 @@
{{'dso-selector.create.community.sub-level' | translate}}
-
+
diff --git a/src/app/shared/dso-selector/modal-wrappers/create-community-parent-selector/create-community-parent-selector.component.ts b/src/app/shared/dso-selector/modal-wrappers/create-community-parent-selector/create-community-parent-selector.component.ts
index a7f583df50..f344c1c3f3 100644
--- a/src/app/shared/dso-selector/modal-wrappers/create-community-parent-selector/create-community-parent-selector.component.ts
+++ b/src/app/shared/dso-selector/modal-wrappers/create-community-parent-selector/create-community-parent-selector.component.ts
@@ -12,6 +12,7 @@ import {
getCommunityCreateRoute,
COMMUNITY_PARENT_PARAMETER
} from '../../../../community-page/community-page-routing-paths';
+import {SortDirection, SortOptions} from '../../../../core/cache/models/sort-options.model';
/**
* Component to wrap a button - for top communities -
@@ -30,6 +31,11 @@ export class CreateCommunityParentSelectorComponent extends DSOSelectorModalWrap
selectorTypes = [DSpaceObjectType.COMMUNITY];
action = SelectorActionType.CREATE;
+ /**
+ * Default DSO ordering
+ */
+ defaultSort = new SortOptions('dc.title', SortDirection.ASC);
+
constructor(protected activeModal: NgbActiveModal, protected route: ActivatedRoute, private router: Router) {
super(activeModal, route);
}
diff --git a/src/app/shared/dso-selector/modal-wrappers/dso-selector-modal-wrapper.component.html b/src/app/shared/dso-selector/modal-wrappers/dso-selector-modal-wrapper.component.html
index 85d8797e66..54044f5d79 100644
--- a/src/app/shared/dso-selector/modal-wrappers/dso-selector-modal-wrapper.component.html
+++ b/src/app/shared/dso-selector/modal-wrappers/dso-selector-modal-wrapper.component.html
@@ -6,6 +6,6 @@
{{header | translate}}
-
+
diff --git a/src/app/shared/dso-selector/modal-wrappers/dso-selector-modal-wrapper.component.ts b/src/app/shared/dso-selector/modal-wrappers/dso-selector-modal-wrapper.component.ts
index 113ca518fd..2a25da2f72 100644
--- a/src/app/shared/dso-selector/modal-wrappers/dso-selector-modal-wrapper.component.ts
+++ b/src/app/shared/dso-selector/modal-wrappers/dso-selector-modal-wrapper.component.ts
@@ -5,6 +5,7 @@ import { RemoteData } from '../../../core/data/remote-data';
import { NgbActiveModal } from '@ng-bootstrap/ng-bootstrap';
import { DSpaceObjectType } from '../../../core/shared/dspace-object-type.model';
import { hasValue, isNotEmpty } from '../../empty.util';
+import {SortDirection, SortOptions} from '../../../core/cache/models/sort-options.model';
export enum SelectorActionType {
CREATE = 'create',
@@ -49,6 +50,11 @@ export abstract class DSOSelectorModalWrapperComponent implements OnInit {
*/
action: SelectorActionType;
+ /**
+ * Default DSO ordering
+ */
+ defaultSort = new SortOptions('dc.title', SortDirection.ASC);
+
constructor(protected activeModal: NgbActiveModal, protected route: ActivatedRoute) {
}
diff --git a/src/app/shared/search-form/scope-selector-modal/scope-selector-modal.component.html b/src/app/shared/search-form/scope-selector-modal/scope-selector-modal.component.html
index e7165a9213..013274320b 100644
--- a/src/app/shared/search-form/scope-selector-modal/scope-selector-modal.component.html
+++ b/src/app/shared/search-form/scope-selector-modal/scope-selector-modal.component.html
@@ -14,6 +14,6 @@
{{'dso-selector.' + action + '.' + objectType.toString().toLowerCase() + '.input-header' | translate}}
-
+
diff --git a/src/app/shared/search-form/scope-selector-modal/scope-selector-modal.component.ts b/src/app/shared/search-form/scope-selector-modal/scope-selector-modal.component.ts
index 86c3010287..416242520c 100644
--- a/src/app/shared/search-form/scope-selector-modal/scope-selector-modal.component.ts
+++ b/src/app/shared/search-form/scope-selector-modal/scope-selector-modal.component.ts
@@ -4,7 +4,7 @@ import { NgbActiveModal } from '@ng-bootstrap/ng-bootstrap';
import { DSpaceObjectType } from '../../../core/shared/dspace-object-type.model';
import { DSOSelectorModalWrapperComponent, SelectorActionType } from '../../dso-selector/modal-wrappers/dso-selector-modal-wrapper.component';
import { DSpaceObject } from '../../../core/shared/dspace-object.model';
-
+import {SortDirection, SortOptions} from '../../../core/cache/models/sort-options.model';
/**
* Component to wrap a button - to select the entire repository -
* and a list of parent communities - for scope selection
@@ -33,6 +33,11 @@ export class ScopeSelectorModalComponent extends DSOSelectorModalWrapperComponen
*/
scopeChange = new EventEmitter();
+ /**
+ * Default DSO ordering
+ */
+ defaultSort = new SortOptions('dc.title', SortDirection.ASC);
+
constructor(protected activeModal: NgbActiveModal, protected route: ActivatedRoute) {
super(activeModal, route);
}
diff --git a/src/themes/custom/app/shared/dso-selector/modal-wrappers/create-collection-parent-selector/create-collection-parent-selector.component.html b/src/themes/custom/app/shared/dso-selector/modal-wrappers/create-collection-parent-selector/create-collection-parent-selector.component.html
index 85d8797e66..54044f5d79 100644
--- a/src/themes/custom/app/shared/dso-selector/modal-wrappers/create-collection-parent-selector/create-collection-parent-selector.component.html
+++ b/src/themes/custom/app/shared/dso-selector/modal-wrappers/create-collection-parent-selector/create-collection-parent-selector.component.html
@@ -6,6 +6,6 @@
{{header | translate}}
-
+
diff --git a/src/themes/custom/app/shared/dso-selector/modal-wrappers/create-community-parent-selector/create-community-parent-selector.component.html b/src/themes/custom/app/shared/dso-selector/modal-wrappers/create-community-parent-selector/create-community-parent-selector.component.html
index 4a22672988..a13be63880 100644
--- a/src/themes/custom/app/shared/dso-selector/modal-wrappers/create-community-parent-selector/create-community-parent-selector.component.html
+++ b/src/themes/custom/app/shared/dso-selector/modal-wrappers/create-community-parent-selector/create-community-parent-selector.component.html
@@ -14,6 +14,6 @@
{{'dso-selector.create.community.sub-level' | translate}}
-
+
diff --git a/src/themes/custom/app/shared/dso-selector/modal-wrappers/edit-collection-selector/edit-collection-selector.component.html b/src/themes/custom/app/shared/dso-selector/modal-wrappers/edit-collection-selector/edit-collection-selector.component.html
index 85d8797e66..54044f5d79 100644
--- a/src/themes/custom/app/shared/dso-selector/modal-wrappers/edit-collection-selector/edit-collection-selector.component.html
+++ b/src/themes/custom/app/shared/dso-selector/modal-wrappers/edit-collection-selector/edit-collection-selector.component.html
@@ -6,6 +6,6 @@
{{header | translate}}
-
+
diff --git a/src/themes/custom/app/shared/dso-selector/modal-wrappers/edit-community-selector/edit-community-selector.component.html b/src/themes/custom/app/shared/dso-selector/modal-wrappers/edit-community-selector/edit-community-selector.component.html
index 85d8797e66..54044f5d79 100644
--- a/src/themes/custom/app/shared/dso-selector/modal-wrappers/edit-community-selector/edit-community-selector.component.html
+++ b/src/themes/custom/app/shared/dso-selector/modal-wrappers/edit-community-selector/edit-community-selector.component.html
@@ -6,6 +6,6 @@
{{header | translate}}
-
+
diff --git a/src/themes/custom/app/shared/dso-selector/modal-wrappers/edit-item-selector/edit-item-selector.component.html b/src/themes/custom/app/shared/dso-selector/modal-wrappers/edit-item-selector/edit-item-selector.component.html
index 85d8797e66..54044f5d79 100644
--- a/src/themes/custom/app/shared/dso-selector/modal-wrappers/edit-item-selector/edit-item-selector.component.html
+++ b/src/themes/custom/app/shared/dso-selector/modal-wrappers/edit-item-selector/edit-item-selector.component.html
@@ -6,6 +6,6 @@
{{header | translate}}
-
+