disable first/last pages for now

pull/1974/head
Ayrat Badykov 6 years ago
parent db0f685536
commit cf3cab61dc
No known key found for this signature in database
GPG Key ID: B44668E265E9396F
  1. 6
      apps/block_scout_web/assets/js/lib/async_listing_load.js
  2. 20
      apps/block_scout_web/lib/block_scout_web/templates/common_components/_pagination_container.html.eex
  3. 4
      apps/block_scout_web/lib/block_scout_web/templates/pending_transaction/index.html.eex

@ -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
}
}

@ -1,5 +1,5 @@
<div class='pagination-container <%= if assigns[:position] == "top" do %>position-top<% end %> <%= if assigns[:position] == "bottom" do %>position-bottom<% end %>'>
<%= if assigns[:show_pagination_limit] do %>
<%= if false do %>
<!-- Pagination limit -->
<div class="pagination-limit">
<%= gettext "Show" %>
@ -14,13 +14,15 @@
<!-- Pagination -->
<ul class="pagination">
<!-- First -->
<li class="page-item">
<a
<%= if !assigns[:first_page_path] do %>disabled<% end %>
class="page-link"
href='<%= "#{assigns[:first_page_path]}" %>'
>First</a>
</li>
<%= if assigns[:first_page_path] do %>
<li class="page-item">
<a
<%= if !assigns[:first_page_path] do %>disabled<% end %>
class="page-link"
href='<%= "#{assigns[:first_page_path]}" %>'
>First</a>
</li>
<% end %>
<!-- Previous -->
<li class="page-item">
<a
@ -50,6 +52,7 @@
</a>
</li>
<!-- Last -->
<%= if assigns[:last_page_path] do %>
<li class="page-item">
<a
<%= if !assigns[:last_page_path] do %>disabled<% end %>
@ -57,5 +60,6 @@
href='<%= "#{assigns[:last_page_path]}" %>'
>Last</a>
</li>
<% end %>
</ul>
</div>

@ -3,7 +3,7 @@
<div class="card-body" data-async-listing="<%= @current_path %>">
<h1 class="card-title"><%= gettext "Pending Transactions" %></h1>
<%= 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 %>
<div data-selector="channel-batching-message" style="display:none;">
<div data-selector="reload-button" class="alert alert-info">
@ -32,7 +32,7 @@
<%= gettext("Loading") %>...
</div>
<%= 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 %>
<div class="button button-secondary button-small float-right mt-4" data-loading-button style="display: none;">
<span class="loading-spinner-small mr-2">

Loading…
Cancel
Save