Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -3,17 +3,17 @@
<div class="panel-heading">Key Details</div>
<div class="panel-body">
<ul>
<li><strong>User E-mail:</strong> <%= @user.email %></li>
<li><strong>Key:</strong> <%= @key.key %></li>
<li><strong>User E-mail:</strong> {@user.email}</li>
<li><strong>Key:</strong> {@key.key}</li>
</ul>
</div>
</div>

<%= render("form.html",
{render("form.html",
changeset: @changeset,
action: admin_key_path(@conn, :update, @user, @key),
method: :put,
api_versions: @api_versions
) %>
)}

<span><%= link("Back", to: admin_user_path(@conn, :show, @user)) %></span>
<span>{link("Back", to: admin_user_path(@conn, :show, @user))}</span>
Original file line number Diff line number Diff line change
Expand Up @@ -6,49 +6,49 @@
<% end %>

<div class="form-group">
<%= label(
{label(
f,
"Per-Minute Limit (default #{ApiWeb.ApiViewHelpers.default_registered_per_minute()})",
class: "control-label"
) %>
<%= text_input(f, :per_minute_limit,
)}
{text_input(f, :per_minute_limit,
value: ApiWeb.ApiViewHelpers.per_minute_limit_value(@changeset.data),
class: "form-control"
) %>
<%= error_tag(f, :daily_limit) %>
)}
{error_tag(f, :daily_limit)}
</div>

<div class="form-group">
<%= label(f, :description, class: "control-label") %>
<%= text_input(f, :description, class: "form-control") %>
<%= error_tag(f, :description) %>
{label(f, :description, class: "control-label")}
{text_input(f, :description, class: "form-control")}
{error_tag(f, :description)}
</div>

<div class="form-group">
<%= label(f, :api_version, class: "control-label") %>
<%= select(f, :api_version, @api_versions, class: "form-control") %>
<%= error_tag(f, :api_version) %>
{label(f, :api_version, class: "control-label")}
{select(f, :api_version, @api_versions, class: "form-control")}
{error_tag(f, :api_version)}
</div>

<div class="form-group">
<%= label(f, "Allowed domains (comma separated list of domains or *)", class: "control-label") %>
<%= text_input(f, :allowed_domains, class: "form-control") %>
<%= error_tag(f, :allowed_domains) %>
{label(f, "Allowed domains (comma separated list of domains or *)", class: "control-label")}
{text_input(f, :allowed_domains, class: "form-control")}
{error_tag(f, :allowed_domains)}
</div>

<div class="form-group">
<%= label(f, :approved, class: "control-label") %>
<%= checkbox(f, :approved, class: "checkbox") %>
<%= error_tag(f, :approved) %>
{label(f, :approved, class: "control-label")}
{checkbox(f, :approved, class: "checkbox")}
{error_tag(f, :approved)}
</div>

<div class="form-group">
<%= label(f, :locked, class: "control-label") %>
<%= checkbox(f, :locked, class: "checkbox") %>
<%= error_tag(f, :locked) %>
{label(f, :locked, class: "control-label")}
{checkbox(f, :locked, class: "checkbox")}
{error_tag(f, :locked)}
</div>

<div class="form-group">
<%= submit("Submit", class: "btn btn-primary") %>
{submit("Submit", class: "btn btn-primary")}
</div>
<% end %>
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
<h2>Find user by key</h2>
<%= render("search.html",
{render("search.html",
conn: @conn,
action: admin_key_path(@conn, :find_user_by_key),
method: :post
) %>
)}

<h2>Pending Key Approvals</h2>
<table class="table">
Expand All @@ -17,9 +17,9 @@
<%= for {key, user} <- @key_requests do %>
<tr data-key-id={key.key}>
<td>
<%= link(user.email, to: admin_user_path(@conn, :show, user), target: "_blank") %>
{link(user.email, to: admin_user_path(@conn, :show, user), target: "_blank")}
</td>
<td><%= key.requested_date %></td>
<td>{key.requested_date}</td>
</tr>
<% end %>
</tbody>
Expand Down
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
<%= form_for @conn, @action, [as: :search], fn f -> %>
<div class="form-group">
<%= text_input(f, :key, class: "form-control") %>
{text_input(f, :key, class: "form-control")}
</div>

<div class="form-group">
<%= submit("Search", class: "btn btn-primary") %>
{submit("Search", class: "btn btn-primary")}
</div>
<% end %>
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
<h2>Edit User</h2>

<%= render("form.html",
{render("form.html",
changeset: @changeset,
action: admin_user_path(@conn, :update, @user),
method: :put
) %>
)}

<span><%= link("Back", to: admin_user_path(@conn, :index)) %></span>
<span>{link("Back", to: admin_user_path(@conn, :index))}</span>
Original file line number Diff line number Diff line change
Expand Up @@ -6,48 +6,48 @@
<% end %>

<div class="form-group">
<%= label(f, :email, class: "control-label") %>
<%= email_input(f, :email, class: "form-control") %>
<%= error_tag(f, :email) %>
{label(f, :email, class: "control-label")}
{email_input(f, :email, class: "form-control")}
{error_tag(f, :email)}
</div>

<div class="form-group">
<%= label(f, :username, class: "control-label") %>
<%= text_input(f, :username, class: "form-control") %>
<%= error_tag(f, :username) %>
{label(f, :username, class: "control-label")}
{text_input(f, :username, class: "form-control")}
{error_tag(f, :username)}
</div>

<div class="form-group">
<%= label(f, :role, class: "control-label") %>
<%= text_input(f, :role, class: "form-control") %>
<%= error_tag(f, :role) %>
{label(f, :role, class: "control-label")}
{text_input(f, :role, class: "form-control")}
{error_tag(f, :role)}
</div>

<div class="form-group">
<%= label(f, :phone, class: "control-label") %>
<%= text_input(f, :phone, class: "form-control") %>
<%= error_tag(f, :phone) %>
{label(f, :phone, class: "control-label")}
{text_input(f, :phone, class: "form-control")}
{error_tag(f, :phone)}
</div>

<div class="form-group">
<%= label(f, :join_date, class: "control-label") %>
<%= datetime_select(f, :join_date, class: "form-control") %>
<%= error_tag(f, :join_date) %>
{label(f, :join_date, class: "control-label")}
{datetime_select(f, :join_date, class: "form-control")}
{error_tag(f, :join_date)}
</div>

<div class="form-group">
<%= label(f, :active, class: "control-label") %>
<%= checkbox(f, :active, class: "checkbox") %>
<%= error_tag(f, :active) %>
{label(f, :active, class: "control-label")}
{checkbox(f, :active, class: "checkbox")}
{error_tag(f, :active)}
</div>

<div class="form-group">
<%= label(f, :blocked, class: "control-label") %>
<%= checkbox(f, :blocked, class: "checkbox") %>
<%= error_tag(f, :blocked) %>
{label(f, :blocked, class: "control-label")}
{checkbox(f, :blocked, class: "checkbox")}
{error_tag(f, :blocked)}
</div>

<div class="form-group">
<%= submit("Submit", class: "btn btn-primary") %>
{submit("Submit", class: "btn btn-primary")}
</div>
<% end %>
Original file line number Diff line number Diff line change
Expand Up @@ -17,11 +17,11 @@
<tbody>
<%= for user <- @users do %>
<tr>
<td><%= user.email %></td>
<td><%= user.username %></td>
<td><%= user.role %></td>
<td><%= user.phone %></td>
<td><%= user.join_date %></td>
<td>{user.email}</td>
<td>{user.username}</td>
<td>{user.role}</td>
<td>{user.phone}</td>
<td>{user.join_date}</td>
<td>
<%= if user.active == true do %>
Expand All @@ -40,30 +40,30 @@

<td class="text-right">
<span>
<%= link("Show",
{link("Show",
to: admin_user_path(@conn, :show, user),
class: "btn btn-default btn-xs"
) %>
)}
</span>
<span>
<%= link("Edit",
{link("Edit",
to: admin_user_path(@conn, :edit, user),
class: "btn btn-default btn-xs"
) %>
)}
</span>
<span>
<%= link("Delete",
{link("Delete",
to: admin_user_path(@conn, :delete, user),
method: :delete,
data: [confirm: "Are you sure?"],
style: "display: inline-block",
class: "btn btn-danger btn-xs"
) %>
)}
</span>
</td>
</tr>
<% end %>
</tbody>
</table>

<span><%= link("New User", to: admin_user_path(@conn, :new)) %></span>
<span>{link("New User", to: admin_user_path(@conn, :new))}</span>
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
<h2>New User</h2>

<%= render("form.html",
{render("form.html",
changeset: @changeset,
action: admin_user_path(@conn, :create)
) %>
)}

<span><%= link("Back", to: admin_user_path(@conn, :index)) %></span>
<span>{link("Back", to: admin_user_path(@conn, :index))}</span>
Loading