diff options
author | Tor Andersson <tor@ccxvii.net> | 2021-11-20 19:47:08 +0100 |
---|---|---|
committer | Tor Andersson <tor@ccxvii.net> | 2021-11-21 12:48:15 +0100 |
commit | a1fe768c6d40c7c885db1c9843c61527cbe583e3 (patch) | |
tree | c397e7d6796049607d6348c538621d1e8809a847 /views/games.ejs | |
parent | d1318d147297161691f5048e1f2cb4e516159144 (diff) | |
download | server-a1fe768c6d40c7c885db1c9843c61527cbe583e3.tar.gz |
Rewrite view templates to use Pug engine.
Diffstat (limited to 'views/games.ejs')
-rw-r--r-- | views/games.ejs | 51 |
1 files changed, 0 insertions, 51 deletions
diff --git a/views/games.ejs b/views/games.ejs deleted file mode 100644 index 90b2f68..0000000 --- a/views/games.ejs +++ /dev/null @@ -1,51 +0,0 @@ -<%- include('header', { title: "All Public Games", refresh: (user ? 300 : 0) }) -%> - -<h2>Open</h2> -<table> -<tr><th>ID<th>Title<th>Scenario<th>Players<th>Description<th>Created<th> -<% if (open_games.length > 0) { %> -<% open_games.forEach((row) => { %> -<tr> -<td><%= row.game_id %> -<td class="w"><a href="/info/<%= row.title_id %>"><%= row.title_name %></a> -<td class="w"><%= row.scenario %> -<td><%- row.player_names %> -<td><%= row.description %> -<td class="w"><%= row.ctime %> -<td class="command"><a href="/join/<%= row.game_id %>">Join</a> -<% }); } else { %> -<tr><td colspan="7">No open games. -<% } %> -</table> - -<h2>Active</h2> -<table> -<tr><th>ID<th>Title<th>Scenario<th>Players<th>Description<th>Changed<th>Active<th> -<% if (active_games.length > 0) { %> -<% active_games.forEach((row) => { %> -<tr> -<td><%= row.game_id %> -<td class="w"><a href="/info/<%= row.title_id %>"><%= row.title_name %></a> -<td class="w"><%= row.scenario %> -<td><%- row.player_names %> -<td><%= row.description %> -<td class="w"><%= row.mtime %> -<% if (row.is_active) { %> -<td class="is_active"><%= row.active %> -<% } else { %> -<td><%= row.active %> -<% } %> -<% if (row.is_yours) { %> -<% if (row.is_shared) { %> -<td class="command"><a href="/join/<%= row.game_id %>">View</a> -<% } else { %> -<td class="command"><a href="/<%- row.title_id %>/play:<%- row.game_id %>:<%- row.your_role %>">View</a> -<% } %> -<% } else { %> -<td class="command"><a href="/<%- row.title_id %>/play:<%- row.game_id %>">View</a> -<% } %> -<% }); %> -<% } else { %> -<tr><td colspan="8">No active games. -<% } %> -</table> |