mirror of
https://github.com/DSpace/dspace-angular.git
synced 2025-10-07 01:54:15 +00:00
DS-8408 - In Advanced Search, list collections alphabetically
This commit is contained in:
@@ -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,
|
||||
|
@@ -14,6 +14,6 @@
|
||||
</h3>
|
||||
|
||||
<h5 class="px-2">{{'dso-selector.create.community.sub-level' | translate}}</h5>
|
||||
<ds-dso-selector [currentDSOId]="dsoRD?.payload.uuid" [types]="selectorTypes" (onSelect)="selectObject($event)"></ds-dso-selector>
|
||||
<ds-dso-selector [currentDSOId]="dsoRD?.payload.uuid" [types]="selectorTypes" [sort]="defaultSort" (onSelect)="selectObject($event)"></ds-dso-selector>
|
||||
</div>
|
||||
</div>
|
||||
|
@@ -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);
|
||||
}
|
||||
|
@@ -6,6 +6,6 @@
|
||||
</div>
|
||||
<div class="modal-body">
|
||||
<h5 *ngIf="header" class="px-2">{{header | translate}}</h5>
|
||||
<ds-dso-selector [currentDSOId]="dsoRD?.payload.uuid" [types]="selectorTypes" (onSelect)="selectObject($event)"></ds-dso-selector>
|
||||
<ds-dso-selector [currentDSOId]="dsoRD?.payload.uuid" [types]="selectorTypes" [sort]="defaultSort" (onSelect)="selectObject($event)"></ds-dso-selector>
|
||||
</div>
|
||||
</div>
|
||||
|
@@ -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) {
|
||||
}
|
||||
|
||||
|
@@ -14,6 +14,6 @@
|
||||
</h3>
|
||||
|
||||
<h5 class="px-2">{{'dso-selector.' + action + '.' + objectType.toString().toLowerCase() + '.input-header' | translate}}</h5>
|
||||
<ds-dso-selector [currentDSOId]="dsoRD?.payload.uuid" [types]="selectorTypes" (onSelect)="selectObject($event)"></ds-dso-selector>
|
||||
<ds-dso-selector [currentDSOId]="dsoRD?.payload.uuid" [types]="selectorTypes" [sort]="defaultSort" (onSelect)="selectObject($event)"></ds-dso-selector>
|
||||
</div>
|
||||
</div>
|
||||
|
@@ -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<DSpaceObject>();
|
||||
|
||||
/**
|
||||
* Default DSO ordering
|
||||
*/
|
||||
defaultSort = new SortOptions('dc.title', SortDirection.ASC);
|
||||
|
||||
constructor(protected activeModal: NgbActiveModal, protected route: ActivatedRoute) {
|
||||
super(activeModal, route);
|
||||
}
|
||||
|
@@ -6,6 +6,6 @@
|
||||
</div>
|
||||
<div class="modal-body">
|
||||
<h5 *ngIf="header" class="px-2">{{header | translate}}</h5>
|
||||
<ds-dso-selector [currentDSOId]="dsoRD?.payload.uuid" [types]="selectorTypes" (onSelect)="selectObject($event)"></ds-dso-selector>
|
||||
<ds-dso-selector [currentDSOId]="dsoRD?.payload.uuid" [types]="selectorTypes" [sort]="defaultSort" (onSelect)="selectObject($event)"></ds-dso-selector>
|
||||
</div>
|
||||
</div>
|
||||
|
@@ -14,6 +14,6 @@
|
||||
</h3>
|
||||
|
||||
<h5 class="px-2">{{'dso-selector.create.community.sub-level' | translate}}</h5>
|
||||
<ds-dso-selector [currentDSOId]="dsoRD?.payload.uuid" [types]="selectorTypes" (onSelect)="selectObject($event)"></ds-dso-selector>
|
||||
<ds-dso-selector [currentDSOId]="dsoRD?.payload.uuid" [types]="selectorTypes" [sort]="defaultSort" (onSelect)="selectObject($event)"></ds-dso-selector>
|
||||
</div>
|
||||
</div>
|
||||
|
@@ -6,6 +6,6 @@
|
||||
</div>
|
||||
<div class="modal-body">
|
||||
<h5 *ngIf="header" class="px-2">{{header | translate}}</h5>
|
||||
<ds-dso-selector [currentDSOId]="dsoRD?.payload.uuid" [types]="selectorTypes" (onSelect)="selectObject($event)"></ds-dso-selector>
|
||||
<ds-dso-selector [currentDSOId]="dsoRD?.payload.uuid" [types]="selectorTypes" [sort]="defaultSort" (onSelect)="selectObject($event)"></ds-dso-selector>
|
||||
</div>
|
||||
</div>
|
||||
|
@@ -6,6 +6,6 @@
|
||||
</div>
|
||||
<div class="modal-body">
|
||||
<h5 *ngIf="header" class="px-2">{{header | translate}}</h5>
|
||||
<ds-dso-selector [currentDSOId]="dsoRD?.payload.uuid" [types]="selectorTypes" (onSelect)="selectObject($event)"></ds-dso-selector>
|
||||
<ds-dso-selector [currentDSOId]="dsoRD?.payload.uuid" [types]="selectorTypes" [sort]="defaultSort" (onSelect)="selectObject($event)"></ds-dso-selector>
|
||||
</div>
|
||||
</div>
|
||||
|
@@ -6,6 +6,6 @@
|
||||
</div>
|
||||
<div class="modal-body">
|
||||
<h5 *ngIf="header" class="px-2">{{header | translate}}</h5>
|
||||
<ds-dso-selector [currentDSOId]="dsoRD?.payload.uuid" [types]="selectorTypes" (onSelect)="selectObject($event)"></ds-dso-selector>
|
||||
<ds-dso-selector [currentDSOId]="dsoRD?.payload.uuid" [types]="selectorTypes" [sort]="defaultSort" (onSelect)="selectObject($event)"></ds-dso-selector>
|
||||
</div>
|
||||
</div>
|
||||
|
Reference in New Issue
Block a user