Merge pull request #580 from poanetwork/link-to-button-api-doc

Turned links into buttons and styled
pull/575/head
Sebastian Abondano 6 years ago committed by GitHub
commit 3459b817c3
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
  1. 4
      apps/block_scout_web/assets/css/components/_tile.scss
  2. 23
      apps/block_scout_web/lib/block_scout_web/templates/api_docs/_action_tile.html.eex
  3. 72
      apps/block_scout_web/priv/gettext/default.pot
  4. 72
      apps/block_scout_web/priv/gettext/en/LC_MESSAGES/default.po

@ -66,6 +66,10 @@
&-api-documentation {
border-left: 4px solid $primary;
background-color: transparent;
width: 100%;
text-align: left;
padding: 15px;
.tile-label {
color: $primary;

@ -1,14 +1,17 @@
<a class="nounderline" data-toggle="collapse" href="#<%= action_tile_id(@module_name, @action.name) %>" role="button" aria-expanded="false" aria-controls="<%= action_tile_id(@module_name, @action.name) %>">
<div class="tile tile-type-api-documentation">
<h3>
<span class="badge badge-secondary tile-badge float-right"><%= gettext "POST" %></span>
<span class="badge badge-primary tile-badge float-right mr-1"><%= gettext "GET" %></span>
<strong class="tile-label"><%= @action.name %></strong>
</h3>
<h4 class="text-dark"><%= @action.description %></h4>
<code><%= raw query_params(@module_name, @action) %></code>
<div>
<button class="nounderline tile tile-type-api-documentation" data-toggle="collapse" href="#<%= action_tile_id(@module_name, @action.name) %>" role="button" aria-expanded="false" aria-controls="<%= action_tile_id(@module_name, @action.name) %>">
<h3>
<span class="badge badge-secondary tile-badge float-right"><%= gettext "POST" %></span>
<span class="badge badge-primary tile-badge float-right mr-1"><%= gettext "GET" %></span>
<strong class="tile-label"><%= @action.name %></strong>
</h3>
<h4 class="text-dark"><%= @action.description %></h4>
<code><%= raw query_params(@module_name, @action) %></code>
</button>
</div>
</a>
<div class="row mt-2">
<div class="col">

@ -501,8 +501,8 @@ msgstr ""
#: lib/block_scout_web/templates/address_read_contract/index.html.eex:27
#: lib/block_scout_web/templates/address_transaction/index.html.eex:31
#: lib/block_scout_web/templates/address_transaction/index.html.eex:69
#: lib/block_scout_web/templates/api_docs/_action_tile.html.eex:121
#: lib/block_scout_web/templates/api_docs/_action_tile.html.eex:140
#: lib/block_scout_web/templates/api_docs/_action_tile.html.eex:124
#: lib/block_scout_web/templates/api_docs/_action_tile.html.eex:143
msgid "Code"
msgstr ""
@ -842,25 +842,25 @@ msgid "Token Holdings"
msgstr ""
#, elixir-format
#: lib/block_scout_web/templates/api_docs/_action_tile.html.eex:35
#: lib/block_scout_web/templates/api_docs/_action_tile.html.eex:50
#: lib/block_scout_web/templates/api_docs/_action_tile.html.eex:66
#: lib/block_scout_web/templates/api_docs/_action_tile.html.eex:80
#: lib/block_scout_web/templates/api_docs/_action_tile.html.eex:38
#: lib/block_scout_web/templates/api_docs/_action_tile.html.eex:53
#: lib/block_scout_web/templates/api_docs/_action_tile.html.eex:69
#: lib/block_scout_web/templates/api_docs/_action_tile.html.eex:83
msgid "(query)"
msgstr ""
#, elixir-format
#: lib/block_scout_web/templates/api_docs/_action_tile.html.eex:53
#: lib/block_scout_web/templates/api_docs/_action_tile.html.eex:56
msgid "A string with the name of the action to be invoked."
msgstr ""
#, elixir-format
#: lib/block_scout_web/templates/api_docs/_action_tile.html.eex:38
#: lib/block_scout_web/templates/api_docs/_action_tile.html.eex:41
msgid "A string with the name of the module to be invoked."
msgstr ""
#, elixir-format
#: lib/block_scout_web/templates/api_docs/_action_tile.html.eex:45
#: lib/block_scout_web/templates/api_docs/_action_tile.html.eex:48
msgid "Action"
msgstr ""
@ -870,95 +870,95 @@ msgid "Base URL:"
msgstr ""
#, elixir-format
#: lib/block_scout_web/templates/api_docs/_action_tile.html.eex:19
#: lib/block_scout_web/templates/api_docs/_action_tile.html.eex:22
msgid "Cancel"
msgstr ""
#, elixir-format
#: lib/block_scout_web/templates/api_docs/_action_tile.html.eex:94
#: lib/block_scout_web/templates/api_docs/_action_tile.html.eex:97
msgid "Clear"
msgstr ""
#, elixir-format
#: lib/block_scout_web/templates/api_docs/_action_tile.html.eex:105
#: lib/block_scout_web/templates/api_docs/_action_tile.html.eex:108
msgid "Curl"
msgstr ""
#, elixir-format
#: lib/block_scout_web/templates/api_docs/_action_tile.html.eex:25
#: lib/block_scout_web/templates/api_docs/_action_tile.html.eex:141
#: lib/block_scout_web/templates/api_docs/_action_tile.html.eex:28
#: lib/block_scout_web/templates/api_docs/_action_tile.html.eex:144
msgid "Description"
msgstr ""
#, elixir-format
#: lib/block_scout_web/templates/api_docs/_action_tile.html.eex:122
#: lib/block_scout_web/templates/api_docs/_action_tile.html.eex:125
msgid "Details"
msgstr ""
#, elixir-format
#: lib/block_scout_web/templates/api_docs/_action_tile.html.eex:162
#: lib/block_scout_web/templates/api_docs/_action_tile.html.eex:165
msgid "Example Value"
msgstr ""
#, elixir-format
#: lib/block_scout_web/templates/api_docs/_action_tile.html.eex:91
#: lib/block_scout_web/templates/api_docs/_action_tile.html.eex:94
msgid "Execute"
msgstr ""
#, elixir-format
#: lib/block_scout_web/templates/api_docs/_action_tile.html.eex:5
#: lib/block_scout_web/templates/api_docs/_action_tile.html.eex:7
msgid "GET"
msgstr ""
#, elixir-format
#: lib/block_scout_web/templates/api_docs/_action_tile.html.eex:175
#: lib/block_scout_web/templates/api_docs/_action_tile.html.eex:178
msgid "Model"
msgstr ""
#, elixir-format
#: lib/block_scout_web/templates/api_docs/_action_tile.html.eex:30
#: lib/block_scout_web/templates/api_docs/_action_tile.html.eex:33
msgid "Module"
msgstr ""
#, elixir-format
#: lib/block_scout_web/templates/api_docs/_action_tile.html.eex:39
#: lib/block_scout_web/templates/api_docs/_action_tile.html.eex:54
#: lib/block_scout_web/templates/api_docs/_action_tile.html.eex:42
#: lib/block_scout_web/templates/api_docs/_action_tile.html.eex:57
msgid "Must be set to:"
msgstr ""
#, elixir-format
#: lib/block_scout_web/templates/api_docs/_action_tile.html.eex:24
#: lib/block_scout_web/templates/api_docs/_action_tile.html.eex:27
msgid "Name"
msgstr ""
#, elixir-format
#: lib/block_scout_web/templates/api_docs/_action_tile.html.eex:4
#: lib/block_scout_web/templates/api_docs/_action_tile.html.eex:6
msgid "POST"
msgstr ""
#, elixir-format
#: lib/block_scout_web/templates/api_docs/_action_tile.html.eex:17
#: lib/block_scout_web/templates/api_docs/_action_tile.html.eex:20
msgid "Parameters"
msgstr ""
#, elixir-format
#: lib/block_scout_web/templates/api_docs/_action_tile.html.eex:112
#: lib/block_scout_web/templates/api_docs/_action_tile.html.eex:115
msgid "Request URL"
msgstr ""
#, elixir-format
#: lib/block_scout_web/templates/api_docs/_action_tile.html.eex:128
#: lib/block_scout_web/templates/api_docs/_action_tile.html.eex:131
msgid "Response Body"
msgstr ""
#, elixir-format
#: lib/block_scout_web/templates/api_docs/_action_tile.html.eex:101
#: lib/block_scout_web/templates/api_docs/_action_tile.html.eex:138
#: lib/block_scout_web/templates/api_docs/_action_tile.html.eex:104
#: lib/block_scout_web/templates/api_docs/_action_tile.html.eex:141
msgid "Responses"
msgstr ""
#, elixir-format
#: lib/block_scout_web/templates/api_docs/_action_tile.html.eex:119
#: lib/block_scout_web/templates/api_docs/_action_tile.html.eex:122
msgid "Server Response"
msgstr ""
@ -968,19 +968,19 @@ msgid "This API is provided for developers transitioning their applications from
msgstr ""
#, elixir-format
#: lib/block_scout_web/templates/api_docs/_action_tile.html.eex:18
#: lib/block_scout_web/templates/api_docs/_action_tile.html.eex:21
msgid "Try it out"
msgstr ""
#, elixir-format
#: lib/block_scout_web/templates/api_docs/_action_tile.html.eex:32
#: lib/block_scout_web/templates/api_docs/_action_tile.html.eex:47
#: lib/block_scout_web/templates/api_docs/_action_tile.html.eex:63
#: lib/block_scout_web/templates/api_docs/_action_tile.html.eex:35
#: lib/block_scout_web/templates/api_docs/_action_tile.html.eex:50
#: lib/block_scout_web/templates/api_docs/_action_tile.html.eex:66
msgid "required"
msgstr ""
#, elixir-format
#: lib/block_scout_web/templates/api_docs/_action_tile.html.eex:35
#: lib/block_scout_web/templates/api_docs/_action_tile.html.eex:50
#: lib/block_scout_web/templates/api_docs/_action_tile.html.eex:38
#: lib/block_scout_web/templates/api_docs/_action_tile.html.eex:53
msgid "string"
msgstr ""

@ -513,8 +513,8 @@ msgstr ""
#: lib/block_scout_web/templates/address_read_contract/index.html.eex:27
#: lib/block_scout_web/templates/address_transaction/index.html.eex:31
#: lib/block_scout_web/templates/address_transaction/index.html.eex:69
#: lib/block_scout_web/templates/api_docs/_action_tile.html.eex:121
#: lib/block_scout_web/templates/api_docs/_action_tile.html.eex:140
#: lib/block_scout_web/templates/api_docs/_action_tile.html.eex:124
#: lib/block_scout_web/templates/api_docs/_action_tile.html.eex:143
msgid "Code"
msgstr ""
@ -854,25 +854,25 @@ msgid "Token Holdings"
msgstr ""
#, elixir-format
#: lib/block_scout_web/templates/api_docs/_action_tile.html.eex:35
#: lib/block_scout_web/templates/api_docs/_action_tile.html.eex:50
#: lib/block_scout_web/templates/api_docs/_action_tile.html.eex:66
#: lib/block_scout_web/templates/api_docs/_action_tile.html.eex:80
#: lib/block_scout_web/templates/api_docs/_action_tile.html.eex:38
#: lib/block_scout_web/templates/api_docs/_action_tile.html.eex:53
#: lib/block_scout_web/templates/api_docs/_action_tile.html.eex:69
#: lib/block_scout_web/templates/api_docs/_action_tile.html.eex:83
msgid "(query)"
msgstr ""
#, elixir-format
#: lib/block_scout_web/templates/api_docs/_action_tile.html.eex:53
#: lib/block_scout_web/templates/api_docs/_action_tile.html.eex:56
msgid "A string with the name of the action to be invoked."
msgstr ""
#, elixir-format
#: lib/block_scout_web/templates/api_docs/_action_tile.html.eex:38
#: lib/block_scout_web/templates/api_docs/_action_tile.html.eex:41
msgid "A string with the name of the module to be invoked."
msgstr ""
#, elixir-format
#: lib/block_scout_web/templates/api_docs/_action_tile.html.eex:45
#: lib/block_scout_web/templates/api_docs/_action_tile.html.eex:48
msgid "Action"
msgstr ""
@ -882,95 +882,95 @@ msgid "Base URL:"
msgstr ""
#, elixir-format
#: lib/block_scout_web/templates/api_docs/_action_tile.html.eex:19
#: lib/block_scout_web/templates/api_docs/_action_tile.html.eex:22
msgid "Cancel"
msgstr ""
#, elixir-format
#: lib/block_scout_web/templates/api_docs/_action_tile.html.eex:94
#: lib/block_scout_web/templates/api_docs/_action_tile.html.eex:97
msgid "Clear"
msgstr ""
#, elixir-format
#: lib/block_scout_web/templates/api_docs/_action_tile.html.eex:105
#: lib/block_scout_web/templates/api_docs/_action_tile.html.eex:108
msgid "Curl"
msgstr ""
#, elixir-format
#: lib/block_scout_web/templates/api_docs/_action_tile.html.eex:25
#: lib/block_scout_web/templates/api_docs/_action_tile.html.eex:141
#: lib/block_scout_web/templates/api_docs/_action_tile.html.eex:28
#: lib/block_scout_web/templates/api_docs/_action_tile.html.eex:144
msgid "Description"
msgstr ""
#, elixir-format
#: lib/block_scout_web/templates/api_docs/_action_tile.html.eex:122
#: lib/block_scout_web/templates/api_docs/_action_tile.html.eex:125
msgid "Details"
msgstr ""
#, elixir-format
#: lib/block_scout_web/templates/api_docs/_action_tile.html.eex:162
#: lib/block_scout_web/templates/api_docs/_action_tile.html.eex:165
msgid "Example Value"
msgstr ""
#, elixir-format
#: lib/block_scout_web/templates/api_docs/_action_tile.html.eex:91
#: lib/block_scout_web/templates/api_docs/_action_tile.html.eex:94
msgid "Execute"
msgstr ""
#, elixir-format
#: lib/block_scout_web/templates/api_docs/_action_tile.html.eex:5
#: lib/block_scout_web/templates/api_docs/_action_tile.html.eex:7
msgid "GET"
msgstr ""
#, elixir-format
#: lib/block_scout_web/templates/api_docs/_action_tile.html.eex:175
#: lib/block_scout_web/templates/api_docs/_action_tile.html.eex:178
msgid "Model"
msgstr ""
#, elixir-format
#: lib/block_scout_web/templates/api_docs/_action_tile.html.eex:30
#: lib/block_scout_web/templates/api_docs/_action_tile.html.eex:33
msgid "Module"
msgstr ""
#, elixir-format
#: lib/block_scout_web/templates/api_docs/_action_tile.html.eex:39
#: lib/block_scout_web/templates/api_docs/_action_tile.html.eex:54
#: lib/block_scout_web/templates/api_docs/_action_tile.html.eex:42
#: lib/block_scout_web/templates/api_docs/_action_tile.html.eex:57
msgid "Must be set to:"
msgstr ""
#, elixir-format
#: lib/block_scout_web/templates/api_docs/_action_tile.html.eex:24
#: lib/block_scout_web/templates/api_docs/_action_tile.html.eex:27
msgid "Name"
msgstr ""
#, elixir-format
#: lib/block_scout_web/templates/api_docs/_action_tile.html.eex:4
#: lib/block_scout_web/templates/api_docs/_action_tile.html.eex:6
msgid "POST"
msgstr ""
#, elixir-format
#: lib/block_scout_web/templates/api_docs/_action_tile.html.eex:17
#: lib/block_scout_web/templates/api_docs/_action_tile.html.eex:20
msgid "Parameters"
msgstr ""
#, elixir-format
#: lib/block_scout_web/templates/api_docs/_action_tile.html.eex:112
#: lib/block_scout_web/templates/api_docs/_action_tile.html.eex:115
msgid "Request URL"
msgstr ""
#, elixir-format
#: lib/block_scout_web/templates/api_docs/_action_tile.html.eex:128
#: lib/block_scout_web/templates/api_docs/_action_tile.html.eex:131
msgid "Response Body"
msgstr ""
#, elixir-format
#: lib/block_scout_web/templates/api_docs/_action_tile.html.eex:101
#: lib/block_scout_web/templates/api_docs/_action_tile.html.eex:138
#: lib/block_scout_web/templates/api_docs/_action_tile.html.eex:104
#: lib/block_scout_web/templates/api_docs/_action_tile.html.eex:141
msgid "Responses"
msgstr ""
#, elixir-format
#: lib/block_scout_web/templates/api_docs/_action_tile.html.eex:119
#: lib/block_scout_web/templates/api_docs/_action_tile.html.eex:122
msgid "Server Response"
msgstr ""
@ -980,19 +980,19 @@ msgid "This API is provided for developers transitioning their applications from
msgstr ""
#, elixir-format
#: lib/block_scout_web/templates/api_docs/_action_tile.html.eex:18
#: lib/block_scout_web/templates/api_docs/_action_tile.html.eex:21
msgid "Try it out"
msgstr ""
#, elixir-format
#: lib/block_scout_web/templates/api_docs/_action_tile.html.eex:32
#: lib/block_scout_web/templates/api_docs/_action_tile.html.eex:47
#: lib/block_scout_web/templates/api_docs/_action_tile.html.eex:63
#: lib/block_scout_web/templates/api_docs/_action_tile.html.eex:35
#: lib/block_scout_web/templates/api_docs/_action_tile.html.eex:50
#: lib/block_scout_web/templates/api_docs/_action_tile.html.eex:66
msgid "required"
msgstr ""
#, elixir-format
#: lib/block_scout_web/templates/api_docs/_action_tile.html.eex:35
#: lib/block_scout_web/templates/api_docs/_action_tile.html.eex:50
#: lib/block_scout_web/templates/api_docs/_action_tile.html.eex:38
#: lib/block_scout_web/templates/api_docs/_action_tile.html.eex:53
msgid "string"
msgstr ""

Loading…
Cancel
Save