add shop name to lists in clothes index
This commit is contained in:
@@ -1,31 +1,31 @@
|
||||
<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>
|
||||
|
||||
<table>
|
||||
<thead>
|
||||
<tr>
|
||||
<th>Name</th>
|
||||
<th>Location</th>
|
||||
<th>Game</th>
|
||||
|
||||
<th></th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
<%= for clothes <- @clothes do %>
|
||||
<tr>
|
||||
<td><%= clothes.name %></td>
|
||||
<td><%= clothes.color %></td>
|
||||
<td><%= clothes.location %></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>
|
||||
<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 %>
|
||||
</tbody>
|
||||
</table>
|
||||
|
||||
<span><%= link "New Clothes", to: Routes.clothes_path(@conn, :new) %></span>
|
||||
|
||||
Reference in New Issue
Block a user