Remove unused template, refactoring

pull/1889/head
Victor Baranov 6 years ago
parent fa47f35feb
commit 152d4995c1
  1. 2
      apps/block_scout_web/lib/block_scout_web/templates/address/overview.html.eex
  2. 2
      apps/block_scout_web/lib/block_scout_web/templates/transaction/overview.html.eex
  3. 37
      apps/block_scout_web/lib/block_scout_web/templates/verify_other_explorers/_verify_other_explorers.html.eex
  4. 2
      apps/block_scout_web/lib/block_scout_web/views/address_view.ex

@ -119,7 +119,7 @@
<p class="alert alert-danger" role="alert"><%= gettext("Error: Could not determine contract creator.") %></p>
<% end %>
</span>
<%= render "_verify_other_explorers.html", address: @address %>
<%= render "_verify_other_explorers.html", address: @address.hash %>
<% end %>
</div>
</div>

@ -50,7 +50,7 @@
<% end %>
</span>
</div>
<%= render BlockScoutWeb.AddressView, "_verify_other_explorers.html", address: @transaction |> BlockScoutWeb.AddressView.address_partial_selector(:to, nil) %>
<%= render BlockScoutWeb.AddressView, "_verify_other_explorers.html", address: @transaction |> BlockScoutWeb.AddressView.address_partial_selector(:to, nil) |> BlockScoutWeb.RenderHelpers.render_partial() %>
<hr>
<!-- Block Hash -->
<dl class="row">

@ -1,37 +0,0 @@
<div>
<h1 class="card-title mt-5">
Verify with other explorers
</h1>
<div class="verify-other-explorers-table">
<div class="verify-other-explorers-row">
<div class="verify-other-explorers-cell">
<span class="blockchair-logo">
blockchair.com
</span>
</div>
<div class="verify-other-explorers-cell">
<span class='link'>
<%= link(
address_link_to_other_explorer("https://blockchair.com/ethereum/address/", @address),
to: address_link_to_other_explorer("https://blockchair.com/ethereum/address/", @address)
) %>
</span>
</div>
</div>
<div class="verify-other-explorers-row">
<div class="verify-other-explorers-cell left">
<span class="etherchain-logo">
etherchain.org
</span>
</div>
<div class="verify-other-explorers-cell right">
<span class='link'>
<%= link(
address_link_to_other_explorer("https://www.etherchain.org/account/", @address),
to: address_link_to_other_explorer("https://www.etherchain.org/account/", @address)
) %>
</span>
</div>
</div>
</div>
</div>

@ -257,7 +257,7 @@ defmodule BlockScoutWeb.AddressView do
end
def address_link_to_other_explorer(link, address) do
link <> trimmed_hash(address.hash)
link <> trimmed_hash(address)
end
def address_link_to_other_explorer(_, address), do: ""

Loading…
Cancel
Save