diff options
author | Star Rauchenberger <fefferburbia@gmail.com> | 2023-10-29 14:02:34 -0400 |
---|---|---|
committer | Star Rauchenberger <fefferburbia@gmail.com> | 2023-10-29 14:02:34 -0400 |
commit | d672465c2be3dc54463a92a3f1c4aa23447bc5c8 (patch) | |
tree | acbf66abf9c8b3b4f5387de6c2ca6e396a403ce6 /app/views | |
parent | a8821b425351cdd8a5f69f5b60e389a1ae81cb72 (diff) | |
download | wittle-d672465c2be3dc54463a92a3f1c4aa23447bc5c8.tar.gz wittle-d672465c2be3dc54463a92a3f1c4aa23447bc5c8.tar.bz2 wittle-d672465c2be3dc54463a92a3f1c4aa23447bc5c8.zip |
better display of completions
Diffstat (limited to 'app/views')
-rw-r--r-- | app/views/wittle/puzzles/show.html.haml | 16 |
1 files changed, 11 insertions, 5 deletions
diff --git a/app/views/wittle/puzzles/show.html.haml b/app/views/wittle/puzzles/show.html.haml index d5d8b00..75ae288 100644 --- a/app/views/wittle/puzzles/show.html.haml +++ b/app/views/wittle/puzzles/show.html.haml | |||
@@ -14,12 +14,18 @@ | |||
14 | #scores | 14 | #scores |
15 | #by-time | 15 | #by-time |
16 | %h2 Fastest Solves | 16 | %h2 Fastest Solves |
17 | %ol | 17 | %table |
18 | - @puzzle.scores.where("seconds_taken IS NOT NULL").order(seconds_taken: :asc).each do |score| | 18 | - @puzzle.scores.where("seconds_taken IS NOT NULL").order(seconds_taken: :asc).each do |score| |
19 | %li= score.name | 19 | %tr |
20 | %td #{(i + 1)}. | ||
21 | %td= score.name | ||
22 | %td | ||
20 | #by-when | 23 | #by-when |
21 | %h2 Completion Order | 24 | %h2 Completion Order |
22 | %ol | 25 | %table |
23 | - @puzzle.scores.order(created_at: :desc).each do |score| | 26 | - @puzzle.scores.order(created_at: :asc).each_with_index do |score, i| |
24 | %li= score.name | 27 | %tr |
28 | %td #{(i + 1)}. | ||
29 | %td= score.name | ||
30 | %td= score.created_at.getlocal().strftime("%-I:%M:%S%P") | ||
25 | = render partial: "handle_puzzle" | 31 | = render partial: "handle_puzzle" |