Add link to Address' page opened in Token Transfer tab

pull/764/head
Felipe Renan 6 years ago
parent a8b185a865
commit 49f0aad9f3
  1. 24
      apps/block_scout_web/lib/block_scout_web/templates/tokens/token/_token_transfer.html.eex
  2. 2
      apps/block_scout_web/lib/block_scout_web/templates/tokens/token/show.html.eex

@ -9,17 +9,25 @@
<%= render BlockScoutWeb.TransactionView, "_link.html", transaction_hash: @transfer.transaction_hash %>
</p>
<span>
<%= render BlockScoutWeb.AddressView,
"_link.html",
address: @transfer.from_address,
contract: BlockScoutWeb.AddressView.contract?(@transfer.from_address) %>
<%= link to: address_token_transfers_path(@conn, :index, @transfer.from_address, @token.contract_address_hash), "data-test": "address_hash_link" do %>
<%= render(
BlockScoutWeb.AddressView,
"_responsive_hash.html",
address: @transfer.from_address,
contract: BlockScoutWeb.AddressView.contract?(@transfer.from_address)
) %>
<% end %>
&rarr;
<%= render BlockScoutWeb.AddressView,
"_link.html",
address: @transfer.to_address,
contract: BlockScoutWeb.AddressView.contract?(@transfer.to_address) %>
<%= link to: address_token_transfers_path(@conn, :index, @transfer.to_address, @token.contract_address_hash), "data-test": "address_hash_link" do %>
<%= render(
BlockScoutWeb.AddressView,
"_responsive_hash.html",
address: @transfer.to_address,
contract: BlockScoutWeb.AddressView.contract?(@transfer.to_address)
) %>
<% end %>
</span>
<span>

@ -71,7 +71,7 @@
<%= if Enum.any?(@transfers) do %>
<%= for transfer <- @transfers do %>
<%= render("_token_transfer.html", token: @token, transfer: transfer) %>
<%= render("_token_transfer.html", conn: @conn, token: @token, transfer: transfer) %>
<% end %>
<% else %>
<div class="tile tile-muted text-center">

Loading…
Cancel
Save