about summary refs log tree commit diff stats
path: root/app/views
diff options
context:
space:
mode:
authorKelly Rauchenberger <fefferburbia@gmail.com>2019-03-13 15:48:14 -0400
committerKelly Rauchenberger <fefferburbia@gmail.com>2019-03-13 15:48:14 -0400
commitb62d43ccde70aa6fccf5341e57a695a2cfb289c1 (patch)
tree8e612d68c89e8358c80663f2dcfab35f33ba89c3 /app/views
parentb6018ad11156d8b38a87dc682064495cd788608c (diff)
downloadthoughts-b62d43ccde70aa6fccf5341e57a695a2cfb289c1.tar.gz
thoughts-b62d43ccde70aa6fccf5341e57a695a2cfb289c1.tar.bz2
thoughts-b62d43ccde70aa6fccf5341e57a695a2cfb289c1.zip
Game list is sortable
Diffstat (limited to 'app/views')
-rw-r--r--app/views/games/index.html.haml45
1 files changed, 24 insertions, 21 deletions
diff --git a/app/views/games/index.html.haml b/app/views/games/index.html.haml index f7e7a44..56c5a05 100644 --- a/app/views/games/index.html.haml +++ b/app/views/games/index.html.haml
@@ -1,23 +1,26 @@
1- title "Games" 1- title "Games"
2%h2 Games 2.breadcrumb= link_to "← Back to home page", root_path
3%h2#games-title Games
3%table#games-table 4%table#games-table
4 %tr 5 %thead
5 %th Title 6 %tr
6 %th Status 7 %th= sortable "title"
7 %th Score 8 %th= sortable "status"
8 %th Progress 9 %th= sortable "score"
9 - @games.each do |game| 10 %th= sortable "progress"
10 %tr{ class: cycle("even", "odd") } 11 %tbody
11 %td 12 - @games.each do |game|
12 %span.game-title= game.title 13 %tr{ class: cycle("even", "odd") }
13 - unless game.started_on.blank? 14 %td
14 %span.game-started 15 %span.game-title= game.title
15 Started on 16 - unless game.started_on.blank?
16 %time= game.started_on 17 %span.game-started
17 - unless game.finished_on.blank? 18 Started on
18 %span.game-finished 19 %time= game.started_on
19 Finished on 20 - unless game.finished_on.blank?
20 %time= game.finished_on 21 %span.game-finished
21 %td= game.status 22 Finished on
22 %td= game.score 23 %time= game.finished_on
23 %td.game-progress= simple_format game.progress 24 %td= game.status
25 %td= game.score
26 %td.game-progress= simple_format game.progress