<% @teams.each do |team| %>
  <div class="box box-solid box-default">
    <div class="box-header">
      <h3 class="box-title"><%= team.name %></h3>
      <h3 class="box-title pull-right">Prof(a). <%= team.owner.name %></h3>
    </div><!-- /.box-header -->

    <div class="box-footer">
      <% if team.enrolled?(current_user) %>
        <div class="pull-right">
          <%= link_to "Ver", '#' %>

            <% if current_user == team.owner %>
              | <%= link_to "Editar", edit_team_path(team) %> |
              <%= link_to "Excluir", '#', method: :delete,
                          data: { confirm: "Tem certeza que deseja excluir?" } %>
            <% end %>
        </div>

      <% else %>

        <%= form_tag enroll_team_url(team), remote: true, class: "form-inline", id: "enroll-form" do %>
          <%= text_field_tag :password, nil, class: "form-control", placeholder: "Senha de matrícula" %>
          <%= submit_tag 'Matricular-se', class: "btn btn-info btn-flat" %>
        <% end %>

      <% end %>

    </div><!-- /.box-footer -->

  </div><!-- /.box -->
<% end %>

<% @teams.each do |team| %>
  <div class="box box-solid box-default">
    <div class="box-header">
      <h3 class="box-title"><%= team.name %></h3>
      <h3 class="box-title pull-right">Prof(a). <%= team.owner.name %></h3>
    </div><!-- /.box-header -->

    <div class="box-footer">
      <% if team.enrolled?(current_user) %>
        <div class="pull-right">
          <%= link_to "Ver", team %>

            <% if current_user == team.owner %>
              | <%= link_to "Editar", edit_team_path(team) %> |
              <%= link_to "Excluir", '#', method: :delete,
                          data: { confirm: "Tem certeza que deseja excluir?" } %>
            <% end %>
        </div>

      <% else %>

        <%= form_tag enroll_team_url(team), remote: true, class: "form-inline", id: "enroll-form" do %>
          <%= text_field_tag :password, nil, class: "form-control", placeholder: "Senha de matrícula" %>
          <%= submit_tag 'Matricular-se', class: "btn btn-info btn-flat" %>
        <% end %>

      <% end %>

    </div><!-- /.box-footer -->

  </div><!-- /.box -->
<% end %>

Add link reference to team show action
Add link reference to team show action
