From 313922d93b1af97487839e67e7ea51d96696f9b4 Mon Sep 17 00:00:00 2001 From: Gabriel Rodriguez Alsina Date: Tue, 23 Apr 2019 15:38:54 -0300 Subject: [PATCH] (fix) text format --- .../templates/block/overview.html.eex | 43 +++++++++---------- .../templates/transaction/overview.html.eex | 2 +- 2 files changed, 21 insertions(+), 24 deletions(-) diff --git a/apps/block_scout_web/lib/block_scout_web/templates/block/overview.html.eex b/apps/block_scout_web/lib/block_scout_web/templates/block/overview.html.eex index fb76387d89..4567d38b94 100644 --- a/apps/block_scout_web/lib/block_scout_web/templates/block/overview.html.eex +++ b/apps/block_scout_web/lib/block_scout_web/templates/block/overview.html.eex @@ -33,18 +33,18 @@
-
<%= gettext "Hash" %>
-
<%= to_string(@block.hash) %>
+
<%= gettext "Hash" %>
+
<%= to_string(@block.hash) %>
<%= unless @block.number == 0 do %>
-
<%= gettext "Parent Hash" %>
+
<%= gettext "Parent Hash" %>
<%= link( @block.parent_hash, - class: "block__link", + class: "transaction__link", to: block_path(@conn, :show, @block.number - 1) ) %>
@@ -53,34 +53,34 @@
-
<%= gettext "Difficulty" %>
+
<%= gettext "Difficulty" %>
- <%= @block.difficulty |> Cldr.Number.to_string! %> + <%= @block.difficulty |> Cldr.Number.to_string! %>
<%= if block_type(@block) == "Block" do %>
-
<%= gettext "Total Difficulty" %>
-
<%= @block.total_difficulty |> Cldr.Number.to_string! %>
+
<%= gettext "Total Difficulty" %>
+
<%= @block.total_difficulty |> Cldr.Number.to_string! %>
-
<%= gettext "Nonce" %>
-
<%= to_string(@block.nonce) %>
+
<%= gettext "Nonce" %>
+
<%= to_string(@block.nonce) %>
<%= if length(@block.uncle_relations) > 0 do %>
-
<%= gettext "Uncles" %>
+
<%= gettext "Uncles" %>
<%= 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 @@
<%= gettext "Gas Used" %>
- <%= @block.gas_used |> Cldr.Number.to_string! %> - (<%= (Decimal.to_integer(@block.gas_used) / Decimal.to_integer(@block.gas_limit)) |> Cldr.Number.to_string!(format: "#.#%") %>) + <%= @block.gas_used |> Cldr.Number.to_string! %> + (<%= (Decimal.to_integer(@block.gas_used) / Decimal.to_integer(@block.gas_limit)) |> Cldr.Number.to_string!(format: "#.#%") %>)
<%= gettext "Gas Limit" %>
- <%= Cldr.Number.to_string!(@block.gas_limit) %> + <%= Cldr.Number.to_string!(@block.gas_limit) %>
<% end %> @@ -135,14 +135,11 @@
<%= if show_reward?(@block.rewards) do %>

<%= gettext "Block Rewards" %>

- <%= for block_reward <- @block.rewards do %> -
-
<%= block_reward_text(block_reward) %>
-
- <%= format_wei_value(block_reward.reward, :ether) %> -
-
- <% end %> +
+ <%= for block_reward <- @block.rewards do %> +

<%= block_reward_text(block_reward) %> <%= format_wei_value(block_reward.reward, :ether) %>

+ <% end %> +
<% else %>

<%= gettext "Gas Used" %>

diff --git a/apps/block_scout_web/lib/block_scout_web/templates/transaction/overview.html.eex b/apps/block_scout_web/lib/block_scout_web/templates/transaction/overview.html.eex index e0decc8e77..64a0d1ad25 100644 --- a/apps/block_scout_web/lib/block_scout_web/templates/transaction/overview.html.eex +++ b/apps/block_scout_web/lib/block_scout_web/templates/transaction/overview.html.eex @@ -67,7 +67,7 @@
-
<%= gettext "Block Confirmations" %>
+
<%= gettext "Block Confirmations" %>
<%= confirmations(@transaction, block_height: @block_height) %>