ensl.org/app/views/gathers/index.html.erb

57 lines
1.5 KiB
Text
Raw Normal View History

<h1>Gather Archive</h1>
<h5 class="title">Players starred were captains for their respective teams.</h5>
2020-03-26 18:50:14 +00:00
<%= will_paginate @gathers %>
<table class="gathers striped">
<tr>
2020-03-26 18:50:14 +00:00
<th class="info">Info</th>
<th class="team1">Team 1</th>
<th class="team2">Team 2</th>
</tr>
<% @gathers.each do |gather| %>
<tr class="<%= cycle('even', 'odd') %>">
2020-03-26 18:50:14 +00:00
<td>
<p>
<%= link_to gather.updated_at.strftime("%Y/%m/%d %H:%M:%S"), gather %>
</p>
<p>
<%= namelink gather&.map1&.map %>
<%= namelink gather&.map2&.map %>
</p>
</td>
<td>
<ul>
2020-03-26 18:50:14 +00:00
<% gather.gatherers.ordered.each do |gatherer| %>
<li>
<% if gatherer.team == 1 %>
<%= link_to gatherer.user.to_s, User.find_by_username(gatherer.user.to_s) %>
<% if gather.captain1 == gatherer %>
2020-03-17 00:13:57 +00:00
<%= icon 'star' %>
<% end %>
<% end %>
</li>
<% end %>
</ul>
</td>
<td>
<ul>
2020-03-26 18:50:14 +00:00
<% gather.gatherers.ordered.each do |gatherer| %>
<li>
<% if gatherer.team == 2 %>
<%= link_to gatherer.user.to_s, User.find_by_username(gatherer.user.to_s) %>
<% if gather.captain2 == gatherer %>
2020-03-17 00:13:57 +00:00
<%= icon 'star' %>
<% end %>
<% end %>
</li>
<% end %>
</ul>
</td>
</tr>
<% end %>
</table>
2020-03-26 18:50:14 +00:00
<%= will_paginate @gathers %>