parent
4c026e25d3
commit
20a6e0749e
@ -1,14 +1,8 @@ |
||||
<div class="address-link text-truncate" data-toggle="tooltip" data-placement="top" title="<%= @address %>"> |
||||
<%= if @address do %> |
||||
<%= link to: address_path(ExplorerWeb.Endpoint, :show, @locale, @address), |
||||
"data-toggle": "tooltip", |
||||
"data-placement": "top", |
||||
class: "address-link__font", |
||||
title: @address do %> |
||||
<%= if contract?(@address) do %> |
||||
<i class="address-link__type fas fa-file"></i> |
||||
<% end %> |
||||
<%= @address %> |
||||
<%= if @address do %> |
||||
<%= link to: address_path(ExplorerWeb.Endpoint, :show, @locale, @address) do %> |
||||
<%= if contract?(@address) do %> |
||||
<i class="address-link__type fas fa-file"></i> |
||||
<% end %> |
||||
<%= @address %> |
||||
<% end %> |
||||
</div> |
||||
<% end %> |
||||
|
@ -1,45 +1,45 @@ |
||||
<div class="card"> |
||||
<div class="card-body"> |
||||
<%= link(gettext("View All"), to: transaction_path(@conn, :index, Gettext.get_locale), class: "button button--secondary button--xsmall float-right") %> |
||||
<%= link(gettext("View All Transactions →"), to: transaction_path(@conn, :index, Gettext.get_locale), class: "button button--secondary button--xsmall float-right") %> |
||||
<h2 class="card-title"><%= gettext "Transactions" %></h2> |
||||
<table class="table table-font table-responsive-lg"> |
||||
<thead> |
||||
<th><%= gettext "TX Hash" %></th> |
||||
<th><%= gettext "From" %></th> |
||||
<th><%= gettext "To" %></th> |
||||
<th><%= gettext "Value" %> (<%= gettext "Ether" %>)</th> |
||||
<th><%= gettext "Age" %></th> |
||||
</thead> |
||||
<tbody> |
||||
<%= for transaction <- @chain.transactions do %> |
||||
<tr data-test="chain_transaction"> |
||||
<td> |
||||
<%= render ExplorerWeb.TransactionView, "_link.html", locale: @locale, transaction: transaction %> |
||||
</td> |
||||
<td> |
||||
<%= render ExplorerWeb.AddressView, "_link.html", locale: @locale, address: transaction.from_address %> |
||||
</td> |
||||
<td> |
||||
<%= cond do %> |
||||
<% transaction.to_address_hash != nil -> %> |
||||
<%= render ExplorerWeb.AddressView, "_link.html", locale: @locale, address: transaction.to_address %> |
||||
<% transaction.created_contract_address_hash != nil -> %> |
||||
<i class="fas fa-plus-square"></i> |
||||
<%= link( |
||||
"Contract Creation", |
||||
class: "transaction__link", |
||||
"data-address-hash": transaction.created_contract_address_hash, |
||||
to: address_path(@conn, :show, @conn.assigns.locale, transaction.created_contract_address_hash), |
||||
title: transaction.created_contract_address_hash |
||||
) %> |
||||
<% true -> %> |
||||
<% end %> |
||||
</td> |
||||
<td><%= ExplorerWeb.TransactionView.value(transaction, include_label: false) %> </td> |
||||
<td data-from-now="<%= transaction.block.timestamp %>"></td> |
||||
</tr> |
||||
<% end %> |
||||
</tbody> |
||||
</table> |
||||
<%= for transaction <- @chain.transactions do %> |
||||
<div class="tile"> |
||||
<div class="row"> |
||||
<div class="col-md-2 d-flex align-items-center justify-content-center"> |
||||
Contract Creation |
||||
</div> |
||||
<div class="col-md-8"> |
||||
<%= link(transaction.hash , |
||||
to: transaction_path(ExplorerWeb.Endpoint, :show, @locale, transaction), |
||||
"class": "tile-title", |
||||
"data-test": "transaction_hash", |
||||
"data-transaction-hash": transaction.hash) %> |
||||
<div> |
||||
<%= render ExplorerWeb.AddressView, "_link.html", locale: @locale, address: transaction.from_address %> |
||||
→ |
||||
<%= cond do %> |
||||
<% transaction.to_address_hash != nil -> %> |
||||
<%= render ExplorerWeb.AddressView, "_link.html", locale: @locale, address: transaction.to_address %> |
||||
<% transaction.created_contract_address_hash != nil -> %> |
||||
<i class="fas fa-plus-square"></i> |
||||
<%= link( |
||||
"Contract Creation", |
||||
class: "transaction__link", |
||||
"data-address-hash": transaction.created_contract_address_hash, |
||||
to: address_path(@conn, :show, @conn.assigns.locale, transaction.created_contract_address_hash), |
||||
title: transaction.created_contract_address_hash |
||||
) %> |
||||
<% true -> %> |
||||
<% end %> |
||||
</div> |
||||
<%= ExplorerWeb.TransactionView.value(transaction, include_label: false) %> |
||||
</div> |
||||
<div class="col-md-2 d-flex flex-column justify-content-end text-right"> |
||||
<span data-from-now="<%= transaction.block.timestamp %>"></span> |
||||
<span>Block #12345</span> |
||||
</div> |
||||
</div> |
||||
</div> |
||||
<% end %> |
||||
</div> |
||||
</div> |
||||
|
@ -1,8 +1,4 @@ |
||||
<%= link(@transaction |> hash |> String.slice(2..7), |
||||
<%= link(@transaction |> hash , |
||||
to: transaction_path(ExplorerWeb.Endpoint, :show, @locale, @transaction), |
||||
"data-toggle": "tooltip", |
||||
"data-placement": "top", |
||||
"data-test": "transaction_hash", |
||||
"data-transaction-hash": @transaction.hash, |
||||
class: "monospace", |
||||
title: @transaction) %> |
||||
"data-transaction-hash": @transaction.hash) %> |
||||
|
Loading…
Reference in new issue