33 lines
849 B
Elixir
33 lines
849 B
Elixir
<h1>Listing Clothes</h1>
|
|
<%= for {shop, map_of_clothes_by_type} <- @clothes_map do %>
|
|
<h2> <%= shop %></h2>
|
|
<%= for {type, map_of_clothes_by_name} <- map_of_clothes_by_type do %>
|
|
<h3> <%= type %></h3>
|
|
<table>
|
|
<thead>
|
|
<tr>
|
|
<th>Name</th>
|
|
<th>Color</th>
|
|
<th>Game</th>
|
|
<th></th>
|
|
</tr>
|
|
</thead>
|
|
<tbody>
|
|
<%= for {_name, list_of_clothes} <- map_of_clothes_by_name do %>
|
|
<%= 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>
|
|
</td>
|
|
</tr>
|
|
<% end %>
|
|
<% end %>
|
|
</tbody>
|
|
</table>
|
|
<% end %>
|
|
<% end %>
|