diff --git a/i18n/en.json b/i18n/en.json index 06c05f9..292af60 100644 --- a/i18n/en.json +++ b/i18n/en.json @@ -26,7 +26,7 @@ "nextbestnetwork-sidebar-left": "", "nextbestnetwork-sidebar-left-btnclass": "btn btn-primary", "nextbestnetwork-sidebar-left-wrapperclass": "btn-group mb-1", - "nextbestnetwork-sidebar-right": "EDIT-EXT,TOC", + "nextbestnetwork-sidebar-right": "EDIT-EXT,HISTORY,TOC", "nextbestnetwork-sidebar-right-btnclass": "btn btn-primary", "nextbestnetwork-sidebar-right-wrapperclass": "btn-group mb-1", "nextbestnetwork-sidebar-right-dropdownclass": "dropdown-menu-end", diff --git a/includes/NextBestNetworkTemplate.php b/includes/NextBestNetworkTemplate.php index 5a43774..501b09c 100644 --- a/includes/NextBestNetworkTemplate.php +++ b/includes/NextBestNetworkTemplate.php @@ -380,8 +380,23 @@ class NextBestNetworkTemplate extends BaseTemplate { if(preg_match( '/specialpages|whatlinkshere/', $key )) { $divideditems[] = []; } + unset($item['icon']); $divideditems[$key] = $item; } + + // Add page history link at bottom + $views = $this->data['view_urls']; + if( isset( $views['history'] ) ) { + if ( + array_key_exists( 'attributes', $views['history'] ) && false !== strpos( $views['history']['attributes'], 'selected' ) + || array_key_exists( 'class', $views['history'] ) && false !== strpos( $views['history']['class'], 'selected' ) + ) { + $divideditems['history'] = array_shift( $this->data['namespace_urls'] ); + } else { + $divideditems['history'] = $views['history']; + } + } + return [[ 'href' => '#', 'html' => $html, @@ -1239,29 +1254,29 @@ $skin->renderBrand(); echo '