Admin pages.

This commit is contained in:
codevictory
2021-04-22 21:00:55 +03:00
parent b06bae000f
commit cebe145c32
10 changed files with 121 additions and 22 deletions

View File

@@ -0,0 +1,36 @@
<h1>Esiintyjät - HALLINTA</h1>
<table>
<thead>
<tr>
<th>Fname</th>
<th>Lname</th>
<th>Email</th>
<th>Tel</th>
<th>Confirmed</th>
<th>Notes</th>
<th></th>
</tr>
</thead>
<tbody>
<%= for performer <- @performers do %>
<tr>
<td><%= performer.fname %></td>
<td><%= performer.lname %></td>
<td><%= performer.email %></td>
<td><%= performer.tel %></td>
<td><%= performer.confirmed %></td>
<td><%= performer.notes %></td>
<td>
<span><%= link "Show", to: Routes.performer_path(@conn, :show, performer) %></span>
<span><%= link "Edit", to: Routes.admin_performer_path(@conn, :edit, performer) %></span>
<span><%= link "Delete", to: Routes.admin_performer_path(@conn, :delete, performer), method: :delete, data: [confirm: "Are you sure?"] %></span>
</td>
</tr>
<% end %>
</tbody>
</table>
<span><%= link "New Performance", to: Routes.admin_performance_path(@conn, :new) %></span>

View File

@@ -22,15 +22,8 @@
<td><%= performer.tel %></td>
<td><%= performer.confirmed %></td>
<td><%= performer.notes %></td>
<td>
<span><%= link "Show", to: Routes.performer_path(@conn, :show, performer) %></span>
<span><%= link "Edit", to: Routes.admin_performer_path(@conn, :edit, performer) %></span>
<span><%= link "Delete", to: Routes.admin_performer_path(@conn, :delete, performer), method: :delete, data: [confirm: "Are you sure?"] %></span>
</td>
</tr>
<% end %>
</tbody>
</table>
<span><%= link "New Performance", to: Routes.admin_performance_path(@conn, :new) %></span>
<%= link "Hallinta", to: Routes.admin_performer_path(@conn, :admin) %>