Use Phoenix Params impl in links

pull/199/head
Tim Mecklem 7 years ago
parent 3fbe241cb9
commit a90a628b5d
  1. 4
      apps/explorer_web/lib/explorer_web/templates/address_internal_transaction/index.html.eex
  2. 4
      apps/explorer_web/lib/explorer_web/templates/address_transaction/index.html.eex
  3. 4
      apps/explorer_web/lib/explorer_web/templates/block_transaction/index.html.eex
  4. 2
      apps/explorer_web/lib/explorer_web/templates/chain/_blocks.html.eex
  5. 4
      apps/explorer_web/lib/explorer_web/templates/transaction/index.html.eex
  6. 14
      apps/explorer_web/lib/explorer_web/templates/transaction/overview.html.eex
  7. 4
      apps/explorer_web/lib/explorer_web/templates/transaction/show.html.eex
  8. 8
      apps/explorer_web/lib/explorer_web/templates/transaction_log/index.html.eex

@ -76,8 +76,8 @@
<%= render ExplorerWeb.TransactionView, "_link.html", conn: @conn, transaction: internal_transaction.transaction %>
</td>
<td>
<%= link(internal_transaction.transaction.block.number,
to: block_path(@conn, :show, @conn.assigns.locale, internal_transaction.transaction.block.number)
<%= link(internal_transaction.transaction.block,
to: block_path(@conn, :show, @conn.assigns.locale, internal_transaction.transaction.block)
) %>
</td>
<td><%= ExplorerWeb.BlockView.age(internal_transaction.transaction.block) %></td>

@ -83,8 +83,8 @@
</td>
<td>
<%= link(
transaction.block.number,
to: block_path(@conn, :show, @conn.assigns.locale, transaction.block.number)
transaction.block,
to: block_path(@conn, :show, @conn.assigns.locale, transaction.block)
) %>
</td>
<td><%= transaction.block.timestamp |> Timex.from_now %></td>

@ -149,8 +149,8 @@
</td>
<td>
<%= link(
transaction.block.number,
to: block_path(@conn, :show, @conn.assigns.locale, transaction.block.number)
transaction.block,
to: block_path(@conn, :show, @conn.assigns.locale, transaction.block)
) %>
</td>
<td>

@ -22,7 +22,7 @@
<tr>
<td>
<img src="<%= static_path(@conn, "/images/block.svg") %>" />
<%= link(block.number,to: block_path(@conn, :show, @conn.assigns.locale, block.number)) %>
<%= link(block, to: block_path(@conn, :show, @conn.assigns.locale, block)) %>
</td>
<td><%= block.timestamp |> Timex.from_now %></td>
<td><%= block.transactions |> Enum.count %></td>

@ -48,9 +48,9 @@
</td>
<td>
<%= link(
transaction.block.number,
transaction.block,
class: "transactions__link",
to: block_path(@conn, :show, @conn.assigns.locale, transaction.block.number)
to: block_path(@conn, :show, @conn.assigns.locale, transaction.block)
) %>
</td>
<td>

@ -1,5 +1,5 @@
<h1><%= gettext "Transaction Details" %></h1>
<p><%= @transaction.hash %></p>
<p><%= @transaction %></p>
<div class="panels container__subsection">
<div class="panels__container row">
<div class="col-md-6">
@ -22,9 +22,9 @@
<% block = @transaction.block %>
<%= if block do %>
<%= link(
block.number,
block,
class: "transaction__link",
to: block_path(@conn, :show, @conn.assigns.locale, block.number)
to: block_path(@conn, :show, @conn.assigns.locale, block)
) %>
<% end %>
(<%= gettext "%{confirmations} block confirmations", confirmations: confirmations(@transaction, max_block_number: @max_block_number) %>)
@ -53,9 +53,9 @@
<td>
<%= if @transaction.from_address do %>
<%= link(
@transaction.from_address.hash,
@transaction.from_address,
class: "transaction__link",
to: address_path(@conn, :show, @conn.assigns.locale, @transaction.from_address.hash)
to: address_path(@conn, :show, @conn.assigns.locale, @transaction.from_address)
) %>
<% else %>
<%= gettext "Pending" %>
@ -69,9 +69,9 @@
<td>
<%= if @transaction.to_address do %>
<%= link(
@transaction.to_address.hash,
@transaction.to_address,
class: "transaction__link",
to: address_path(@conn, :show, @conn.assigns.locale, @transaction.to_address.hash)
to: address_path(@conn, :show, @conn.assigns.locale, @transaction.to_address)
) %>
<% else %>
<%= gettext "Pending" %>

@ -6,14 +6,14 @@
<%= link(
gettext("Internal Transactions"),
class: "nav-link active",
to: transaction_path(@conn, :show, @conn.assigns.locale, @transaction.hash)
to: transaction_path(@conn, :show, @conn.assigns.locale, @transaction)
) %>
</li>
<li class="nav-item">
<%= link(
gettext("Logs"),
class: "nav-link",
to: transaction_log_path(@conn, :index, @conn.assigns.locale, @transaction.hash)
to: transaction_log_path(@conn, :index, @conn.assigns.locale, @transaction)
) %>
</li>
</ul>

@ -6,14 +6,14 @@
<%= link(
gettext("Internal Transactions"),
class: "nav-link",
to: transaction_path(@conn, :show, @conn.assigns.locale, @transaction.hash)
to: transaction_path(@conn, :show, @conn.assigns.locale, @transaction)
) %>
</li>
<li class="nav-item">
<%= link(
gettext("Logs"),
class: "nav-link active",
to: transaction_log_path(@conn, :index, @conn.assigns.locale, @transaction.hash)
to: transaction_log_path(@conn, :index, @conn.assigns.locale, @transaction)
) %>
</li>
</ul>
@ -31,8 +31,8 @@
<tr>
<td>
<%= link(
log.address.hash,
to: address_path(@conn, :show, @conn.assigns.locale, log.address.hash)
log.address,
to: address_path(@conn, :show, @conn.assigns.locale, log.address)
) %>
</td>
<td><%= log.first_topic %></td>

Loading…
Cancel
Save