summaryrefslogtreecommitdiff
path: root/views
diff options
context:
space:
mode:
authorTor Andersson <tor@ccxvii.net>2022-06-09 17:19:51 +0200
committerTor Andersson <tor@ccxvii.net>2022-06-09 17:42:23 +0200
commit974aedf2e765ce8e102b18eeb67a3c2995801349 (patch)
tree25add4010dc300c8c686cb3efc4e17adc0f6d68a /views
parentff4bc953f16002befbd6cf8dd120a96cfeca26fe (diff)
downloadserver-974aedf2e765ce8e102b18eeb67a3c2995801349.tar.gz
Show player name instead of role in Turn and Result columns.
Diffstat (limited to 'views')
-rw-r--r--views/head.pug26
-rw-r--r--views/join.pug2
2 files changed, 11 insertions, 17 deletions
diff --git a/views/head.pug b/views/head.pug
index 9c248a4..0a1052a 100644
--- a/views/head.pug
+++ b/views/head.pug
@@ -46,7 +46,7 @@ mixin gametable(status,table,hide_title=0)
th Description
case status
when 0
- th Created
+ th Date
when 1
th Changed
th Turn
@@ -60,33 +60,27 @@ mixin gametable(status,table,hide_title=0)
td: a(href="/join/"+row.game_id)= row.game_id
unless hide_title
td.w: a(href="/"+row.title_id)= row.title_name
- if true
- td= row.scenario
- else
- td= row.options !== "None" ? row.scenario + ", " + row.options : row.scenario
+ td= row.scenario
if row.player_names
td!= row.player_names
else
td.error Nobody
td= row.description
+ if row.status === 0
+ td.w= row.ctime
+ else
+ td.w= row.mtime
case status
- when 0
- td.w= row.ctime
when 1
- td.w= row.mtime
if (row.is_active)
- td.is_active= row.active
+ td.is_active!= row.active
else
- td= row.active
+ td!= row.active
when 2
- td.w= row.mtime
- td= row.result
+ td!= row.result
td.command
if status === 0
- if row.is_ready
- a(href="/join/"+row.game_id) Enter
- else
- a(href="/join/"+row.game_id) Join
+ a(href="/join/"+row.game_id) Join
else if status === 1
if row.is_yours
if row.is_shared
diff --git a/views/join.pug b/views/join.pug
index e195bf9..bc1567a 100644
--- a/views/join.pug
+++ b/views/join.pug
@@ -37,7 +37,7 @@ html
br
| Scenario: #{game.scenario}
br
- | Options: #{game.options}
+ | Options: #{game.human_options}
p= game.description || "No description."