5
lib/eventos_web/templates/group/edit.html.eex
Normal file
5
lib/eventos_web/templates/group/edit.html.eex
Normal file
@@ -0,0 +1,5 @@
|
||||
<h2>Edit Group</h2>
|
||||
|
||||
<%= render "form.html", Map.put(assigns, :action, group_path(@conn, :update, @group)) %>
|
||||
|
||||
<span><%= link "Back", to: group_path(@conn, :index) %></span>
|
||||
41
lib/eventos_web/templates/group/form.html.eex
Normal file
41
lib/eventos_web/templates/group/form.html.eex
Normal file
@@ -0,0 +1,41 @@
|
||||
<%= 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, :title, class: "control-label" %>
|
||||
<%= text_input f, :title, class: "form-control" %>
|
||||
<%= error_tag f, :title %>
|
||||
</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, :suspended, class: "control-label" %>
|
||||
<%= checkbox f, :suspended, class: "checkbox" %>
|
||||
<%= error_tag f, :suspended %>
|
||||
</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">
|
||||
<%= label f, :uri, class: "control-label" %>
|
||||
<%= text_input f, :uri, class: "form-control" %>
|
||||
<%= error_tag f, :uri %>
|
||||
</div>
|
||||
|
||||
<div class="form-group">
|
||||
<%= submit "Submit", class: "btn btn-primary" %>
|
||||
</div>
|
||||
<% end %>
|
||||
34
lib/eventos_web/templates/group/index.html.eex
Normal file
34
lib/eventos_web/templates/group/index.html.eex
Normal file
@@ -0,0 +1,34 @@
|
||||
<h2>Listing Groups</h2>
|
||||
|
||||
<table class="table">
|
||||
<thead>
|
||||
<tr>
|
||||
<th>Title</th>
|
||||
<th>Description</th>
|
||||
<th>Suspended</th>
|
||||
<th>Url</th>
|
||||
<th>Uri</th>
|
||||
|
||||
<th></th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
<%= for group <- @groups do %>
|
||||
<tr>
|
||||
<td><%= group.title %></td>
|
||||
<td><%= group.description %></td>
|
||||
<td><%= group.suspended %></td>
|
||||
<td><%= group.url %></td>
|
||||
<td><%= group.uri %></td>
|
||||
|
||||
<td class="text-right">
|
||||
<span><%= link "Show", to: group_path(@conn, :show, group), class: "btn btn-default btn-xs" %></span>
|
||||
<span><%= link "Edit", to: group_path(@conn, :edit, group), class: "btn btn-default btn-xs" %></span>
|
||||
<span><%= link "Delete", to: group_path(@conn, :delete, group), method: :delete, data: [confirm: "Are you sure?"], class: "btn btn-danger btn-xs" %></span>
|
||||
</td>
|
||||
</tr>
|
||||
<% end %>
|
||||
</tbody>
|
||||
</table>
|
||||
|
||||
<span><%= link "New Group", to: group_path(@conn, :new) %></span>
|
||||
5
lib/eventos_web/templates/group/new.html.eex
Normal file
5
lib/eventos_web/templates/group/new.html.eex
Normal file
@@ -0,0 +1,5 @@
|
||||
<h2>New Group</h2>
|
||||
|
||||
<%= render "form.html", Map.put(assigns, :action, group_path(@conn, :create)) %>
|
||||
|
||||
<span><%= link "Back", to: group_path(@conn, :index) %></span>
|
||||
33
lib/eventos_web/templates/group/show.html.eex
Normal file
33
lib/eventos_web/templates/group/show.html.eex
Normal file
@@ -0,0 +1,33 @@
|
||||
<h2>Show Group</h2>
|
||||
|
||||
<ul>
|
||||
|
||||
<li>
|
||||
<strong>Title:</strong>
|
||||
<%= @group.title %>
|
||||
</li>
|
||||
|
||||
<li>
|
||||
<strong>Description:</strong>
|
||||
<%= @group.description %>
|
||||
</li>
|
||||
|
||||
<li>
|
||||
<strong>Suspended:</strong>
|
||||
<%= @group.suspended %>
|
||||
</li>
|
||||
|
||||
<li>
|
||||
<strong>Url:</strong>
|
||||
<%= @group.url %>
|
||||
</li>
|
||||
|
||||
<li>
|
||||
<strong>Uri:</strong>
|
||||
<%= @group.uri %>
|
||||
</li>
|
||||
|
||||
</ul>
|
||||
|
||||
<span><%= link "Edit", to: group_path(@conn, :edit, @group) %></span>
|
||||
<span><%= link "Back", to: group_path(@conn, :index) %></span>
|
||||
Reference in New Issue
Block a user