18F/identity-dashboard

View on GitHub
app/views/teams/all.html.erb

Summary

Maintainability
Test Coverage
<h1 class="usa-display">All teams</h1>

<div>
  <% if @teams.count > 0 %>
    <%=
      button_to(
          t('headings.teams.new_team'),
          new_team_path,
          method: :get,
          class: "usa-button margin-top-4 margin-bottom-4",
          ) if can_create_teams? (current_user)
    %>
    <%= render 'teams_list' %>
  <% elsif can_create_teams?(current_user) %>
    <div class='lg-card'>
      <div class='grid-row flex-row flex-align-end'>
        <div class='tablet:grid-col-10'>
          <h2 class='margin-bottom-05'>Create your first team</h2>
          <p class='margin-top-05'>Get started with the sandbox environment. Make a team for your integration project.</p>
        </div>
          <div class='tablet:grid-col-2 text-right'>
          <a href="<%= new_team_path %>" class='usa-button usa-button--outline'>Continue</a>
        </div>
      </div>
    </div>
  <% else %>
    <p>
      You aren't a part of any teams yet.
    </p>
  <% end %>
</div>