diff options
Diffstat (limited to 'app/views')
-rw-r--r-- | app/views/layouts/_head.html.erb | 3 | ||||
-rw-r--r-- | app/views/statics/online.html.erb | 17 |
2 files changed, 20 insertions, 0 deletions
diff --git a/app/views/layouts/_head.html.erb b/app/views/layouts/_head.html.erb index e6b5080..c64fe30 100644 --- a/app/views/layouts/_head.html.erb +++ b/app/views/layouts/_head.html.erb @@ -31,6 +31,9 @@ <li> <%= link_to "Donate", donate_statics_path, class: ("active" if con == "statics" && params[:action] == "donate") %> </li> + <li> + <%= link_to "Who's Playing?", online_statics_path, class: ("active" if con == "statics" && params[:action] == "online") %> + </li> </ul> </div> <div id="userbar"> diff --git a/app/views/statics/online.html.erb b/app/views/statics/online.html.erb new file mode 100644 index 0000000..8c31182 --- /dev/null +++ b/app/views/statics/online.html.erb @@ -0,0 +1,17 @@ +<% title "Who's Playing?" %> +<h1>These players are currently playing on Redstoner:</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> + <% end %> + </div> + </div> + <% end %> +</div> + |