Your Teams

<% @user.teamers.active.each do |teamer| %> <% end %>
Name Comment Rank Actions
<%= 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?") %> <% end %> <% end %> <%= link_to 'Leave', teamer, confirm: 'Are you sure?', method: :delete, class: 'button tiny' %>
<% 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", class: 'button' %>
<% end %> <% else %>

You can join only be a member of one team at a time.

Currently you are trying to join <%= namelink @user.teamers.joining.first.team %>

You can cancel this request by clicking "Cancel Request"

<%= link_to "Cancel Request", @user.teamers.joining.first, method: :delete, class: 'button' %> <% end %> <%= link_to 'Create a new team', new_team_path, class: 'button' %>
<% 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 %>
<% if @user.articles.size > 0 %> <%= render partial: "articles/list", locals: { articles: @user.articles } %> <% end %> <%= link_to 'New article', new_article_path, class: 'button' %>
<%= render partial: "movies/movie", collection: @user.movies %> <%= link_to "New Movie", { controller: "data_files", action: "new", id: Directory::MOVIES }, { class: 'button' } %>
<%= render partial: "servers/server", collection: @user.servers %> <%= link_to 'New server', new_server_path, class: 'button' %>
<% if @user.issues.size > 0 %>

Issues created by you

<%= render partial: "issues/list", locals: { issues: @user.issues } %> <% end %> <% if @user.open_issues.size > 0 %>

Open issues assigned to you

<%= render partial: "issues/list", locals: { issues: @user.open_issues } %> <% end %> <%= link_to 'New issue', new_issue_path, class: 'button' %>
<% if @user.bans.effective.size > 0 %> <%= render partial: "bans/list", locals: { bans: @user.bans.effective } %> <% else %>

You have no effective bans currently.

<% end %>