Survival instructions editable.
This commit is contained in:
30
lib/runosaari_web/templates/survival/admin.html.eex
Normal file
30
lib/runosaari_web/templates/survival/admin.html.eex
Normal file
@@ -0,0 +1,30 @@
|
||||
<section class="main">
|
||||
<h1>HALLINTA - Survival listan kohdat</h1>
|
||||
|
||||
<table>
|
||||
<thead>
|
||||
<tr>
|
||||
<th>Sisältö</th>
|
||||
<th>Priotiteetti</th>
|
||||
|
||||
<th></th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
<%= for survival <- @survival_items do %>
|
||||
<tr>
|
||||
<td><%= survival.content %></td>
|
||||
<td><%= survival.seqnum %></td>
|
||||
|
||||
<td class="actions">
|
||||
<span><%= link "Lisätietoja", to: Routes.admin_survival_path(@conn, :show, survival) %></span>
|
||||
<span><%= link "Muokkaa", to: Routes.admin_survival_path(@conn, :edit, survival) %></span>
|
||||
<span><%= link "Poista", to: Routes.admin_survival_path(@conn, :delete, survival), method: :delete, data: [confirm: "Oletko varma?"] %></span>
|
||||
</td>
|
||||
</tr>
|
||||
<% end %>
|
||||
</tbody>
|
||||
</table>
|
||||
|
||||
<span><%= link "Luo uusi survival kohta", to: Routes.admin_survival_path(@conn, :new) %></span>
|
||||
</section>
|
||||
7
lib/runosaari_web/templates/survival/edit.html.eex
Normal file
7
lib/runosaari_web/templates/survival/edit.html.eex
Normal file
@@ -0,0 +1,7 @@
|
||||
<section class="main">
|
||||
<h1>Muokkaa survival listan kohtaa</h1>
|
||||
|
||||
<%= render "form.html", Map.put(assigns, :action, Routes.admin_survival_path(@conn, :update, @survival)) %>
|
||||
|
||||
<span><%= link "Takaisin", to: Routes.admin_survival_path(@conn, :admin) %></span>
|
||||
</section>
|
||||
19
lib/runosaari_web/templates/survival/form.html.eex
Normal file
19
lib/runosaari_web/templates/survival/form.html.eex
Normal file
@@ -0,0 +1,19 @@
|
||||
<%= form_for @changeset, @action, fn f -> %>
|
||||
<%= if @changeset.action do %>
|
||||
<div class="alert alert-danger">
|
||||
<p>Joku kentistä on tyhjä.</p>
|
||||
</div>
|
||||
<% end %>
|
||||
|
||||
<%= label f, :content, "Sisältö" %>
|
||||
<%= textarea f, :content %>
|
||||
<%= error_tag f, :content %>
|
||||
|
||||
<%= label f, :seqnum, "Prioritetti (1 on korkein)" %>
|
||||
<%= number_input f, :seqnum %>
|
||||
<%= error_tag f, :seqnum %>
|
||||
|
||||
<div>
|
||||
<%= submit "Tallenna" %>
|
||||
</div>
|
||||
<% end %>
|
||||
5
lib/runosaari_web/templates/survival/new.html.eex
Normal file
5
lib/runosaari_web/templates/survival/new.html.eex
Normal file
@@ -0,0 +1,5 @@
|
||||
<h1>Uusi survival listan kohta</h1>
|
||||
|
||||
<%= render "form.html", Map.put(assigns, :action, Routes.admin_survival_path(@conn, :create)) %>
|
||||
|
||||
<span><%= link "Takaisin", to: Routes.admin_survival_path(@conn, :admin) %></span>
|
||||
20
lib/runosaari_web/templates/survival/show.html.eex
Normal file
20
lib/runosaari_web/templates/survival/show.html.eex
Normal file
@@ -0,0 +1,20 @@
|
||||
<section class="main">
|
||||
<h1>Survival listan kohdan tiedot</h1>
|
||||
|
||||
<ul>
|
||||
|
||||
<li>
|
||||
<strong>Sisältö:</strong>
|
||||
<%= @survival.content %>
|
||||
</li>
|
||||
|
||||
<li>
|
||||
<strong>Prioriteetti:</strong>
|
||||
<%= @survival.seqnum %>
|
||||
</li>
|
||||
|
||||
</ul>
|
||||
|
||||
<span><%= link "Muokkaa", to: Routes.admin_survival_path(@conn, :edit, @survival) %></span>
|
||||
<span><%= link "Takaisin", to: Routes.admin_survival_path(@conn, :admin) %></span>
|
||||
</section>
|
||||
Reference in New Issue
Block a user