parent
1ddb84ac51
commit
d0b064ba85
@ -0,0 +1,122 @@ |
||||
<section class="container"> |
||||
|
||||
<%= render BlockScoutWeb.AddressView, "overview.html", assigns %> |
||||
|
||||
<section> |
||||
<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("Tokens"), |
||||
class: "nav-link active", |
||||
to: address_token_path(@conn, :index, @conn.assigns.locale, @conn.params["address_id"]) |
||||
) %> |
||||
</li> |
||||
<li class="nav-item"> |
||||
<%= link( |
||||
gettext("Transactions"), |
||||
class: "nav-link", |
||||
to: address_transaction_path(@conn, :index, @conn.assigns.locale, @conn.params["address_id"]) |
||||
) %> |
||||
</li> |
||||
<li class="nav-item"> <%= link( |
||||
gettext("Internal Transactions"), |
||||
class: "nav-link", |
||||
"data-test": "internal_transactions_tab_link", |
||||
to: address_internal_transaction_path(@conn, :index, @conn.assigns.locale, @conn.params["address_id"]) |
||||
) %> |
||||
</li> |
||||
<%= if contract?(@address) do %> |
||||
<li class="nav-item"> |
||||
<%= link( |
||||
to: address_contract_path(@conn, :index, @conn.assigns.locale, @conn.params["address_id"]), |
||||
class: "nav-link") do %> |
||||
<%= gettext("Code") %> |
||||
|
||||
<%= if smart_contract_verified?(@address) do %> |
||||
<i class="far fa-check-circle"></i> |
||||
<% end %> |
||||
<% end %> |
||||
</li> |
||||
<% end %> |
||||
<%= if smart_contract_with_read_only_functions?(@address) do %> |
||||
<li class="nav-item"> |
||||
<%= link( |
||||
gettext("Read Contract"), |
||||
to: address_read_contract_path(@conn, :index, @conn.assigns.locale, @conn.params["address_id"]), |
||||
class: "nav-link")%> |
||||
</li> |
||||
<% end %> |
||||
</ul> |
||||
|
||||
<!-- MOBILE DROPDOWN NAV --> |
||||
<ul class="nav nav-tabs card-header-tabs d-md-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">Tokens</a> |
||||
<div class="dropdown-menu"> |
||||
<%= link( |
||||
gettext("Token"), |
||||
class: "dropdown-item", |
||||
to: address_token_path(@conn, :index, @conn.assigns.locale, @conn.params["address_id"]) |
||||
) %> |
||||
<%= link( |
||||
gettext("Transactions"), |
||||
class: "dropdown-item", |
||||
to: address_transaction_path(@conn, :index, @conn.assigns.locale, @conn.params["address_id"]) |
||||
) %> |
||||
<%= link( |
||||
gettext("Internal Transactions"), |
||||
class: "dropdown-item", |
||||
"data-test": "internal_transactions_tab_link", |
||||
to: address_internal_transaction_path(@conn, :index, @conn.assigns.locale, @conn.params["address_id"]) |
||||
) %> |
||||
<%= if contract?(@address) do %> |
||||
<%= link( |
||||
to: address_contract_path(@conn, :index, @conn.assigns.locale, @conn.params["address_id"]), |
||||
class: "dropdown-item") do %> |
||||
<%= gettext("Code") %> |
||||
|
||||
<%= if smart_contract_verified?(@address) do %> |
||||
<i class="far fa-check-circle"></i> |
||||
<% end %> |
||||
<% end %> |
||||
<% end %> |
||||
</div> |
||||
</li> |
||||
</ul> |
||||
</div> |
||||
|
||||
<div class="card-body"> |
||||
<h2 class="card-title"><%= gettext "Tokens" %></h2> |
||||
<%= if Enum.any?(@tokens) do %> |
||||
<%= for token <- @tokens do %> |
||||
<%= render "_tokens.html", conn: @conn, locale: @locale, token: token %> |
||||
<% end %> |
||||
<% else %> |
||||
<div class="tile tile-muted text-center"> |
||||
<span><%= gettext "There are no tokens for this address." %></span> |
||||
</div> |
||||
<% end %> |
||||
|
||||
<div> |
||||
<%= if @next_page_params do %> |
||||
<%= link( |
||||
gettext("Next"), |
||||
class: "button button-secondary button-sm float-right", |
||||
to: address_token_path( |
||||
@conn, |
||||
:index, |
||||
@conn.assigns.locale, |
||||
@address, |
||||
@next_page_params |
||||
) |
||||
) %> |
||||
<% end %> |
||||
</div> |
||||
</div> |
||||
</div> |
||||
</section> |
||||
</section> |
Loading…
Reference in new issue