59695: Arrow-navigation enabled by default + support for entries

This commit is contained in:
Kristof De Langhe
2019-02-19 08:57:37 +01:00
parent 5288f817b0
commit 25b65d840c
5 changed files with 47 additions and 32 deletions

View File

@@ -194,7 +194,7 @@ export class BrowseService {
}
/**
* Get the previous page using the paginated list's prev link
* Get the previous page of items using the paginated list's prev link
* @param items
*/
getPrevBrowseItems(items: RemoteData<PaginatedList<Item>>): Observable<RemoteData<PaginatedList<Item>>> {
@@ -204,7 +204,7 @@ export class BrowseService {
}
/**
* Get the next page using the paginated list's next link
* Get the next page of items using the paginated list's next link
* @param items
*/
getNextBrowseItems(items: RemoteData<PaginatedList<Item>>): Observable<RemoteData<PaginatedList<Item>>> {
@@ -213,6 +213,26 @@ export class BrowseService {
);
}
/**
* Get the previous page of browse-entries using the paginated list's prev link
* @param entries
*/
getPrevBrowseEntries(entries: RemoteData<PaginatedList<BrowseEntry>>): Observable<RemoteData<PaginatedList<BrowseEntry>>> {
return observableOf(entries.payload.prev).pipe(
getBrowseEntriesFor(this.requestService, this.responseCache, this.rdb)
);
}
/**
* Get the next page of browse-entries using the paginated list's next link
* @param entries
*/
getNextBrowseEntries(entries: RemoteData<PaginatedList<BrowseEntry>>): Observable<RemoteData<PaginatedList<BrowseEntry>>> {
return observableOf(entries.payload.next).pipe(
getBrowseEntriesFor(this.requestService, this.responseCache, this.rdb)
);
}
/**
* Get the browse URL by providing a metadatum key and linkPath
* @param metadatumKey