<% if user_logged_in? %>
  <p>Welcome <%= current_user.name %></p>

  <h2>News Feed</h2>
  <%= page_entries_info @games %>
  <%= div_for @games, :class => 'media' do |game| %>
    <div class="media-body">
      <h4 class="media-heading"><%= link_to game.versus, tournament_game_path(game.tournament_id, game) %></h4>
      <% if game.confirmed? %>Confirmed<% else %>Unconfirmed<% end %> game for <%= link_to game.tournament.name, tournament_path(game.tournament_id) %> on <%= time_tag game.updated_at %>.
    </div>
  <% end %>
  <%= paginate @games %>
<% else %>
  <div class="hero-unit">
    <h1>Ladder</h1>
    <p>Create and manage tournaments for pool, foosball or anything. Compete against your friends and colleagues.</p>
    <p><%= link_to "Login to start", session_path, :class => 'btn btn-primary btn-large' %></p>
  </div>
<% end %>

<% if user_logged_in? %>
  <p>Welcome <%= current_user.name %></p>

  <h2>News Feed</h2>
  <%= page_entries_info @games %>
  <%= div_for @games, :class => 'media' do |game| %>
    <%= link_to tournament_game_path(game.tournament_id, game), :class => 'pull-left' do %>
      <%= gravatar_image_tag game.game_ranks[0].user.email, 64 %>
    <% end %>
    <div class="media-body">
      <h4 class="media-heading"><%= link_to game.versus, tournament_game_path(game.tournament_id, game) %></h4>
      <% if game.confirmed? %>Confirmed<% else %>Unconfirmed<% end %> game for <%= link_to game.tournament.name, tournament_path(game.tournament_id) %> on <%= time_tag game.updated_at %>.
    </div>
  <% end %>
  <%= paginate @games %>
<% else %>
  <div class="hero-unit">
    <h1>Ladder</h1>
    <p>Create and manage tournaments for pool, foosball or anything. Compete against your friends and colleagues.</p>
    <p><%= link_to "Login to start", session_path, :class => 'btn btn-primary btn-large' %></p>
  </div>
<% end %>

Add gravatar images to news feed
Add gravatar images to news feed
