<h2>Your Groups</h2>
<div class="panel panel-success">
  <div class="panel-heading">
    <h3 class="panel-title">Groups</h3>
  </div>
  <div class="panel-body">
    <ul class="list-group">
      <% groups.each_with_index do |user_group, index| %>
      <li class="list-group-item">
        <span class="badge pull-left">#1</span>
        &nbsp;
        <a href="/groups/<%= user_group.id %>"><%= "#{user_group.name} (#{user_group.user.nickname})" %></a>
        <% if current_user.id == user_group.user_id %>
          <a href="/groups/<%= user_group.id %>/edit" class="btn btn-warning btn-xs pull-right">edit</a>
        <% else %>
        <% end %>
      </li>
      <% end %>
    </ul>
  </div>
</div>

<h2>Your Groups</h2>
<div class="panel panel-success">
  <div class="panel-heading">
    <h3 class="panel-title">Groups</h3>
  </div>
  <div class="panel-body">
    <% if groups.any? %>
      <ul class="list-group">
        <% groups.each_with_index do |user_group, index| %>
        <li class="list-group-item">
          <span class="badge pull-left">#1</span>
          &nbsp;
          <a href="/groups/<%= user_group.id %>"><%= "#{user_group.name} (#{user_group.user.nickname})" %></a>
          <% if current_user.id == user_group.user_id %>
            <a href="/groups/<%= user_group.id %>/edit" class="btn btn-warning btn-xs pull-right">edit</a>
          <% else %>
          <% end %>
        </li>
        <% end %>
      </ul>
    <% else %>  
      <p>You don't have and don't belong to any group yet. You can <a href="/groups/new">create a group</a> or wait until someone invite you.</p>
    <% end %>
  </div>
</div>

Add message when user doesn't have groups
Add message when user doesn't have groups
