Add txn dropdown to navbar. Remove tab nav from txn index pages.

pull/946/head
Ryan Arthur 6 years ago committed by jimmay5469
parent 05c8142e0c
commit 89c0c254ac
  1. 21
      apps/block_scout_web/lib/block_scout_web/templates/layout/_topnav.html.eex
  2. 55
      apps/block_scout_web/lib/block_scout_web/templates/pending_transaction/index.html.eex
  3. 44
      apps/block_scout_web/lib/block_scout_web/templates/transaction/index.html.eex

@ -15,7 +15,7 @@
</span>
<%= gettext("Blocks") %>
</a>
<div class="dropdown-menu" aria-labelledby="navbarDropdown">
<div class="dropdown-menu" aria-labelledby="navbarBlocksDropdown">
<%= link to: block_path(@conn, :index), class: "dropdown-item" do %>
<%= gettext("Blocks") %>
<% end %>
@ -27,13 +27,26 @@
<% end %>
</div>
</li>
<li class="nav-item">
<%= link to: transaction_path(@conn, :index), class: "nav-link topnav-nav-link" do %>
<li class="nav-item dropdown">
<a href="#" role="button" id="navbarTransactionsDropdown" class="nav-link dropdown-toggle" data-toggle="dropdown" aria-haspopup="true" aria-expanded="false">
<span class="nav-link-icon">
<%= render BlockScoutWeb.IconsView, "_transaction_icon.html" %>
</span>
<%= gettext("Transactions") %>
<% end %>
</a>
<div class="dropdown-menu" aria-labeledby="navbarTransactionsDropdown">
<%= link(
gettext("Validated"),
class: "dropdown-item",
to: transaction_path(@conn, :index)
) %>
<%= link(
gettext("Pending"),
class: "dropdown-item",
"data-test": "pending_transactions_link",
to: pending_transaction_path(@conn, :index)
) %>
</div>
</li>
<li class="nav-item">
<%= link to: address_path(@conn, :index), class: "nav-link topnav-nav-link" do %>

@ -1,48 +1,14 @@
<section class="container" data-page="transaction-pending-list">
<div class="card">
<div class="card-header">
<!-- DESKTOP TAB NAV -->
<ul class="nav nav-tabs card-header-tabs d-none d-md-inline-flex">
<li class="nav-item">
<%= link(
gettext("Validated"),
class: "nav-link",
to: transaction_path(@conn, :index)
) %>
</li>
<li class="nav-item">
<%= link(
gettext("Pending"),
class: "nav-link active",
"data-test": "pending_transactions_link",
to: pending_transaction_path(@conn, :index)
) %>
</li>
</ul>
<div class="card-body">
<!-- MOBILE DROPDOWN NAV -->
<ul class="nav nav-tabs card-header-tabs d-lg-none">
<li class="nav-item dropdown flex-fill text-center">
<a class="nav-link active dropdown-toggle" data-toggle="dropdown" href="#" role="button" aria-haspopup="true" aria-expanded="false"><%= gettext("Pending") %></a>
<div class="dropdown-menu">
<%= link(
gettext("Validated"),
class: "dropdown-item",
to: transaction_path(@conn, :index)
) %>
<%= link(
gettext("Pending"),
class: "dropdown-item active",
"data-test": "pending_transactions_link",
to: pending_transaction_path(@conn, :index)
) %>
</div>
</li>
</ul>
</div>
<h1><%= gettext "Pending Transactions" %></h1>
<p>
<%= gettext("Showing") %>
<span data-selector="transaction-pending-count"><%= Cldr.Number.to_string!(@pending_transaction_count, format: "#,###") %></span>
<%= gettext("Pending Transactions") %>
</p>
<div class="card-body">
<div data-selector="channel-batching-message" style="display:none;">
<div data-selector="reload-button" class="alert alert-info">
<a href="#" class="alert-link"><span data-selector="channel-batching-count"></span> <%= gettext "More transactions have come in" %></a>
@ -53,12 +19,7 @@
<a href="#" class="alert-link"><%= gettext "Connection Lost, click to load newer transactions" %></a>
</div>
</div>
<h2 class="card-title mb-0"><%= gettext "Transactions" %></h2>
<p>
<%= gettext("Showing") %>
<span data-selector="transaction-pending-count"><%= Cldr.Number.to_string!(@pending_transaction_count, format: "#,###") %></span>
<%= gettext("Pending Transactions") %>
</p>
<span data-selector="transactions-pending-list">
<%= for transaction <- @transactions do %>
<%= render BlockScoutWeb.TransactionView, "_tile.html", transaction: transaction %>

@ -1,47 +1,5 @@
<section class="container" data-page="transaction-list">
<div class="card">
<div class="card-header">
<!-- DESKTOP TAB NAV -->
<ul class="nav nav-tabs card-header-tabs d-none d-lg-inline-flex">
<li class="nav-item">
<%= link(
gettext("Validated"),
class: "nav-link active",
to: transaction_path(@conn, :index)
) %>
</li>
<li class="nav-item">
<%= link(
gettext("Pending"),
class: "nav-link",
"data-test": "pending_transactions_link",
to: pending_transaction_path(@conn, :index)
) %>
</li>
</ul>
<!-- MOBILE DROPDOWN NAV -->
<ul class="nav nav-tabs card-header-tabs d-lg-none">
<li class="nav-item dropdown flex-fill text-center">
<a class="nav-link active dropdown-toggle" data-toggle="dropdown" href="#" role="button" aria-haspopup="true" aria-expanded="false"><%= gettext("Validated") %></a>
<div class="dropdown-menu">
<%= link(
gettext("Validated"),
class: "dropdown-item active",
to: transaction_path(@conn, :index)
) %>
<%= link(
gettext("Pending"),
class: "dropdown-item",
"data-test": "pending_transactions_link",
to: pending_transaction_path(@conn, :index)
) %>
</div>
</li>
</ul>
</div>
<div class="card-body">
<div data-selector="channel-batching-message" class="d-none">
<div data-selector="reload-button" class="alert alert-info">
@ -53,7 +11,7 @@
<a href="#" class="alert-link"><%= gettext "Connection Lost, click to load newer transactions" %></a>
</div>
</div>
<h1><%= gettext "Transactions" %></h1>
<h1><%= gettext "Validated Transactions" %></h1>
<p>
<%= gettext("Showing") %>
<span data-selector="transaction-count"><%= Cldr.Number.to_string!(@transaction_estimated_count, format: "#,###") %></span>

Loading…
Cancel
Save