diff --git a/apps/explorer_web/lib/explorer_web/templates/chain/_block.html.eex b/apps/explorer_web/lib/explorer_web/templates/chain/_block.html.eex new file mode 100644 index 0000000000..2164a8c9b3 --- /dev/null +++ b/apps/explorer_web/lib/explorer_web/templates/chain/_block.html.eex @@ -0,0 +1,18 @@ +
+
+ <%= link(@block, to: block_path(ExplorerWeb.Endpoint, :show, @locale, @block), class: "tile-title") %> +
+ <%= @block.transactions |> Enum.count %> Transactions + +
+ + Validated by + <%= link to: address_path(ExplorerWeb.Endpoint, :show, @locale, @block.miner), + "data-toggle": "tooltip", + "data-placement": "top", + title: @block.miner do %> + <%= @block.miner %> + <% end %> + +
+
diff --git a/apps/explorer_web/lib/explorer_web/templates/chain/_blocks.html.eex b/apps/explorer_web/lib/explorer_web/templates/chain/_blocks.html.eex deleted file mode 100644 index 73d5f02dee..0000000000 --- a/apps/explorer_web/lib/explorer_web/templates/chain/_blocks.html.eex +++ /dev/null @@ -1,32 +0,0 @@ -
-
- - <%= link(gettext("View All Blocks →"), to: block_path(@conn, :index, Gettext.get_locale), class: "button button--secondary button--xsmall float-right") %> -

<%= gettext "Blocks" %>

- -
- - <%= for block <- @chain.blocks do %> -
-
- <%= link(block, to: block_path(@conn, :show, @conn.assigns.locale, block), class: "tile-title") %> -
- <%= block.transactions |> Enum.count %> Transactions - -
- - Validated by - <%= link to: address_path(ExplorerWeb.Endpoint, :show, @locale, block.miner), - "data-toggle": "tooltip", - "data-placement": "top", - title: block.miner do %> - <%= block.miner %> - <% end %> - -
-
- <% end %> - -
-
-
diff --git a/apps/explorer_web/lib/explorer_web/templates/chain/show.html.eex b/apps/explorer_web/lib/explorer_web/templates/chain/show.html.eex index c0489cba7c..6abaabaa67 100644 --- a/apps/explorer_web/lib/explorer_web/templates/chain/show.html.eex +++ b/apps/explorer_web/lib/explorer_web/templates/chain/show.html.eex @@ -52,6 +52,16 @@
- <%= render ExplorerWeb.ChainView, "_blocks.html", assigns %> +
+
+ <%= link(gettext("View All Blocks →"), to: block_path(@conn, :index, Gettext.get_locale), class: "button button--secondary button--xsmall float-right") %> +

<%= gettext "Blocks" %>

+
+ <%= for block <- @chain.blocks do %> + <%= render ExplorerWeb.ChainView, "_block.html", locale: @locale, block: block %> + <% end %> +
+
+
<%= render ExplorerWeb.ChainView, "_transactions.html", assigns %>