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
Dan Barber d888ab8d83
Make sure the JS works in PhantomJS
PhantomJS does not implement `Object.assign` which is how we were
updating the state immutably. I've switched it over to use the
ImmutableJS library instead.
2016-12-22 10:28:33 +00:00

23 lines
733 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), [class: "create-game"], fn _f -> %>
<div class="form-group">
<%= submit "Create game", class: "btn btn-primary" %>
</div>
<% end %>