diff options
author | Tor Andersson <tor@ccxvii.net> | 2021-11-16 16:34:01 +0100 |
---|---|---|
committer | Tor Andersson <tor@ccxvii.net> | 2021-11-16 22:25:31 +0100 |
commit | 7b5ce7d3949755c12b663531ab5d0b3d3051de34 (patch) | |
tree | 27f152f8ba4c59f8a9116a43b903c7003bc4e671 /views/info.ejs | |
parent | 0030c0313852fbbc73ec0332a9b7d48b7b9ada52 (diff) | |
download | server-7b5ce7d3949755c12b663531ab5d0b3d3051de34.tar.gz |
Drop socket.io-passport module. Allow viewing games as guest.
Diffstat (limited to 'views/info.ejs')
-rw-r--r-- | views/info.ejs | 21 |
1 files changed, 10 insertions, 11 deletions
diff --git a/views/info.ejs b/views/info.ejs index f97b04e..7c98e21 100644 --- a/views/info.ejs +++ b/views/info.ejs @@ -5,8 +5,6 @@ Read more about the game on <a href="https://boardgamegeek.com/boardgame/<%= title.bgg %>">boardgamegeek.com</a>. -<% if (user) { %> - <h2>Open Games</h2> <table class="game"> <tr><th>ID<th>Scenario<th>Players<th>Description<th>Created<th> @@ -39,7 +37,11 @@ Read more about the game on <td class="description"><%= row.description %> <td class="time"><%= row.mtime %> <td class="<%= row.is_active ? "role is_active" : "role" %>"><%= row.active %> -<td class="command"><a href="/join/<%= row.game_id %>">Enter</a> +<% if (row.is_yours) { %> +<td class="command"><a href="/join/<%- row.game_id %>">Enter</a> +<% } else { %> +<td class="command"><a href="/play/<%- row.game_id %>/Observer">View</a> +<% } %> <% }); %> </table> <% } %> @@ -56,14 +58,11 @@ Read more about the game on <td class="description"><%= row.description %> <td class="time"><%= row.mtime %> <td class="result"><%= row.result %> -<td class="command"><a href="/join/<%= row.game_id %>">View</a> +<% if (row.is_yours) { %> +<td class="command"><a href="/join/<%= row.game_id %>">Enter</a> +<% } else { %> +<td class="command"><a href="/play/<%- row.game_id %>/Observer">View</a> +<% } %> <% }); %> </table> <% } %> - -<% } else { %> - -<p> -Login to create or join a game. - -<% } %> |