1
0
mirror of https://github.com/danbee/chess synced 2025-03-04 08:39:06 +00:00
chess/web/templates/game/index.html.eex

23 lines
707 B
Elixir

<h2>Listing games</h2>
<table class="table">
<tbody>
<%= for game <- @games do %>
<tr>
<td>
<%= link "Started on #{Timex.format!(game.inserted_at, "%b %e at %I:%M%P", :strftime)}", to: game_path(@conn, :show, game), class: "btn btn-default btn-xs" %>
</td>
<td class="text-right">
<%= link "Delete", to: game_path(@conn, :delete, game), method: :delete, data: [confirm: "Are you sure?"], class: "btn btn-danger btn-xs" %>
</td>
</tr>
<% end %>
</tbody>
</table>
<%= form_for @changeset, game_path(@conn, :create), fn f -> %>
<div class="form-group">
<%= submit "Create game", class: "btn btn-primary" %>
</div>
<% end %>