mirror of
https://github.com/DSpace/dspace-angular.git
synced 2025-10-18 07:23:03 +00:00
59415: Possibility to browse-by using a scope
This commit is contained in:
@@ -57,6 +57,7 @@ export class BrowseByAuthorPageComponent implements OnInit {
|
||||
const pageSize = +params.pageSize || this.paginationConfig.pageSize;
|
||||
const sortDirection = params.sortDirection || this.sortConfig.direction;
|
||||
const sortField = params.sortField || this.sortConfig.field;
|
||||
const scope = params.scope;
|
||||
this.value = +params.value || params.value || '';
|
||||
const pagination = Object.assign({},
|
||||
this.paginationConfig,
|
||||
@@ -68,7 +69,8 @@ export class BrowseByAuthorPageComponent implements OnInit {
|
||||
);
|
||||
const searchOptions = {
|
||||
pagination: pagination,
|
||||
sort: sort
|
||||
sort: sort,
|
||||
scope: scope
|
||||
};
|
||||
if (isNotEmpty(this.value)) {
|
||||
this.updatePageWithItems(searchOptions, this.value);
|
||||
|
@@ -56,6 +56,7 @@ export class BrowseByTitlePageComponent implements OnInit {
|
||||
const pageSize = +params.pageSize || this.paginationConfig.pageSize;
|
||||
const sortDirection = params.sortDirection || this.sortConfig.direction;
|
||||
const sortField = params.sortField || this.sortConfig.field;
|
||||
const scopeID = params.scope;
|
||||
const pagination = Object.assign({},
|
||||
this.paginationConfig,
|
||||
{ currentPage: page, pageSize: pageSize }
|
||||
@@ -66,7 +67,8 @@ export class BrowseByTitlePageComponent implements OnInit {
|
||||
);
|
||||
this.updatePage({
|
||||
pagination: pagination,
|
||||
sort: sort
|
||||
sort: sort,
|
||||
scopeID: scopeID
|
||||
});
|
||||
}));
|
||||
}
|
||||
@@ -81,7 +83,8 @@ export class BrowseByTitlePageComponent implements OnInit {
|
||||
this.items$ = this.itemDataService.findAll({
|
||||
currentPage: searchOptions.pagination.currentPage,
|
||||
elementsPerPage: searchOptions.pagination.pageSize,
|
||||
sort: searchOptions.sort
|
||||
sort: searchOptions.sort,
|
||||
scopeID: searchOptions.scopeID
|
||||
});
|
||||
}
|
||||
|
||||
|
@@ -90,6 +90,7 @@ export class BrowseService {
|
||||
getBrowseEntriesFor(definitionID: string, options: {
|
||||
pagination?: PaginationComponentOptions;
|
||||
sort?: SortOptions;
|
||||
scope?: string;
|
||||
} = {}): Observable<RemoteData<PaginatedList<BrowseEntry>>> {
|
||||
const request$ = this.getBrowseDefinitions().pipe(
|
||||
getBrowseDefinitionLinks(definitionID),
|
||||
@@ -99,6 +100,9 @@ export class BrowseService {
|
||||
map((href: string) => {
|
||||
// TODO nearly identical to PaginatedSearchOptions => refactor
|
||||
const args = [];
|
||||
if (isNotEmpty(options.sort)) {
|
||||
args.push(`scope=${options.scope}`);
|
||||
}
|
||||
if (isNotEmpty(options.sort)) {
|
||||
args.push(`sort=${options.sort.field},${options.sort.direction}`);
|
||||
}
|
||||
|
@@ -63,16 +63,6 @@ export class NavbarComponent extends MenuComponent implements OnInit {
|
||||
} as LinkMenuItemModel,
|
||||
},
|
||||
{
|
||||
id: 'browse_global_global_by_issue_date',
|
||||
parentID: 'browse_global',
|
||||
active: false,
|
||||
visible: true,
|
||||
model: {
|
||||
type: MenuItemType.LINK,
|
||||
text: 'menu.section.browse_global_by_issue_date',
|
||||
link: '#'
|
||||
} as LinkMenuItemModel,
|
||||
}, {
|
||||
id: 'browse_global_global_by_title',
|
||||
parentID: 'browse_global',
|
||||
active: false,
|
||||
|
Reference in New Issue
Block a user