From 665d83eb97a893d914766897341028f632209740 Mon Sep 17 00:00:00 2001 From: Gabriel Rodriguez Alsina Date: Thu, 11 Apr 2019 12:37:57 -0300 Subject: [PATCH] (update) tabs' styles --- .../templates/address/_tabs.html.eex | 185 +++++------------- .../address_coin_balance/index.html.eex | 5 +- .../templates/address_contract/index.html.eex | 5 +- .../index.html.eex | 5 +- .../index.html.eex | 5 +- .../address_read_contract/index.html.eex | 5 +- .../templates/address_token/index.html.eex | 5 +- .../address_token_transfer/index.html.eex | 5 +- .../address_transaction/index.html.eex | 5 +- .../block_transaction/index.html.eex | 34 +--- .../templates/tokens/holder/index.html.eex | 5 +- .../templates/tokens/inventory/index.html.eex | 4 +- .../templates/tokens/overview/_tabs.html.eex | 103 +++------- .../tokens/read_contract/index.html.eex | 5 +- .../templates/tokens/transfer/index.html.eex | 5 +- .../templates/transaction/_tabs.html.eex | 74 ++----- .../index.html.eex | 6 +- .../templates/transaction_log/index.html.eex | 4 +- .../transaction_token_transfer/index.html.eex | 5 +- 19 files changed, 118 insertions(+), 352 deletions(-) diff --git a/apps/block_scout_web/lib/block_scout_web/templates/address/_tabs.html.eex b/apps/block_scout_web/lib/block_scout_web/templates/address/_tabs.html.eex index f981f75ace..ba29efebac 100644 --- a/apps/block_scout_web/lib/block_scout_web/templates/address/_tabs.html.eex +++ b/apps/block_scout_web/lib/block_scout_web/templates/address/_tabs.html.eex @@ -1,146 +1,57 @@ - - - - - + diff --git a/apps/block_scout_web/lib/block_scout_web/templates/address_coin_balance/index.html.eex b/apps/block_scout_web/lib/block_scout_web/templates/address_coin_balance/index.html.eex index 60ccf35fce..a41a641fad 100644 --- a/apps/block_scout_web/lib/block_scout_web/templates/address_coin_balance/index.html.eex +++ b/apps/block_scout_web/lib/block_scout_web/templates/address_coin_balance/index.html.eex @@ -3,10 +3,7 @@
-
- <%= render BlockScoutWeb.AddressView, "_tabs.html", assigns %> -
- + <%= render BlockScoutWeb.AddressView, "_tabs.html", assigns %>
diff --git a/apps/block_scout_web/lib/block_scout_web/templates/address_contract/index.html.eex b/apps/block_scout_web/lib/block_scout_web/templates/address_contract/index.html.eex index 429e8794d7..560440fb4e 100644 --- a/apps/block_scout_web/lib/block_scout_web/templates/address_contract/index.html.eex +++ b/apps/block_scout_web/lib/block_scout_web/templates/address_contract/index.html.eex @@ -2,10 +2,7 @@ <%= render BlockScoutWeb.AddressView, "overview.html", assigns %>
-
- <%= render BlockScoutWeb.AddressView, "_tabs.html", assigns %> -
- + <%= render BlockScoutWeb.AddressView, "_tabs.html", assigns %>
<%= if !BlockScoutWeb.AddressView.smart_contract_verified?(@address) do %> <%= link( diff --git a/apps/block_scout_web/lib/block_scout_web/templates/address_decompiled_contract/index.html.eex b/apps/block_scout_web/lib/block_scout_web/templates/address_decompiled_contract/index.html.eex index e2b2d5d11b..2252db512f 100644 --- a/apps/block_scout_web/lib/block_scout_web/templates/address_decompiled_contract/index.html.eex +++ b/apps/block_scout_web/lib/block_scout_web/templates/address_decompiled_contract/index.html.eex @@ -2,10 +2,7 @@ <%= render BlockScoutWeb.AddressView, "overview.html", assigns %>
-
- <%= render BlockScoutWeb.AddressView, "_tabs.html", assigns %> -
- + <%= render BlockScoutWeb.AddressView, "_tabs.html", assigns %> <%= for {contract, _i} <- Enum.with_index(@address.decompiled_smart_contracts) do %>

<%= gettext "Decompiler version" %>

diff --git a/apps/block_scout_web/lib/block_scout_web/templates/address_internal_transaction/index.html.eex b/apps/block_scout_web/lib/block_scout_web/templates/address_internal_transaction/index.html.eex index b726250c2c..bc7529dcd9 100644 --- a/apps/block_scout_web/lib/block_scout_web/templates/address_internal_transaction/index.html.eex +++ b/apps/block_scout_web/lib/block_scout_web/templates/address_internal_transaction/index.html.eex @@ -3,10 +3,7 @@
-
- <%= render BlockScoutWeb.AddressView, "_tabs.html", assigns %> -
- + <%= render BlockScoutWeb.AddressView, "_tabs.html", assigns %>
diff --git a/apps/block_scout_web/lib/block_scout_web/templates/address_read_contract/index.html.eex b/apps/block_scout_web/lib/block_scout_web/templates/address_read_contract/index.html.eex index df43211d37..b662dfb652 100644 --- a/apps/block_scout_web/lib/block_scout_web/templates/address_read_contract/index.html.eex +++ b/apps/block_scout_web/lib/block_scout_web/templates/address_read_contract/index.html.eex @@ -3,10 +3,7 @@ <%= render BlockScoutWeb.AddressView, "overview.html", assigns %>
-
- <%= render BlockScoutWeb.AddressView, "_tabs.html", assigns %> -
- + <%= render BlockScoutWeb.AddressView, "_tabs.html", assigns %>
diff --git a/apps/block_scout_web/lib/block_scout_web/templates/address_token/index.html.eex b/apps/block_scout_web/lib/block_scout_web/templates/address_token/index.html.eex index 08cd1e3511..bc5aac9f4b 100644 --- a/apps/block_scout_web/lib/block_scout_web/templates/address_token/index.html.eex +++ b/apps/block_scout_web/lib/block_scout_web/templates/address_token/index.html.eex @@ -3,10 +3,7 @@
-
- <%= render BlockScoutWeb.AddressView, "_tabs.html", assigns %> -
- + <%= render BlockScoutWeb.AddressView, "_tabs.html", assigns %>

<%= gettext "Tokens" %>

<%= if Enum.any?(@tokens) do %> diff --git a/apps/block_scout_web/lib/block_scout_web/templates/address_token_transfer/index.html.eex b/apps/block_scout_web/lib/block_scout_web/templates/address_token_transfer/index.html.eex index 40915826b1..389dd2aefb 100644 --- a/apps/block_scout_web/lib/block_scout_web/templates/address_token_transfer/index.html.eex +++ b/apps/block_scout_web/lib/block_scout_web/templates/address_token_transfer/index.html.eex @@ -3,10 +3,7 @@
-
- <%= render BlockScoutWeb.AddressView, "_tabs.html", assigns %> -
- + <%= render BlockScoutWeb.AddressView, "_tabs.html", assigns %>

<%= gettext "Tokens" %> / <%= token_name(@token) %> 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 4122e3375e..e78e3589bb 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 @@ -4,10 +4,7 @@
-
- <%= render BlockScoutWeb.AddressView, "_tabs.html", assigns %> -
- + <%= render BlockScoutWeb.AddressView, "_tabs.html", assigns %>
diff --git a/apps/block_scout_web/lib/block_scout_web/templates/block_transaction/index.html.eex b/apps/block_scout_web/lib/block_scout_web/templates/block_transaction/index.html.eex index 09b423d3c2..54aa04d947 100644 --- a/apps/block_scout_web/lib/block_scout_web/templates/block_transaction/index.html.eex +++ b/apps/block_scout_web/lib/block_scout_web/templates/block_transaction/index.html.eex @@ -4,32 +4,14 @@
-
- - - - - - +
+ <%= + link( + gettext("Transactions"), + class: "card-tab #{tab_status("transactions", @conn.request_path)}", + to: block_transaction_path(@conn, :index, @conn.params["block_hash_or_number"]) + ) + %>

<%= gettext "Transactions" %>

diff --git a/apps/block_scout_web/lib/block_scout_web/templates/tokens/holder/index.html.eex b/apps/block_scout_web/lib/block_scout_web/templates/tokens/holder/index.html.eex index 9812fcbee4..de2bb9707a 100644 --- a/apps/block_scout_web/lib/block_scout_web/templates/tokens/holder/index.html.eex +++ b/apps/block_scout_web/lib/block_scout_web/templates/tokens/holder/index.html.eex @@ -10,10 +10,7 @@
-
- <%= render OverviewView, "_tabs.html", assigns %> -
- + <%= render OverviewView, "_tabs.html", assigns %>

<%= gettext "Token Holders" %>

diff --git a/apps/block_scout_web/lib/block_scout_web/templates/tokens/inventory/index.html.eex b/apps/block_scout_web/lib/block_scout_web/templates/tokens/inventory/index.html.eex index 8b2fdcb5b7..4eb471e305 100644 --- a/apps/block_scout_web/lib/block_scout_web/templates/tokens/inventory/index.html.eex +++ b/apps/block_scout_web/lib/block_scout_web/templates/tokens/inventory/index.html.eex @@ -10,9 +10,7 @@
-
- <%= render OverviewView, "_tabs.html", assigns %> -
+ <%= render OverviewView, "_tabs.html", assigns %>

<%= gettext "Inventory" %>

diff --git a/apps/block_scout_web/lib/block_scout_web/templates/tokens/overview/_tabs.html.eex b/apps/block_scout_web/lib/block_scout_web/templates/tokens/overview/_tabs.html.eex index ac7d9fce2a..3a9e9ec11f 100644 --- a/apps/block_scout_web/lib/block_scout_web/templates/tokens/overview/_tabs.html.eex +++ b/apps/block_scout_web/lib/block_scout_web/templates/tokens/overview/_tabs.html.eex @@ -1,81 +1,30 @@ - - - - - +
\ No newline at end of file diff --git a/apps/block_scout_web/lib/block_scout_web/templates/tokens/read_contract/index.html.eex b/apps/block_scout_web/lib/block_scout_web/templates/tokens/read_contract/index.html.eex index 608cc9ca15..5b005ac16a 100644 --- a/apps/block_scout_web/lib/block_scout_web/templates/tokens/read_contract/index.html.eex +++ b/apps/block_scout_web/lib/block_scout_web/templates/tokens/read_contract/index.html.eex @@ -10,10 +10,7 @@
-
- <%= render OverviewView, "_tabs.html", assigns %> -
- + <%= render OverviewView, "_tabs.html", assigns %>
diff --git a/apps/block_scout_web/lib/block_scout_web/templates/tokens/transfer/index.html.eex b/apps/block_scout_web/lib/block_scout_web/templates/tokens/transfer/index.html.eex index 6aff745531..75f5f1079e 100644 --- a/apps/block_scout_web/lib/block_scout_web/templates/tokens/transfer/index.html.eex +++ b/apps/block_scout_web/lib/block_scout_web/templates/tokens/transfer/index.html.eex @@ -10,10 +10,7 @@
-
- <%= render OverviewView, "_tabs.html", assigns %> -
- + <%= render OverviewView, "_tabs.html", assigns %>

<%= gettext "Token Transfers" %>

diff --git a/apps/block_scout_web/lib/block_scout_web/templates/transaction_internal_transaction/index.html.eex b/apps/block_scout_web/lib/block_scout_web/templates/transaction_internal_transaction/index.html.eex index d6c8f38f51..bb7c0f42ab 100644 --- a/apps/block_scout_web/lib/block_scout_web/templates/transaction_internal_transaction/index.html.eex +++ b/apps/block_scout_web/lib/block_scout_web/templates/transaction_internal_transaction/index.html.eex @@ -1,11 +1,7 @@
<%= render BlockScoutWeb.TransactionView, "overview.html", assigns %> -
-
- <%= render BlockScoutWeb.TransactionView, "_tabs.html", assigns %> -
- + <%= render BlockScoutWeb.TransactionView, "_tabs.html", assigns %>

<%= gettext "Internal Transactions" %>

<%= if Enum.count(@internal_transactions) > 0 do %> diff --git a/apps/block_scout_web/lib/block_scout_web/templates/transaction_log/index.html.eex b/apps/block_scout_web/lib/block_scout_web/templates/transaction_log/index.html.eex index fe55ab0d42..596d2e32b6 100644 --- a/apps/block_scout_web/lib/block_scout_web/templates/transaction_log/index.html.eex +++ b/apps/block_scout_web/lib/block_scout_web/templates/transaction_log/index.html.eex @@ -2,9 +2,7 @@ <%= render BlockScoutWeb.TransactionView, "overview.html", assigns %>
-
- <%= render BlockScoutWeb.TransactionView, "_tabs.html", assigns %> -
+ <%= render BlockScoutWeb.TransactionView, "_tabs.html", assigns %>

<%= gettext "Logs" %>

diff --git a/apps/block_scout_web/lib/block_scout_web/templates/transaction_token_transfer/index.html.eex b/apps/block_scout_web/lib/block_scout_web/templates/transaction_token_transfer/index.html.eex index 6dd47c7ea9..74cb6cb4fd 100644 --- a/apps/block_scout_web/lib/block_scout_web/templates/transaction_token_transfer/index.html.eex +++ b/apps/block_scout_web/lib/block_scout_web/templates/transaction_token_transfer/index.html.eex @@ -2,10 +2,7 @@ <%= render BlockScoutWeb.TransactionView, "overview.html", assigns %>
-
- <%= render BlockScoutWeb.TransactionView, "_tabs.html", assigns %> -
- + <%= render BlockScoutWeb.TransactionView, "_tabs.html", assigns %>

<%= gettext "Token Transfers" %>

<%= if Enum.any?(@token_transfers) do %>