<div class="row">
  <div class="col-xs-6">
    <ul class="nav nav-pills">
      <%= tab("Users", users_path, params[:controller] == "users" && params[:action] != "deleted") %>

      <% if current_user.can_invite_user? %>
        <%= tab("Invites", user_invitations_path, params[:controller] == "user_invitations") %>
      <% end %>

      <% if current_user.can_delete_user? %>
        <%= tab("Deleted Users", deleted_users_path, params[:controller] == "users" && params[:action] == "deleted") %>
      <% end %>
    </ul>
  </div>

  <% if current_user.can_invite_user? %>
    <div class="col-xs-6">
      <div class="pull-right">
        <%= link_to "Invite User", new_user_invitation_path, class: "btn btn-primary" %>
      </div>
    </div>
  <% end %>
</div>

<br />

<div class="row">
  <div class="col-xs-6">
    <ul class="nav nav-pills">
      <%= tab("Users", users_path, params[:controller] == "users" && params[:action] != "deleted") %>

      <% if current_user.can_invite_user? %>
        <%= tab("Open Invites", open_user_invitations_path, params[:controller] == "user_invitations" && params[:action] == "open") %>
        <%= tab("Closed Invites", closed_user_invitations_path, params[:controller] == "user_invitations" && params[:action] == "closed") %>
      <% end %>

      <% if current_user.can_delete_user? %>
        <%= tab("Deleted Users", deleted_users_path, params[:controller] == "users" && params[:action] == "deleted") %>
      <% end %>
    </ul>
  </div>

  <% if current_user.can_invite_user? %>
    <div class="col-xs-6">
      <div class="pull-right">
        <%= link_to "Invite User", new_user_invitation_path, class: "btn btn-primary" %>
      </div>
    </div>
  <% end %>
</div>

<br />

Change tabs for user invites to open and closed
Change tabs for user invites to open and closed
