<%= h @team.name %>

<% if @team.logo %> <%= image_tag @team.logo.url, :class => "centered" %> <% end %>
<% if @team.recruiting %> <% end %>
Irc: <%= h @team.irc %>
Web: <%= h @team.web %>
Tag: <%= h @team.tag %>
Country: <%= h @team.country %>
Founder: <%= namelink @team.founder %>
Comment: <%= h @team.comment %>
Recruiting: <%= h @team.recruiting %>

<%= link_to "Send a message", :controller => "messages", :action => "new", :id => "Team", :id2 => @team %>

Current Members

<%= render :partial => "teamers/list", :locals => {:teamers => @team.teamers.active.ordered.distinct, :blacklist => false, :comment => true } %>

Past Members

<%= render :partial => "teamers/list", :locals => {:teamers => @team.teamers.past.distinct, :blacklist => @team.teamers.active.ordered.distinct, :comment => false} %>
<% @team.contesters.chronological.each do |contester| %> <% next if Match.finished.ordered.of_contester(contester).count == 0 %>

<%= link_to contester.contest, contester.contest, :name => "contest_#{contester.contest.id}" %>

<%= render :partial => "matches/list", :locals => {:matches => Match.finished.ordered.of_contester(contester), :friendly => contester.team, :contest => false} %> <% end %>

Matches: <%= @team.matches_finished.count %> played / <%= @team.matches.count %> total
- Won: <%= @team.matches_won.count %> (<%= 100.0*@team.matches_won.count/@team.matches_finished.count %> %)
- Lost: <%= @team.matches_lost.count %> (<%= 100.0*@team.matches_lost.count/@team.matches_finished.count %> %)
- Draw: <%= @team.matches_draw.count %> (<%= 100.0*@team.matches_draw.count/@team.matches_finished.count %> %)

<% if cuser and @team.can_update? cuser %> <%= link_to 'Edit', edit_team_path(@team) %> <% end %>