diff --git a/apps/explorer_web/lib/explorer_web/controllers/token_controller.ex b/apps/explorer_web/lib/explorer_web/controllers/token_controller.ex new file mode 100644 index 0000000000..551199b2c0 --- /dev/null +++ b/apps/explorer_web/lib/explorer_web/controllers/token_controller.ex @@ -0,0 +1,10 @@ +defmodule ExplorerWeb.TokenController do + use ExplorerWeb, :controller + + def show(conn, %{"id" => id, "locale" => locale}) do + render( + conn, + "show.html" + ) + end +end diff --git a/apps/explorer_web/lib/explorer_web/router.ex b/apps/explorer_web/lib/explorer_web/router.ex index 393b845bf2..cf06ea319d 100644 --- a/apps/explorer_web/lib/explorer_web/router.ex +++ b/apps/explorer_web/lib/explorer_web/router.ex @@ -94,6 +94,8 @@ defmodule ExplorerWeb.Router do ) end + resources("/tokens", TokenController, only: [:show], as: :token) + get("/search", ChainController, :search) get("/api_docs", APIDocsController, :index) diff --git a/apps/explorer_web/lib/explorer_web/templates/token/show.html.eex b/apps/explorer_web/lib/explorer_web/templates/token/show.html.eex new file mode 100644 index 0000000000..074b321a5f --- /dev/null +++ b/apps/explorer_web/lib/explorer_web/templates/token/show.html.eex @@ -0,0 +1,126 @@ +
+
+
+
+
+
+

<%= gettext("Token Details") %>

+ +

0x95426f2bc716022fcf1def006dbc4bb81f5b5164

+ +
+ 10 <%= gettext "addresses" %> + 10 <%= gettext "Transfers" %> + 10 <%= gettext "decimals" %> +
+
+
+
+ +
+
+
+

Total Suply

+ + + +
+

12345661223123456612231234 symbol

+
+
+
+
+
+
+
+ +
+
+
+ + + + + + + +
+ +
+ <%= if true do %> +

<%= gettext "Token Transfers" %>

+ + +
+
+
+ + Token Transfer +
+ +
+

0x95426f2bc716022fcf1def006dbc4bb81f5b5164

+ + <%= render ExplorerWeb.AddressView, "_link.html", address_hash: "0x95426f2bc716022fcf1def006dbc4bb81f5b5164", contract: false, locale: @locale %> + + → + + <%= render ExplorerWeb.AddressView, "_link.html", address_hash: "0x95426f2bc716022fcf1def006dbc4bb81f5b5164", contract: false, locale: @locale %> + + + + N symbol + +
+ +
+ + + + <%= link( + gettext( + "Block #%{number}", + number: "12" + ), + class: "mr-2 mr-sm-0 text-muted", + to: block_path(ExplorerWeb.Endpoint, :show, @locale, "12") + ) %> + +
+
+
+
+ <% else %> +
+ <%= gettext "There are no transfers for this Token." %> +
+ <% end %> + + <%= link( + gettext("Next"), + class: "button button--secondary button--small float-right mt-4", + to: token_path(@conn, :show, @conn.assigns.locale, "1") + ) %> +
+
+
+
diff --git a/apps/explorer_web/lib/explorer_web/views/token_view.ex b/apps/explorer_web/lib/explorer_web/views/token_view.ex new file mode 100644 index 0000000000..2b0e651676 --- /dev/null +++ b/apps/explorer_web/lib/explorer_web/views/token_view.ex @@ -0,0 +1,3 @@ +defmodule ExplorerWeb.TokenView do + use ExplorerWeb, :view +end