(fix) text format

pull/1844/head
Gabriel Rodriguez Alsina 6 years ago
parent 654d8cf212
commit 313922d93b
  1. 25
      apps/block_scout_web/lib/block_scout_web/templates/block/overview.html.eex

@ -34,7 +34,7 @@
<!-- Block Hash -->
<dl class="row">
<dt class="col-sm-3 text-muted"><%= gettext "Hash" %></dt>
<dd class="col-sm-9"> <%= to_string(@block.hash) %> </dd>
<dd class="col-sm-9"><a class="transaction__link"><%= to_string(@block.hash) %></a></dd>
</dl>
<%= unless @block.number == 0 do %>
@ -44,7 +44,7 @@
<dd class="col-sm-9">
<%= link(
@block.parent_hash,
class: "block__link",
class: "transaction__link",
to: block_path(@conn, :show, @block.number - 1)
) %>
</dd>
@ -55,7 +55,7 @@
<dl class="row">
<dt class="col-sm-3 text-muted"><%= gettext "Difficulty" %></dt>
<dd class="col-sm-9">
<%= @block.difficulty |> Cldr.Number.to_string! %>
<span class="font-weight-bold"><%= @block.difficulty |> Cldr.Number.to_string! %></span>
</dd>
</dl>
@ -63,13 +63,13 @@
<!-- Total Difficulty -->
<dl class="row">
<dt class="col-sm-3 text-muted"><%= gettext "Total Difficulty" %></dt>
<dd class="col-sm-9"> <%= @block.total_difficulty |> Cldr.Number.to_string! %> </dd>
<dd class="col-sm-9"><span class="font-weight-bold"><%= @block.total_difficulty |> Cldr.Number.to_string! %></span></dd>
</dl>
<!-- Nonce -->
<dl class="row">
<dt class="col-sm-3 text-muted"><%= gettext "Nonce" %></dt>
<dd class="col-sm-9"> <%= to_string(@block.nonce) %> </dd>
<dd class="col-sm-9"><span class="font-weight-bold"><%= to_string(@block.nonce) %></span></dd>
</dl>
<%= if length(@block.uncle_relations) > 0 do %>
@ -80,7 +80,7 @@
<%= for {relation, index} <- Enum.with_index(@block.uncle_relations) do %>
<%= link(
gettext("Position %{index}", index: index),
class: "block__link",
class: "transaction__link",
"data-test": "uncle_link",
"data-uncle-hash": to_string(relation.uncle_hash),
to: block_path(@conn, :show, relation.uncle_hash)
@ -95,14 +95,14 @@
<dl class="row">
<dt class="col-sm-3 text-muted"><%= gettext "Gas Used" %></dt>
<dd class="col-sm-9">
<%= @block.gas_used |> Cldr.Number.to_string! %>
<span class="font-weight-bold"><%= @block.gas_used |> Cldr.Number.to_string! %></span>
<span class="text-muted">(<%= (Decimal.to_integer(@block.gas_used) / Decimal.to_integer(@block.gas_limit)) |> Cldr.Number.to_string!(format: "#.#%") %>)</span>
</dt>
</dl>
<dl class="row mb-0">
<dt class="col-sm-3 text-muted"><%= gettext "Gas Limit" %></dt>
<dd class="col-sm-9">
<%= Cldr.Number.to_string!(@block.gas_limit) %>
<span class="font-weight-bold"><%= Cldr.Number.to_string!(@block.gas_limit) %></span>
</dd>
</dl>
<% end %>
@ -135,14 +135,11 @@
<div class="card-body card-body-flex-column-space-between">
<%= if show_reward?(@block.rewards) do %>
<h2 class="card-title balance-card-title"><%= gettext "Block Rewards" %></h2>
<div class="text-right">
<%= for block_reward <- @block.rewards do %>
<dl class="row">
<dt class="col-sm-5 text-muted"><%= block_reward_text(block_reward) %></dt>
<dd class="col-sm-7">
<%= format_wei_value(block_reward.reward, :ether) %></dt>
</dd>
</dl>
<p class="address-current-balance"><%= block_reward_text(block_reward) %> <span class="text-muted"><%= format_wei_value(block_reward.reward, :ether) %></span></p>
<% end %>
</div>
<% else %>
<h2 class="card-title balance-card-title"><%= gettext "Gas Used" %></h2>
<div class="text-right">

Loading…
Cancel
Save