32 lines
913 B
Elixir
32 lines
913 B
Elixir
<h1>Listing Clothes</h1>
|
|
<%= for {shop, list_of_clothes} <- @clothes_map do %>
|
|
<h2> <%= shop %></h2>
|
|
<table>
|
|
<thead>
|
|
<tr>
|
|
<th>Name</th>
|
|
<th>Color</th>
|
|
<th>Game</th>
|
|
<th></th>
|
|
</tr>
|
|
</thead>
|
|
<tbody>
|
|
<%= for clothes <- list_of_clothes do %>
|
|
<tr>
|
|
<td><%= clothes.name %></td>
|
|
<td><%= clothes.color %></td>
|
|
<td><%= clothes.game %></td>
|
|
|
|
<td>
|
|
<span><%= link "Show", to: Routes.clothes_path(@conn, :show, clothes) %></span>
|
|
<span><%= link "Edit", to: Routes.clothes_path(@conn, :edit, clothes) %></span>
|
|
<span><%= link "Delete", to: Routes.clothes_path(@conn, :delete, clothes), method: :delete, data: [confirm: "Are you sure?"] %></span>
|
|
</td>
|
|
</tr>
|
|
<% end %>
|
|
</tbody>
|
|
</table>
|
|
<% end %>
|
|
|
|
<span><%= link "New Clothes", to: Routes.clothes_path(@conn, :new) %></span>
|