% provide(:head_title, t("projects.index.head_title")) %>
<%= render partial: "shared/sidebar" %>
<%= render partial: "shared/secondary_navigation" %>
<% if can_create_projects?(current_team) %>
<%= bootstrap_form_for @project, remote: true do |f| %>
<%= render partial: "new.html.erb", locals: { form: f, teams: @teams } %>
<% end %>
<% end %>
<% if @teams.length == 0 %>
<%=t 'projects.index.no_teams.title' %>
<%=t 'projects.index.no_teams.text' %>
<%= link_to t('projects.index.no_teams.btn'), teams_path, class: 'btn btn-primary' %>
<% else %>
<% @projects_by_teams.each do |team, projects| %>
<%= render partial: "projects/index/team_projects",
locals: {team: team, projects: projects} %>
<% end %>
<% end %>
<%= javascript_include_tag "projects/index", "data-turbolinks-track" => true %>