<h2>Lobby</h2>

<p>
  <%= link_to "New Game", games_path, method: :post %>
</p>

<p>
  Invitations<br>
  <% if current_user.invites.any? %>
    <ul>
      <% current_user.invites.open.each do |invite| %>
        <li>From <%= invite.game_owner.name %> (<%= pluralize invite.game.players.count, "player" %> / <%= pluralize invite.game.invites.open.count, "open invite" %>) <%= link_to "Accept", accept_invite_path(invite), method: :post %> | <%= link_to "Decline", decline_invite_path(invite), method: :post %></li>
      <% end %>
    </ul>
  <% else %>
    None
  <% end %>
</p>

<h2>Lobby</h2>

<p>
  <%= link_to "New Game", games_path, method: :post %>
</p>

<p>
  Invitations<br>
  <% if current_user.invites.open.any? %>
    <ul>
      <% current_user.invites.open.each do |invite| %>
        <li>From <%= invite.game_owner.name %> (<%= pluralize invite.game.players.count, "player" %> / <%= pluralize invite.game.invites.open.count, "open invite" %>) <%= link_to "Accept", accept_invite_path(invite), method: :post %> | <%= link_to "Decline", decline_invite_path(invite), method: :post %></li>
      <% end %>
    </ul>
  <% else %>
    None
  <% end %>
</p>

<p>
  <% if current_user.invites.declined.any? %>
    Declined Invitations<br>
    <ul>
      <% current_user.invites.declined.each do |invite| %>
        <li>From <%= invite.game_owner.name %> (<%= pluralize invite.game.players.count, "player" %> / <%= pluralize invite.game.invites.open.count, "open invite" %>) <%= link_to "Accept", accept_invite_path(invite), method: :post %></li>
      <% end %>
    </ul>
  <% end %>
</p>

Allow users to change their mind and accept previously declined invites.
Allow users to change their mind and accept previously declined invites.
