2014-04-15 09:59:52 +00:00
|
|
|
<div id="team-profile">
|
|
|
|
<h1 class="fancy">
|
|
|
|
<span>
|
|
|
|
<%= link_to (h @contester.team.name), team_url(@contester.team, team: 'matches', anchor: "contest_#{@contester.contest.id}") %>
|
|
|
|
</span>
|
2014-03-23 00:22:25 +00:00
|
|
|
</h1>
|
2014-04-15 09:59:52 +00:00
|
|
|
|
2014-03-23 00:22:25 +00:00
|
|
|
<% if @contester.team.logo %>
|
2014-04-15 09:59:52 +00:00
|
|
|
<div class="logo">
|
2014-04-21 18:19:03 +00:00
|
|
|
<%= image_tag @contester.team.logo.url, class: 'logo', alt: h(@contester.team.name) %>
|
2014-04-15 09:59:52 +00:00
|
|
|
</div>
|
2014-03-23 00:22:25 +00:00
|
|
|
<% end %>
|
|
|
|
</div>
|
|
|
|
|
2014-04-15 09:59:52 +00:00
|
|
|
<h4 class="nane"><%= namelink @contester.contest %></h4>
|
|
|
|
|
|
|
|
<div id="matches" class="tabbed">
|
|
|
|
<ul id="matches-nav" class="tabs">
|
2014-03-23 00:22:25 +00:00
|
|
|
<li><a href="#results">Results</a></li>
|
|
|
|
<li><a href="#upcoming">Upcoming</a></li>
|
|
|
|
<li><a href="#info>">Info</a></li>
|
|
|
|
</ul>
|
|
|
|
|
2014-04-15 09:59:52 +00:00
|
|
|
<div class="tabbed-contents">
|
2014-03-23 00:22:25 +00:00
|
|
|
<div class="tab" id="results">
|
2014-04-15 09:59:52 +00:00
|
|
|
<%= render partial: 'matches/list', locals: { matches: @results, friendly: @contester.team, contest: false } %>
|
2014-03-23 00:22:25 +00:00
|
|
|
</div>
|
|
|
|
|
|
|
|
<div class="tab" id="results">
|
2014-04-15 09:59:52 +00:00
|
|
|
<h3>Upcoming</h3>
|
2014-03-23 00:22:25 +00:00
|
|
|
|
|
|
|
<table class="data">
|
|
|
|
<tr>
|
|
|
|
<th>Opponent</th>
|
|
|
|
<th>Date</th>
|
|
|
|
<th>Maps</th>
|
|
|
|
<th>Server</th>
|
|
|
|
</tr>
|
|
|
|
|
|
|
|
<% @matches.each do |match| %>
|
|
|
|
<% match.friendly = @contester.team %>
|
|
|
|
<tr>
|
|
|
|
<td><%= namelink match.get_opponent %></td>
|
|
|
|
<td><%= link_to shorttime(match.match_time), match %></td>
|
|
|
|
<td><%= namelink match.map1 %>, <%= namelink match.map2 %></td>
|
|
|
|
<td><%= namelink match.server %></td>
|
|
|
|
</tr>
|
|
|
|
<% end %>
|
|
|
|
</table>
|
|
|
|
</div>
|
|
|
|
|
|
|
|
<div class="tab" id="info">
|
2014-04-15 09:59:52 +00:00
|
|
|
<h3>Rank</h3>
|
2014-03-23 00:22:25 +00:00
|
|
|
<%= cascade @contester, ["total", "win", "loss", "draw"] %>
|
|
|
|
|
|
|
|
<% if !@contester.active %>
|
2014-04-15 09:59:52 +00:00
|
|
|
<p><strong>INACTIVE</strong></p>
|
2014-03-23 00:22:25 +00:00
|
|
|
<% end %>
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
|
2014-04-15 09:59:52 +00:00
|
|
|
<div class="members">
|
|
|
|
<h3>Members</h3>
|
|
|
|
<%= render partial: 'teamers/list', locals: { teamers: @members, blacklist: nil, comment: false } %>
|
2014-03-23 00:22:25 +00:00
|
|
|
</div>
|
|
|
|
|
|
|
|
<% if @contester.can_update? cuser %>
|
2014-04-15 09:59:52 +00:00
|
|
|
<%= link_to 'Edit', edit_contester_path(@contester), class: 'button' %>
|
2014-03-23 00:22:25 +00:00
|
|
|
<% end %>
|
|
|
|
|
|
|
|
<script type="text/javascript">
|
2014-04-15 09:59:52 +00:00
|
|
|
new Yetii({
|
|
|
|
id: 'matches'
|
|
|
|
});
|
2014-03-23 00:22:25 +00:00
|
|
|
</script>
|