pass counter_path to token overview view from all token controllers

pull/2776/head
Ayrat Badykov 5 years ago
parent f6c60ed8b6
commit b623b8f98b
No known key found for this signature in database
GPG Key ID: B44668E265E9396F
  1. 3
      apps/block_scout_web/lib/block_scout_web/controllers/tokens/holder_controller.ex
  2. 3
      apps/block_scout_web/lib/block_scout_web/controllers/tokens/inventory_controller.ex
  3. 3
      apps/block_scout_web/lib/block_scout_web/controllers/tokens/read_contract_controller.ex
  4. 1
      apps/block_scout_web/lib/block_scout_web/controllers/tokens/transfer_controller.ex
  5. 1
      apps/block_scout_web/lib/block_scout_web/templates/tokens/holder/index.html.eex
  6. 1
      apps/block_scout_web/lib/block_scout_web/templates/tokens/inventory/index.html.eex
  7. 2
      apps/block_scout_web/lib/block_scout_web/templates/tokens/overview/_details.html.eex
  8. 1
      apps/block_scout_web/lib/block_scout_web/templates/tokens/read_contract/index.html.eex
  9. 1
      apps/block_scout_web/lib/block_scout_web/templates/tokens/transfer/index.html.eex

@ -57,7 +57,8 @@ defmodule BlockScoutWeb.Tokens.HolderController do
current_path: current_path(conn),
token: Market.add_price(token),
total_token_holders: total_token_holders,
total_token_transfers: total_token_transfers
total_token_transfers: total_token_transfers,
counters_path: token_path(conn, :token_counters, %{"id" => to_string(address_hash)})
)
else
:error ->

@ -75,7 +75,8 @@ defmodule BlockScoutWeb.Tokens.InventoryController do
current_path: current_path(conn),
token: Market.add_price(token),
total_token_transfers: total_token_transfers,
total_token_holders: total_token_holders
total_token_holders: total_token_holders,
counters_path: token_path(conn, :token_counters, %{"id" => to_string(address_hash)})
)
else
:error ->

@ -17,7 +17,8 @@ defmodule BlockScoutWeb.Tokens.ReadContractController do
"index.html",
token: Market.add_price(token),
total_token_transfers: total_token_transfers,
total_token_holders: total_token_holders
total_token_holders: total_token_holders,
counters_path: token_path(conn, :token_counters, %{"id" => to_string(address_hash)})
)
else
:error ->

@ -54,6 +54,7 @@ defmodule BlockScoutWeb.Tokens.TransferController do
render(
conn,
"index.html",
counters_path: token_path(conn, :token_counters, %{"id" => to_string(address_hash)}),
current_path: current_path(conn),
token: Market.add_price(token),
total_token_transfers: total_token_transfers,

@ -5,6 +5,7 @@
token: @token,
total_token_transfers: @total_token_transfers,
total_token_holders: @total_token_holders,
counters_path: @counters_path,
conn: @conn
) %>

@ -5,6 +5,7 @@
token: @token,
total_token_transfers: @total_token_transfers,
total_token_holders: @total_token_holders,
counters_path: @counters_path,
conn: @conn
) %>

@ -2,7 +2,7 @@
<div class="row">
<div class="card-section col-md-12 col-lg-8 pr-0-md">
<div class="card">
<div class="card-body">
<div class="card-body" data-async-counters="<%= @counters_path %>">
<h1 class="card-title">
<%= if token_name?(@token) do %>
<%= @token.name %>

@ -5,6 +5,7 @@
token: @token,
total_token_transfers: @total_token_transfers,
total_token_holders: @total_token_holders,
counters_path: @counters_path,
conn: @conn
) %>

@ -5,6 +5,7 @@
token: @token,
total_token_transfers: @total_token_transfers,
total_token_holders: @total_token_holders,
counters_path: @counters_path,
conn: @conn
) %>

Loading…
Cancel
Save