diff options
Diffstat (limited to 'app/views/games/index.html.haml')
| -rw-r--r-- | app/views/games/index.html.haml | 26 |
1 files changed, 26 insertions, 0 deletions
| diff --git a/app/views/games/index.html.haml b/app/views/games/index.html.haml new file mode 100644 index 0000000..56c5a05 --- /dev/null +++ b/app/views/games/index.html.haml | |||
| @@ -0,0 +1,26 @@ | |||
| 1 | - title "Games" | ||
| 2 | .breadcrumb= link_to "← Back to home page", root_path | ||
| 3 | %h2#games-title Games | ||
| 4 | %table#games-table | ||
| 5 | %thead | ||
| 6 | %tr | ||
| 7 | %th= sortable "title" | ||
| 8 | %th= sortable "status" | ||
| 9 | %th= sortable "score" | ||
| 10 | %th= sortable "progress" | ||
| 11 | %tbody | ||
| 12 | - @games.each do |game| | ||
| 13 | %tr{ class: cycle("even", "odd") } | ||
| 14 | %td | ||
| 15 | %span.game-title= game.title | ||
| 16 | - unless game.started_on.blank? | ||
| 17 | %span.game-started | ||
| 18 | Started on | ||
| 19 | %time= game.started_on | ||
| 20 | - unless game.finished_on.blank? | ||
| 21 | %span.game-finished | ||
| 22 | Finished on | ||
| 23 | %time= game.finished_on | ||
| 24 | %td= game.status | ||
| 25 | %td= game.score | ||
| 26 | %td.game-progress= simple_format game.progress | ||
