<%#= render @team %>
<%= @team.name %>
<%= link_to 'Update Players', update_team_info_team_path(@team) %>
<%= link_to "Destroy", @team, method: :delete %> <%#= link_to "Destroy", @team, method: :delete, data: { confirm: 'Are you sure?' } %>

Partidos jugados: <%= @team.games.count %>

Players
<% @team.games.order(:matchday).each do |game| %> <% end %> <% if !@team.players.nil? %> <% t = 0 %> <% @team.players.order(:name).each do |player| %> <% t = t +1 %> <%= cycle('','').html_safe %> <% @team.games.order(:matchday).each do |game| %> <%= show_signup_status(player,game) %> <% end %> <% end %> <% end %> <% @team.games.order(:matchday).each do |game| %> <% end %> <% @team.games.order(:matchday).each do |game| %> <% end %>
Nombre Apellidos Puntos Disponible Jugados En casa Fuera<%= link_to game.matchday, game_path(game) %>Nombre y apellidos
<%= t %> <%= link_to "#{player.name} #{player.last_name}", player_path(player) %> <%= player.points %> <%= player.games.count %> <%= player.played %> (<%= player.played_per %>%) <%= player.home_played %> (<%= player.home_played_per %>%) <%= player.away_played %> (<%= player.away_played_per %>%) <%= link_to "#{player.name} #{player.last_name}".truncate(20), player_path(player) %>
Jugadores disponibles <%= game.players.count %>
<% if game.state.eql? "close" %>
<%= link_to "Disponibles", change_status_game_path(id: game.id, act: "availables") %>
<% elsif game.state.eql? "availability" %> <%= link_to "Convocados", change_status_game_path(id: game.id, act: "playing") %>

<%= link_to "Cerrar", change_status_game_path(id: game.id, act: "close") %> <% else %> <%= link_to "Disponibles", change_status_game_path(id: game.id, act: "availables") %>

<%= link_to "Cerrar", change_status_game_path(id: game.id, act: "close") %> <% end %>
<%#= link_to "Edit this team", edit_team_path(@team) %> | <%#= link_to "Back to teams", teams_path %> <%#= button_to "Destroy this team", @team, method: :delete %>