From cf3cab61dccbff2c91bc64eb88a31d18aeffe87f Mon Sep 17 00:00:00 2001 From: Ayrat Badykov Date: Tue, 21 May 2019 15:18:47 +0300 Subject: [PATCH] disable first/last pages for now --- .../assets/js/lib/async_listing_load.js | 6 +++--- .../_pagination_container.html.eex | 20 +++++++++++-------- .../pending_transaction/index.html.eex | 4 ++-- 3 files changed, 17 insertions(+), 13 deletions(-) diff --git a/apps/block_scout_web/assets/js/lib/async_listing_load.js b/apps/block_scout_web/assets/js/lib/async_listing_load.js index 7765626b87..ca19f3b9ea 100644 --- a/apps/block_scout_web/assets/js/lib/async_listing_load.js +++ b/apps/block_scout_web/assets/js/lib/async_listing_load.js @@ -99,21 +99,21 @@ export function asyncReducer (state = asyncInitialState, action) { history.replaceState({}, null, state.nextPagePath) if (state.pagesStack.length === 0) { - state.pagesStack.push(window.location.href.split('?')[0]) + state.pagesStack.push(window.location.href.split('?')[0]) } state.pagesStack.push(state.nextPagePath) return Object.assign({}, state, { beyondPageOne: true }) } - case 'NAVIGATE_TO_NEWER': { + case 'NAVIGATE_TO_NEWER': { history.replaceState({}, null, state.prevPagePath) state.pagesStack.pop() return Object.assign({}, state, { beyondPageOne: true }) } - default: + default: return state } } diff --git a/apps/block_scout_web/lib/block_scout_web/templates/common_components/_pagination_container.html.eex b/apps/block_scout_web/lib/block_scout_web/templates/common_components/_pagination_container.html.eex index 3495b3a3b1..f9992c6d86 100644 --- a/apps/block_scout_web/lib/block_scout_web/templates/common_components/_pagination_container.html.eex +++ b/apps/block_scout_web/lib/block_scout_web/templates/common_components/_pagination_container.html.eex @@ -1,5 +1,5 @@
- <%= if assigns[:show_pagination_limit] do %> + <%= if false do %> diff --git a/apps/block_scout_web/lib/block_scout_web/templates/pending_transaction/index.html.eex b/apps/block_scout_web/lib/block_scout_web/templates/pending_transaction/index.html.eex index d4b6f76ebb..57855b2ab0 100644 --- a/apps/block_scout_web/lib/block_scout_web/templates/pending_transaction/index.html.eex +++ b/apps/block_scout_web/lib/block_scout_web/templates/pending_transaction/index.html.eex @@ -3,7 +3,7 @@

<%= gettext "Pending Transactions" %>

- <%= render BlockScoutWeb.CommonComponentsView, "_pagination_container.html", position: "top", cur_page_number: "1", show_pagination_limit: true, data_next_page_button: true, prev_next_page_button: true %> + <%= render BlockScoutWeb.CommonComponentsView, "_pagination_container.html", position: "top", cur_page_number: "1", show_pagination_limit: true, data_next_page_button: true, data_prev_page_button: true %>
@@ -32,7 +32,7 @@ <%= gettext("Loading") %>...
- <%= render BlockScoutWeb.CommonComponentsView, "_pagination_container.html", position: "bottom", cur_page_number: "1", show_pagination_limit: true, data_next_page_button: true %> + <%= render BlockScoutWeb.CommonComponentsView, "_pagination_container.html", position: "bottom", cur_page_number: "1", show_pagination_limit: true, data_next_page_button: true, data_prev_page_button: true %>