<% @user.teamers.active.each do |teamer| %> <% end %>
Name Comment Rank Actions
class="bold"<% end %>> <%= link_to (h teamer.team.name), teamer.team %> <%= h teamer.comment %> <%= h teamer.ranks[teamer.rank] %> <% if @user.team != teamer.team %> <%= form_for @user do |u| %> <%= link_to("Set as Primary", user_path(@user, :user => { :team_id => teamer.team.id }), :method => :put, :confirm => "Are you sure?") %> <%= link_to 'Leave', teamer, :confirm => 'Are you sure?', :method => :delete %> <% end %> <% else %> <%= link_to 'Leave', teamer, :confirm => 'Are you sure?', :method => :delete %> <% end %>
<% if @user.teamers.joining.count == 0 %> <%= form_for @teamer do |f| %> <%= f.error_messages %> <%= f.hidden_field :user_id %>

Join an existing team:

<%= f.select :team_id, Team.active.collect {|t| [t.name, t.id]} %> <%= f.submit "Join" %>

<% end %> <% else %>

You can join only one team at time. Currently you are trying to join <%= namelink @user.teamers.joining.first.team %>. You can cancel this request by clicking <%= link_to "here", @user.teamers.joining.first, :method => :delete %>.

<% end %>

<%= link_to 'Create a new team', new_team_path %>

<% if @user.challenges_received.future.pending.count > 0 %>

Pending challenges for your response

<% @user.challenges_received.future.pending.each do |challenge| %> <% end %>
Actions Opponent Match time Default time
<%= link_to ("Open"), challenge %> | <%= link_to "Send a PM", :controller => "messages", :action => "new", :id => "Team", :id2 => challenge.contester1.team %> <%= namelink challenge.contester1 %> <%= longtime challenge.match_time %> <% challenge.mandatory ? longtime(challenge.default_time) : "--" %>

<% end %> <% if @user.challenges_sent.future.count > 0 %>

Sent challenges

<% @user.challenges_sent.future.each do |challenge| %> <% end %>
Actions Opponent Match time Default time Status
<%= link_to ("Open"), challenge %> <%= namelink challenge.contester2 %> <%= shorttime challenge.match_time %> <% if challenge.mandatory %> <%= shorttime challenge.default_time %> <% else %> -- <% end %> <%= challenge.statuses[challenge.status] %>
<% end %> <% if @user.ref? and Match.future.unreffed.ordered.count > 0 %>

Matches without referee

<% Match.future.unreffed.ordered.each do |match| %> <% end %>
Teams Date Actions
<%= namelink match %> <%= shorttime match.match_time %> <%= link_to 'Referee this match', :remote => true, :url => {:controller => "matches", :action => "update", :id => match.id, :match => {:referee_id => @user.id}}, :method => "put", :loading => "$('matchlink_#{match.id}').parentNode.innerHTML='Processing..';", :success => "$('matchlink_#{match.id}').parentNode.innerHTML='Complete';", :html => {:id => "matchlink_#{match.id}"} %>
<% end %> <% if @user.upcoming_matches.length > 0 # TODO: fix this %>

Upcoming matches for your concern

<% @user.upcoming_matches.each do |match| %> <% end %>
Teams Date
<%= namelink match %> <%= shorttime match.match_time %>

<% end %> <% if @user.past_matches.length > 0 %>

Past matches waiting for scoring or lineup

<% @user.past_matches.each do |match| %> <% end %>
Teams Date
<%= namelink match %> <%= shorttime match.match_time %>

<% end %>
<%= render :partial => "articles/list", :locals => {:articles => @user.articles} %> <%= link_to 'New article', new_article_path %>
<%= render :partial => "movies/movie", :collection => @user.movies %>
<%= render :partial => "servers/server", :collection => @user.servers %> <%= link_to 'New server', new_server_path %>

Issues created by you

<%= render :partial => "issues/list", :locals => {:issues => @user.issues} %>

Open issues assigned to you

<%= render :partial => "issues/list", :locals => {:issues => @user.open_issues} %> <%= link_to 'New issue', new_issue_path %>
<%= render :partial => "bans/list", :locals => {:bans => @user.bans.effective} %>