From 37ee89c73f06a5cd980fb768d5d1b4f5418eed01 Mon Sep 17 00:00:00 2001 From: Stamates Date: Thu, 21 Jun 2018 15:37:40 -0400 Subject: [PATCH] Use partial for rendering overview --- .../templates/address/_values.html.eex | 34 ++++++++++++++++++ .../templates/address/overview.html.eex | 35 +------------------ 2 files changed, 35 insertions(+), 34 deletions(-) create mode 100644 apps/explorer_web/lib/explorer_web/templates/address/_values.html.eex diff --git a/apps/explorer_web/lib/explorer_web/templates/address/_values.html.eex b/apps/explorer_web/lib/explorer_web/templates/address/_values.html.eex new file mode 100644 index 0000000000..cd41d7e254 --- /dev/null +++ b/apps/explorer_web/lib/explorer_web/templates/address/_values.html.eex @@ -0,0 +1,34 @@ + + + + <%= gettext "Ether" %> <%= gettext "Balance" %> + + + <%= balance(@address) %> + + + + + <%= gettext "USD" %> <%= gettext "Balance" %> + + + <%= formatted_usd(@address, @exchange_rate) %> + + + + + <%= gettext "Number of Transactions" %> + + + <%= Cldr.Number.to_string!(@transaction_count) %> + + + + + <%= gettext "Last Updated In Block" %> + + + <%= balance_block_number(@address) %> + + + diff --git a/apps/explorer_web/lib/explorer_web/templates/address/overview.html.eex b/apps/explorer_web/lib/explorer_web/templates/address/overview.html.eex index a2b14557bb..ac48bf1ab5 100644 --- a/apps/explorer_web/lib/explorer_web/templates/address/overview.html.eex +++ b/apps/explorer_web/lib/explorer_web/templates/address/overview.html.eex @@ -18,40 +18,7 @@
- - - - - - - - - - - - - - - - - - + <%= render "_values.html", address: @address, exchange_rate: @exchange_rate, transaction_count: @transaction_count %>
- <%= gettext "Ether" %> <%= gettext "Balance" %> - - <%= balance(@address) %> -
- <%= gettext "USD" %> <%= gettext "Balance" %> - - <%= formatted_usd(@address, @exchange_rate) %> -
- <%= gettext "Number of Transactions" %> - - <%= Cldr.Number.to_string!(@transaction_count) %> -
- <%= gettext "Last Updated In Block" %> - - <%= balance_block_number(@address) %> -