Code style cleanup

pull/395/head
jimmay5469 6 years ago
parent 581044684a
commit cc5db4dd2d
  1. 40
      apps/explorer_web/lib/explorer_web/templates/pending_transaction/index.html.eex
  2. 45
      apps/explorer_web/lib/explorer_web/templates/transaction/index.html.eex

@ -18,36 +18,34 @@
) %> ) %>
</li> </li>
</ul> </ul>
</div> </div>
<div class="card-body"> <div class="card-body">
<h2 class="card-title mb-0"><%= gettext "Transactions" %></h2> <h2 class="card-title mb-0"><%= gettext "Transactions" %></h2>
<p><%= gettext("Showing %{count} Pending Transactions", count: @pending_transaction_count) %></p> <p><%= gettext("Showing %{count} Pending Transactions", count: @pending_transaction_count) %></p>
<%= for transaction <- @transactions do %> <%= for transaction <- @transactions do %>
<div class="tile tile-type-<%= ExplorerWeb.TransactionView.type_suffix(transaction) %>" data-test="<%= ExplorerWeb.TransactionView.type_suffix(transaction) %>" data-transaction-hash="<%= transaction.hash %>"> <div class="tile tile-type-<%= ExplorerWeb.TransactionView.type_suffix(transaction) %>" data-test="<%= ExplorerWeb.TransactionView.type_suffix(transaction) %>" data-transaction-hash="<%= transaction.hash %>">
<div class="row" data-test="chain_transaction"> <div class="row" data-test="chain_transaction">
<div class="col-md-2 d-flex align-items-center justify-content-start justify-content-lg-center tile-label"> <div class="col-md-2 d-flex align-items-center justify-content-start justify-content-lg-center tile-label">
<%= ExplorerWeb.TransactionView.transaction_display_type(transaction) %> <%= ExplorerWeb.TransactionView.transaction_display_type(transaction) %>
</div> </div>
<div class="col-md-7 col-lg-8 d-flex flex-column">
<%= render ExplorerWeb.TransactionView, "_link.html", locale: @locale, transaction_hash: transaction.hash %>
<span>
<%= render ExplorerWeb.AddressView, "_link.html", locale: @locale, contract: ExplorerWeb.AddressView.contract?(transaction.from_address), address_hash: transaction.from_address_hash %>
&rarr;
<%= if transaction.to_address_hash do %>
<%= render ExplorerWeb.AddressView, "_link.html", address_hash: transaction.to_address_hash, locale: @locale, contract: ExplorerWeb.AddressView.contract?(transaction.to_address) %>
<% else %>
<%= gettext("Contract Address Pending") %>
<% end %>
</span>
<%= ExplorerWeb.TransactionView.value(transaction, include_label: false) %> POA
</div>
<div class="col-md-3 col-lg-2 d-flex flex-row flex-md-column justify-content-start justify-content-md-end text-md-right">
<div class="col-md-7 col-lg-8 d-flex flex-column">
<%= render ExplorerWeb.TransactionView, "_link.html", locale: @locale, transaction_hash: transaction.hash %>
<span>
<%= render ExplorerWeb.AddressView, "_link.html", locale: @locale, contract: ExplorerWeb.AddressView.contract?(transaction.from_address), address_hash: transaction.from_address_hash %>
&rarr;
<%= if transaction.to_address_hash do %>
<%= render ExplorerWeb.AddressView, "_link.html", address_hash: transaction.to_address_hash, locale: @locale, contract: ExplorerWeb.AddressView.contract?(transaction.to_address) %>
<% else %>
<%= gettext("Contract Address Pending") %>
<% end %>
</span>
<%= ExplorerWeb.TransactionView.value(transaction, include_label: false) %> POA
</div>
</div> </div>
</div> </div>
</div>
<% end %> <% end %>
<%= if @next_page_params do %> <%= if @next_page_params do %>
<%= link( <%= link(

@ -18,36 +18,37 @@
) %> ) %>
</li> </li>
</ul> </ul>
</div> </div>
<div class="card-body"> <div class="card-body">
<h2 class="card-title mb-0"><%= gettext "Transactions" %></h2> <h2 class="card-title mb-0"><%= gettext "Transactions" %></h2>
<p><%= gettext("Showing %{count} Validated Transactions", count: Cldr.Number.to_string!(@transaction_estimated_count, format: "#,###")) %></p> <p><%= gettext("Showing %{count} Validated Transactions", count: Cldr.Number.to_string!(@transaction_estimated_count, format: "#,###")) %></p>
<%= for transaction <- @transactions do %> <%= for transaction <- @transactions do %>
<div class="tile tile-type-<%= ExplorerWeb.TransactionView.type_suffix(transaction) %>" data-test="<%= ExplorerWeb.TransactionView.type_suffix(transaction) %>" data-transaction-hash="<%= transaction.hash %>"> <div class="tile tile-type-<%= ExplorerWeb.TransactionView.type_suffix(transaction) %>" data-test="<%= ExplorerWeb.TransactionView.type_suffix(transaction) %>" data-transaction-hash="<%= transaction.hash %>">
<div class="row" data-test="chain_transaction"> <div class="row" data-test="chain_transaction">
<div class="col-md-2 d-flex align-items-center justify-content-start justify-content-lg-center tile-label" data-test="transaction_type"> <div class="col-md-2 d-flex align-items-center justify-content-start justify-content-lg-center tile-label" data-test="transaction_type">
<%= ExplorerWeb.TransactionView.transaction_display_type(transaction) %> <%= ExplorerWeb.TransactionView.transaction_display_type(transaction) %>
</div> </div>
<div class="col-md-7 col-lg-8 d-flex flex-column">
<%= render ExplorerWeb.TransactionView, "_link.html", locale: @locale, transaction_hash: transaction.hash %> <div class="col-md-7 col-lg-8 d-flex flex-column">
<span> <%= render ExplorerWeb.TransactionView, "_link.html", locale: @locale, transaction_hash: transaction.hash %>
<%= render ExplorerWeb.AddressView, "_link.html", locale: @locale, contract: ExplorerWeb.AddressView.contract?(transaction.from_address), address_hash: transaction.from_address_hash %> <span>
&rarr; <%= render ExplorerWeb.AddressView, "_link.html", locale: @locale, contract: ExplorerWeb.AddressView.contract?(transaction.from_address), address_hash: transaction.from_address_hash %>
<%= render ExplorerWeb.AddressView, "_link.html", address_hash: ExplorerWeb.TransactionView.to_address_hash(transaction), locale: @locale, contract: ExplorerWeb.AddressView.contract?(transaction.to_address) %> &rarr;
</span> <%= render ExplorerWeb.AddressView, "_link.html", address_hash: ExplorerWeb.TransactionView.to_address_hash(transaction), locale: @locale, contract: ExplorerWeb.AddressView.contract?(transaction.to_address) %>
<%= ExplorerWeb.TransactionView.value(transaction, include_label: false) %> POA </span>
</div> <%= ExplorerWeb.TransactionView.value(transaction, include_label: false) %> POA
<div class="col-md-3 col-lg-2 d-flex flex-row flex-md-column justify-content-start justify-content-md-end text-md-right"> </div>
<span class="mr-2 mr-sm-0" data-from-now="<%= transaction.block.timestamp %>"></span> <div class="col-md-3 col-lg-2 d-flex flex-row flex-md-column justify-content-start justify-content-md-end text-md-right">
<%= link( <span class="mr-2 mr-sm-0" data-from-now="<%= transaction.block.timestamp %>"></span>
gettext("Block #") <> "#{transaction.block.number}", <%= link(
to: block_path(@conn, :show, @conn.assigns.locale, transaction.block) gettext("Block #") <> "#{transaction.block.number}",
) %> to: block_path(@conn, :show, @conn.assigns.locale, transaction.block)
) %>
</div>
</div> </div>
</div> </div>
</div>
<% end %> <% end %>
<%= if @next_page_params do %> <%= if @next_page_params do %>
<%= link( <%= link(

Loading…
Cancel
Save