Don't show section headers for sections with no results and don't show page
controls if there is only one page of results This makes the search results display more streamlined. Make sure that we move the selection to a different section if we are going from displaying a single section to displaying all and the section that used to be displayed alone doesn't have any results.
This commit is contained in:
@ -707,6 +707,9 @@ GenericDisplay.prototype = {
|
||||
if (resetDisplayControl) {
|
||||
this.displayControl.remove_all();
|
||||
let nPages = this._list.n_pages;
|
||||
// Don't show the page indicator if there is only one page.
|
||||
if (nPages == 1)
|
||||
return;
|
||||
let pageNumber = this._list.page;
|
||||
for (let i = 0; i < nPages; i++) {
|
||||
let pageControl = new Link.Link({ color: (i == pageNumber) ? DISPLAY_CONTROL_SELECTED_COLOR : ITEM_DISPLAY_DESCRIPTION_COLOR,
|
||||
|
Reference in New Issue
Block a user