initial commit

Signed-off-by: Thomas Citharel <tcit@tcit.fr>
This commit is contained in:
Thomas Citharel
2017-12-08 09:58:14 +01:00
commit 90ceb4f6fe
181 changed files with 8219 additions and 0 deletions

View File

@@ -0,0 +1,5 @@
<h2>Edit Account</h2>
<%= render "form.html", Map.put(assigns, :action, account_path(@conn, :update, @account)) %>
<span><%= link "Back", to: account_path(@conn, :index) %></span>

View File

@@ -0,0 +1,65 @@
<%= form_for @changeset, @action, fn f -> %>
<%= if @changeset.action do %>
<div class="alert alert-danger">
<p>Oops, something went wrong! Please check the errors below.</p>
</div>
<% end %>
<div class="form-group">
<%= label f, :username, class: "control-label" %>
<%= text_input f, :username, class: "form-control" %>
<%= error_tag f, :username %>
</div>
<div class="form-group">
<%= label f, :domain, class: "control-label" %>
<%= text_input f, :domain, class: "form-control" %>
<%= error_tag f, :domain %>
</div>
<div class="form-group">
<%= label f, :display_name, class: "control-label" %>
<%= text_input f, :display_name, class: "form-control" %>
<%= error_tag f, :display_name %>
</div>
<div class="form-group">
<%= label f, :description, class: "control-label" %>
<%= text_input f, :description, class: "form-control" %>
<%= error_tag f, :description %>
</div>
<div class="form-group">
<%= label f, :private_key, class: "control-label" %>
<%= text_input f, :private_key, class: "form-control" %>
<%= error_tag f, :private_key %>
</div>
<div class="form-group">
<%= label f, :public_key, class: "control-label" %>
<%= text_input f, :public_key, class: "form-control" %>
<%= error_tag f, :public_key %>
</div>
<div class="form-group">
<%= label f, :suspended, class: "control-label" %>
<%= checkbox f, :suspended, class: "checkbox" %>
<%= error_tag f, :suspended %>
</div>
<div class="form-group">
<%= label f, :uri, class: "control-label" %>
<%= text_input f, :uri, class: "form-control" %>
<%= error_tag f, :uri %>
</div>
<div class="form-group">
<%= label f, :url, class: "control-label" %>
<%= text_input f, :url, class: "form-control" %>
<%= error_tag f, :url %>
</div>
<div class="form-group">
<%= submit "Submit", class: "btn btn-primary" %>
</div>
<% end %>

View File

@@ -0,0 +1,42 @@
<h2>Listing Accounts</h2>
<table class="table">
<thead>
<tr>
<th>Username</th>
<th>Domain</th>
<th>Display name</th>
<th>Description</th>
<th>Private key</th>
<th>Public key</th>
<th>Suspended</th>
<th>Uri</th>
<th>Url</th>
<th></th>
</tr>
</thead>
<tbody>
<%= for account <- @accounts do %>
<tr>
<td><%= account.username %></td>
<td><%= account.domain %></td>
<td><%= account.display_name %></td>
<td><%= account.description %></td>
<td><%= account.private_key %></td>
<td><%= account.public_key %></td>
<td><%= account.suspended %></td>
<td><%= account.uri %></td>
<td><%= account.url %></td>
<td class="text-right">
<span><%= link "Show", to: account_path(@conn, :show, account), class: "btn btn-default btn-xs" %></span>
<span><%= link "Edit", to: account_path(@conn, :edit, account), class: "btn btn-default btn-xs" %></span>
<span><%= link "Delete", to: account_path(@conn, :delete, account), method: :delete, data: [confirm: "Are you sure?"], class: "btn btn-danger btn-xs" %></span>
</td>
</tr>
<% end %>
</tbody>
</table>
<span><%= link "New Account", to: account_path(@conn, :new) %></span>

View File

@@ -0,0 +1,5 @@
<h2>New Account</h2>
<%= render "form.html", Map.put(assigns, :action, account_path(@conn, :create)) %>
<span><%= link "Back", to: account_path(@conn, :index) %></span>

View File

@@ -0,0 +1,53 @@
<h2>Show Account</h2>
<ul>
<li>
<strong>Username:</strong>
<%= @account.username %>
</li>
<li>
<strong>Domain:</strong>
<%= @account.domain %>
</li>
<li>
<strong>Display name:</strong>
<%= @account.display_name %>
</li>
<li>
<strong>Description:</strong>
<%= @account.description %>
</li>
<li>
<strong>Private key:</strong>
<%= @account.private_key %>
</li>
<li>
<strong>Public key:</strong>
<%= @account.public_key %>
</li>
<li>
<strong>Suspended:</strong>
<%= @account.suspended %>
</li>
<li>
<strong>Uri:</strong>
<%= @account.uri %>
</li>
<li>
<strong>Url:</strong>
<%= @account.url %>
</li>
</ul>
<span><%= link "Edit", to: account_path(@conn, :edit, @account) %></span>
<span><%= link "Back", to: account_path(@conn, :index) %></span>