Always show filter dropdown

Co-authored-by: Stamates <stamates@hotmail.com>
pull/333/head
jimmay5469 7 years ago
parent 05636a4b2b
commit 62ad8d094a
  1. 78
      apps/explorer_web/lib/explorer_web/templates/address_internal_transaction/index.html.eex
  2. 121
      apps/explorer_web/lib/explorer_web/templates/address_transaction/index.html.eex

@ -37,47 +37,45 @@
</ul> </ul>
</div> </div>
<div class="card-body"> <div class="card-body">
<div class="dropdown float-right u-push-sm">
<%= if Enum.count(@internal_transactions) > 0 do %> <button data-test="filter_dropdown" class="button button--secondary button--xsmall dropdown-toggle" type="button"
<div class="dropdown float-right u-push-sm"> id="dropdownMenu2" data-toggle="dropdown" aria-haspopup="true" aria-expanded="false">
<button data-test="filter_dropdown" class="button button--secondary button--xsmall dropdown-toggle" type="button" Filter: <%= format_current_filter(@filter) %>
id="dropdownMenu2" data-toggle="dropdown" aria-haspopup="true" aria-expanded="false"> </button>
Filter: <%= format_current_filter(@filter) %> <div class="dropdown-menu dropdown-menu-right filter" aria-labelledby="dropdownMenu2">
</button> <%= link(
<div class="dropdown-menu dropdown-menu-right filter" aria-labelledby="dropdownMenu2"> gettext("All"),
<%= link( to: address_internal_transaction_path(@conn, :index, @conn.assigns.locale, @conn.params["address_id"]),
gettext("All"), class: "address__link address__link--active dropdown-item",
to: address_internal_transaction_path(@conn, :index, @conn.assigns.locale, @conn.params["address_id"]), "data-test": "filter_option"
class: "address__link address__link--active dropdown-item", ) %>
"data-test": "filter_option" <%= link(
) %> gettext("To"),
<%= link( to: address_internal_transaction_path(
gettext("To"), @conn,
to: address_internal_transaction_path( :index,
@conn, @conn.assigns.locale,
:index, @conn.params["address_id"],
@conn.assigns.locale, filter: "to"
@conn.params["address_id"], ),
filter: "to" class: "address__link address__link--active dropdown-item",
), "data-test": "filter_option"
class: "address__link address__link--active dropdown-item", ) %>
"data-test": "filter_option" <%= link(
) %> gettext("From"),
<%= link( to: address_internal_transaction_path(
gettext("From"), @conn,
to: address_internal_transaction_path( :index,
@conn, @conn.assigns.locale,
:index, @conn.params["address_id"],
@conn.assigns.locale, filter: "from"
@conn.params["address_id"], ),
filter: "from" class: "address__link address__link--active dropdown-item",
), "data-test": "filter_option"
class: "address__link address__link--active dropdown-item", ) %>
"data-test": "filter_option"
) %>
</div>
</div> </div>
</div>
<%= if Enum.count(@internal_transactions) > 0 do %>
<table class="table table-responsive-sm table-font"> <table class="table table-responsive-sm table-font">
<thead> <thead>
<th><%= gettext "Parent Tx Hash" %></th> <th><%= gettext "Parent Tx Hash" %></th>

@ -40,68 +40,67 @@
<div data-selector="channel-disconnected-message" style="display:none;"> <div data-selector="channel-disconnected-message" style="display:none;">
<%= gettext "channel disconnected" %> <%= gettext "channel disconnected" %>
</div> </div>
<%= if Enum.count(@transactions) > 0 do %> <div class="dropdown float-right u-push-sm">
<div class="dropdown float-right u-push-sm"> <button data-test="filter_dropdown" class="button button--secondary button--xsmall dropdown-toggle" type="button"
<button data-test="filter_dropdown" class="button button--secondary button--xsmall dropdown-toggle" type="button" id="dropdownMenu2" data-toggle="dropdown" aria-haspopup="true" aria-expanded="false">
id="dropdownMenu2" data-toggle="dropdown" aria-haspopup="true" aria-expanded="false"> Filter: <%= format_current_filter(@filter) %>
Filter: <%= format_current_filter(@filter) %> </button>
</button> <div class="dropdown-menu dropdown-menu-right filter" aria-labelledby="dropdownMenu2">
<div class="dropdown-menu dropdown-menu-right filter" aria-labelledby="dropdownMenu2"> <%= link(
<%= link( gettext("All"),
gettext("All"), to: address_transaction_path(@conn, :index, @conn.assigns.locale, @conn.params["address_id"]),
to: address_transaction_path(@conn, :index, @conn.assigns.locale, @conn.params["address_id"]), class: "address__link address__link--active dropdown-item",
class: "address__link address__link--active dropdown-item", "data-test": "filter_option"
"data-test": "filter_option" ) %>
) %> <%= link(
<%= link( gettext("To"),
gettext("To"), to: address_transaction_path(
to: address_transaction_path( @conn,
@conn, :index,
:index, @conn.assigns.locale,
@conn.assigns.locale, @conn.params["address_id"],
@conn.params["address_id"], filter: "to"
filter: "to" ),
), class: "address__link address__link--active dropdown-item",
class: "address__link address__link--active dropdown-item", "data-test": "filter_option"
"data-test": "filter_option" ) %>
) %> <%= link(
<%= link( gettext("From"),
gettext("From"), to: address_transaction_path(
to: address_transaction_path( @conn,
@conn, :index,
:index, @conn.assigns.locale,
@conn.assigns.locale, @conn.params["address_id"],
@conn.params["address_id"], filter: "from"
filter: "from" ),
), class: "address__link address__link--active dropdown-item",
class: "address__link address__link--active dropdown-item", "data-test": "filter_option"
"data-test": "filter_option" ) %>
) %>
</div>
</div> </div>
</div>
<table class="table table-responsive-sm table-font"> <%= if Enum.count(@transactions) > 0 do %>
<thead> <table class="table table-responsive-sm table-font">
<tr> <thead>
<th class="transactions__column-header transactions__column-header--status"> <tr>
<span class="transactions__column-title transactions__column-title--status"><%= gettext "Status" %></span> <th class="transactions__column-header transactions__column-header--status">
</th> <span class="transactions__column-title transactions__column-title--status"><%= gettext "Status" %></span>
<th><%= gettext "Hash" %></th> </th>
<th><%= gettext "Block" %></th> <th><%= gettext "Hash" %></th>
<th><%= gettext "Age" %></th> <th><%= gettext "Block" %></th>
<th><%= gettext "From" %></th> <th><%= gettext "Age" %></th>
<th></th> <th><%= gettext "From" %></th>
<th><%= gettext "To" %></th> <th></th>
<th><%= gettext "Value" %> (<%= gettext "Ether" %>)</th> <th><%= gettext "To" %></th>
<th><%= gettext "Fee" %></th> <th><%= gettext "Value" %> (<%= gettext "Ether" %>)</th>
</tr> <th><%= gettext "Fee" %></th>
</thead> </tr>
<tbody data-selector='transactions-list'> </thead>
<%= for transaction <- @transactions do %> <tbody data-selector='transactions-list'>
<%= render "_transaction.html", locale: @locale, transaction: transaction %> <%= for transaction <- @transactions do %>
<% end %> <%= render "_transaction.html", locale: @locale, transaction: transaction %>
</tbody> <% end %>
</table> </tbody>
</table>
<% else %> <% else %>
<p data-selector="empty-transactions-list"><%= gettext "There are no Transactions" %></p> <p data-selector="empty-transactions-list"><%= gettext "There are no Transactions" %></p>
<% end %> <% end %>

Loading…
Cancel
Save