Name |
Comment |
Rank |
Actions |
<% @user.teamers.active.each do |teamer| %>
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 %>
|
<% 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
Actions |
Opponent |
Match time |
Default time |
<% @user.challenges_received.future.pending.each do |challenge| %>
<%= 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 %>
<% end %>
<% if @user.challenges_sent.future.count > 0 %>
Sent challenges
Actions |
Opponent |
Match time |
Default time |
Status |
<% @user.challenges_sent.future.each do |challenge| %>
<%= 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 %>
<% end %>
<% if @user.ref? and Match.future.unreffed.ordered.count > 0 %>
Matches without referee
Teams |
Date |
Actions |
<% Match.future.unreffed.ordered.each do |match| %>
<%= 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 %>
<% end %>
<% if @user.upcoming_matches.length > 0 # TODO: fix this %>
Upcoming matches for your concern
Teams |
Date |
<% @user.upcoming_matches.each do |match| %>
<%= namelink match %> |
<%= shorttime match.match_time %>
|
<% end %>
<% end %>
<% if @user.past_matches.length > 0 %>
Past matches waiting for scoring or lineup
Teams |
Date |
<% @user.past_matches.each do |match| %>
<%= namelink match %> |
<%= shorttime match.match_time %>
|
<% end %>
<% 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} %>