Use partial for rendering overview

pull/333/head
Stamates 7 years ago committed by jimmay5469
parent 7af39e38ea
commit 37ee89c73f
  1. 34
      apps/explorer_web/lib/explorer_web/templates/address/_values.html.eex
  2. 35
      apps/explorer_web/lib/explorer_web/templates/address/overview.html.eex

@ -0,0 +1,34 @@
<tbody>
<tr>
<th scope="row">
<%= gettext "Ether" %> <%= gettext "Balance" %>
</th>
<td data-test="address_balance">
<%= balance(@address) %>
</td>
</tr>
<tr>
<th scope="row">
<%= gettext "USD" %> <%= gettext "Balance" %>
</th>
<td>
<%= formatted_usd(@address, @exchange_rate) %>
</td>
</tr>
<tr>
<th scope="row">
<%= gettext "Number of Transactions" %>
</th>
<td data-test="transaction_count">
<%= Cldr.Number.to_string!(@transaction_count) %>
</td>
</tr>
<tr>
<th scope="row">
<%= gettext "Last Updated In Block" %>
</th>
<td>
<%= balance_block_number(@address) %>
</td>
</tr>
</tbody>

@ -18,40 +18,7 @@
<div class="row">
<div class="col-sm-6">
<table class="table table-font table-responsive-sm table-horizontal">
<tbody>
<tr>
<th scope="row">
<%= gettext "Ether" %> <%= gettext "Balance" %>
</th>
<td data-test="address_balance">
<%= balance(@address) %>
</td>
</tr>
<tr>
<th scope="row">
<%= gettext "USD" %> <%= gettext "Balance" %>
</th>
<td>
<%= formatted_usd(@address, @exchange_rate) %>
</td>
</tr>
<tr>
<th scope="row">
<%= gettext "Number of Transactions" %>
</th>
<td data-test="transaction_count">
<%= Cldr.Number.to_string!(@transaction_count) %>
</td>
</tr>
<tr>
<th scope="row">
<%= gettext "Last Updated In Block" %>
</th>
<td>
<%= balance_block_number(@address) %>
</td>
</tr>
</tbody>
<%= render "_values.html", address: @address, exchange_rate: @exchange_rate, transaction_count: @transaction_count %>
</table>
</div>
</div>

Loading…
Cancel
Save