Changed 'Who's Playing' code to handle revised JSON format

This commit is contained in:
MrYummy
2017-05-31 21:44:22 +02:00
parent 617890c209
commit 1b8744abdb
2 changed files with 8 additions and 6 deletions

View File

@@ -1,14 +1,15 @@
<% title "Who's Playing?" %>
<h1>These players are currently playing on Redstoner:</h1>
<h1>These players are currently playing on Redstoner (<%= @count %>):</h1>
<div id="userlist">
<% @players.each do |u| %>
<div class="list-user">
<%= link_to(u.avatar(64), u) %>
<div class="detail">
<%= render partial: "users/username", locals: { user: u } %><br>
<i><%= u.ign %></i>
<% unless u.id %>
<br><i>(Not signed up)</i>
<% if u.id %>
<i><%= u.ign %></i>
<% else %>
<i>(Not signed up)</i>
<% end %>
</div>
</div>