From 08df10f4ff60b4bbbd22976cb178926787b8c7eb Mon Sep 17 00:00:00 2001 From: Lucas Narciso Date: Mon, 13 Aug 2018 14:02:12 -0300 Subject: [PATCH 1/3] Make token symbol clickable in the Address page The link sends to the token's page. --- .../templates/address_transaction/_transaction.html.eex | 3 ++- .../templates/address_transaction/index.html.eex | 2 +- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/apps/block_scout_web/lib/block_scout_web/templates/address_transaction/_transaction.html.eex b/apps/block_scout_web/lib/block_scout_web/templates/address_transaction/_transaction.html.eex index 353e270f47..3e006c6a0c 100644 --- a/apps/block_scout_web/lib/block_scout_web/templates/address_transaction/_transaction.html.eex +++ b/apps/block_scout_web/lib/block_scout_web/templates/address_transaction/_transaction.html.eex @@ -77,7 +77,8 @@ - <%= token_transfer_amount(token_transfer) %> <%= token_symbol(token_transfer.token) %> + <%= token_transfer_amount(token_transfer) %> + <%= link(token_symbol(token_transfer.token), to: token_path(@conn, :show, @locale, token_transfer.token.contract_address_hash)) %>
diff --git a/apps/block_scout_web/lib/block_scout_web/templates/address_transaction/index.html.eex b/apps/block_scout_web/lib/block_scout_web/templates/address_transaction/index.html.eex index 0543cbf572..b3e28df25a 100644 --- a/apps/block_scout_web/lib/block_scout_web/templates/address_transaction/index.html.eex +++ b/apps/block_scout_web/lib/block_scout_web/templates/address_transaction/index.html.eex @@ -131,7 +131,7 @@

<%= gettext "Transactions" %>

<%= for transaction <- @transactions do %> - <%= render("_transaction.html", locale: @locale, address: @address, transaction: transaction) %> + <%= render("_transaction.html", locale: @locale, address: @address, transaction: transaction, conn: @conn) %> <% end %> <% else %> From 5645fe9ea3f2c3924c12872e52494ee40f84f52e Mon Sep 17 00:00:00 2001 From: Lucas Narciso Date: Mon, 13 Aug 2018 14:03:38 -0300 Subject: [PATCH 2/3] Add token type to summary box in the Token page --- .../lib/block_scout_web/templates/token/show.html.eex | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/apps/block_scout_web/lib/block_scout_web/templates/token/show.html.eex b/apps/block_scout_web/lib/block_scout_web/templates/token/show.html.eex index 80b02bdcd4..d97ff98bbe 100644 --- a/apps/block_scout_web/lib/block_scout_web/templates/token/show.html.eex +++ b/apps/block_scout_web/lib/block_scout_web/templates/token/show.html.eex @@ -15,7 +15,8 @@

<%= to_string(@token.contract_address_hash) %>

- <%= @total_address_in_token_transfers %> <%= gettext "addresses" %> + <%= @token.type %> + <%= @total_address_in_token_transfers %> <%= gettext "addresses" %> <%= @total_token_transfers %> <%= gettext "Transfers" %> <%= if decimals?(@token) do %> <%= @token.decimals %> <%= gettext "decimals" %> From f6785d61061a5a9227a00b339673dac8cd452ac6 Mon Sep 17 00:00:00 2001 From: Lucas Narciso Date: Mon, 13 Aug 2018 14:12:12 -0300 Subject: [PATCH 3/3] Generate gettext --- apps/block_scout_web/priv/gettext/default.pot | 24 +++++++++---------- .../priv/gettext/en/LC_MESSAGES/default.po | 24 +++++++++---------- 2 files changed, 24 insertions(+), 24 deletions(-) diff --git a/apps/block_scout_web/priv/gettext/default.pot b/apps/block_scout_web/priv/gettext/default.pot index 4fab8ca7f3..68e6fa5d31 100644 --- a/apps/block_scout_web/priv/gettext/default.pot +++ b/apps/block_scout_web/priv/gettext/default.pot @@ -474,7 +474,7 @@ msgstr "" #: lib/block_scout_web/templates/block/index.html.eex:15 #: lib/block_scout_web/templates/block_transaction/index.html.eex:51 #: lib/block_scout_web/templates/pending_transaction/index.html.eex:78 -#: lib/block_scout_web/templates/token/show.html.eex:101 +#: lib/block_scout_web/templates/token/show.html.eex:102 #: lib/block_scout_web/templates/transaction/index.html.eex:66 msgid "Older" msgstr "" @@ -638,7 +638,7 @@ msgstr "" #: #: lib/block_scout_web/templates/address_internal_transaction/_internal_transaction.html.eex:29 #: lib/block_scout_web/templates/address_transaction/_transaction.html.eex:54 -#: lib/block_scout_web/templates/address_transaction/_transaction.html.eex:91 +#: lib/block_scout_web/templates/address_transaction/_transaction.html.eex:92 msgid "IN" msgstr "" @@ -646,7 +646,7 @@ msgstr "" #: #: lib/block_scout_web/templates/address_internal_transaction/_internal_transaction.html.eex:27 #: lib/block_scout_web/templates/address_transaction/_transaction.html.eex:50 -#: lib/block_scout_web/templates/address_transaction/_transaction.html.eex:87 +#: lib/block_scout_web/templates/address_transaction/_transaction.html.eex:88 msgid "OUT" msgstr "" @@ -722,7 +722,7 @@ msgstr "" #, elixir-format #: lib/block_scout_web/templates/address_transaction/_transaction.html.eex:64 -#: lib/block_scout_web/templates/token/show.html.eex:19 +#: lib/block_scout_web/templates/token/show.html.eex:20 msgid "Transfers" msgstr "" @@ -750,7 +750,7 @@ msgstr "" msgid "Validated Transactions" msgstr "" -#: lib/block_scout_web/templates/token/show.html.eex:94 +#: lib/block_scout_web/templates/token/show.html.eex:95 msgid "There are no transfers for this Token." msgstr "" @@ -760,24 +760,24 @@ msgid "Token Details" msgstr "" #, elixir-format -#: lib/block_scout_web/templates/token/show.html.eex:62 -#: lib/block_scout_web/templates/token/show.html.eex:72 -#: lib/block_scout_web/templates/token/show.html.eex:75 -#: lib/block_scout_web/templates/token/show.html.eex:85 +#: lib/block_scout_web/templates/token/show.html.eex:63 +#: lib/block_scout_web/templates/token/show.html.eex:73 +#: lib/block_scout_web/templates/token/show.html.eex:76 +#: lib/block_scout_web/templates/token/show.html.eex:86 msgid "Token Transfers" msgstr "" #, elixir-format -#: lib/block_scout_web/templates/token/show.html.eex:18 +#: lib/block_scout_web/templates/token/show.html.eex:19 msgid "addresses" msgstr "" #, elixir-format -#: lib/block_scout_web/templates/token/show.html.eex:21 +#: lib/block_scout_web/templates/token/show.html.eex:22 msgid "decimals" msgstr "" #, elixir-format -#: lib/block_scout_web/templates/token/show.html.eex:32 +#: lib/block_scout_web/templates/token/show.html.eex:33 msgid "Total Supply" msgstr "" diff --git a/apps/block_scout_web/priv/gettext/en/LC_MESSAGES/default.po b/apps/block_scout_web/priv/gettext/en/LC_MESSAGES/default.po index 0e4e17f62b..df2b547973 100644 --- a/apps/block_scout_web/priv/gettext/en/LC_MESSAGES/default.po +++ b/apps/block_scout_web/priv/gettext/en/LC_MESSAGES/default.po @@ -486,7 +486,7 @@ msgstr "" #: lib/block_scout_web/templates/block/index.html.eex:15 #: lib/block_scout_web/templates/block_transaction/index.html.eex:51 #: lib/block_scout_web/templates/pending_transaction/index.html.eex:78 -#: lib/block_scout_web/templates/token/show.html.eex:101 +#: lib/block_scout_web/templates/token/show.html.eex:102 #: lib/block_scout_web/templates/transaction/index.html.eex:66 msgid "Older" msgstr "" @@ -650,7 +650,7 @@ msgstr "" #: #: lib/block_scout_web/templates/address_internal_transaction/_internal_transaction.html.eex:29 #: lib/block_scout_web/templates/address_transaction/_transaction.html.eex:54 -#: lib/block_scout_web/templates/address_transaction/_transaction.html.eex:91 +#: lib/block_scout_web/templates/address_transaction/_transaction.html.eex:92 msgid "IN" msgstr "" @@ -658,7 +658,7 @@ msgstr "" #: #: lib/block_scout_web/templates/address_internal_transaction/_internal_transaction.html.eex:27 #: lib/block_scout_web/templates/address_transaction/_transaction.html.eex:50 -#: lib/block_scout_web/templates/address_transaction/_transaction.html.eex:87 +#: lib/block_scout_web/templates/address_transaction/_transaction.html.eex:88 msgid "OUT" msgstr "" @@ -734,7 +734,7 @@ msgstr "" #, elixir-format #: lib/block_scout_web/templates/address_transaction/_transaction.html.eex:64 -#: lib/block_scout_web/templates/token/show.html.eex:19 +#: lib/block_scout_web/templates/token/show.html.eex:20 msgid "Transfers" msgstr "" @@ -762,7 +762,7 @@ msgstr "" msgid "Validated Transactions" msgstr "" -#: lib/block_scout_web/templates/token/show.html.eex:94 +#: lib/block_scout_web/templates/token/show.html.eex:95 msgid "There are no transfers for this Token." msgstr "" @@ -772,24 +772,24 @@ msgid "Token Details" msgstr "" #, elixir-format -#: lib/block_scout_web/templates/token/show.html.eex:62 -#: lib/block_scout_web/templates/token/show.html.eex:72 -#: lib/block_scout_web/templates/token/show.html.eex:75 -#: lib/block_scout_web/templates/token/show.html.eex:85 +#: lib/block_scout_web/templates/token/show.html.eex:63 +#: lib/block_scout_web/templates/token/show.html.eex:73 +#: lib/block_scout_web/templates/token/show.html.eex:76 +#: lib/block_scout_web/templates/token/show.html.eex:86 msgid "Token Transfers" msgstr "" #, elixir-format -#: lib/block_scout_web/templates/token/show.html.eex:18 +#: lib/block_scout_web/templates/token/show.html.eex:19 msgid "addresses" msgstr "" #, elixir-format -#: lib/block_scout_web/templates/token/show.html.eex:21 +#: lib/block_scout_web/templates/token/show.html.eex:22 msgid "decimals" msgstr "" #, elixir-format -#: lib/block_scout_web/templates/token/show.html.eex:32 +#: lib/block_scout_web/templates/token/show.html.eex:33 msgid "Total Supply" msgstr ""