ensl.org/app/views/gatherers/_list.html.erb
Luke Barratt 9edc514275 Fixes gather captains not able to pick players
Added missing gather translation
Cleanup JS
2014-05-10 14:52:45 +01:00

41 lines
1.1 KiB
Text

<% captain = team == 1 ? @gather.captain1 : @gather.captain2 %>
<% pick = false %>
<h4>
<%= if team.nil? then "Lobby" else team == 1 ? "Marines" : "Aliens" end %>
</h4>
<%= form_tag "/gathers/pick/#{@gather.id}" do %>
<ul class="gatherers">
<% @gather.gatherers.ordered.team(team).each do |gatherer| %>
<li>
<% if @gatherer and gatherer.can_update? cuser, { team: @gatherer.team } %>
<% pick = true %>
<%= radio_button_tag :player, gatherer.id %>
<%= flag gatherer.user.country %>
<%= namelink gatherer.user %>
<% else %>
<%= flag(gatherer.user.country) if gatherer.user && gatherer.user.country %>
<% if gatherer == captain and gatherer.team == gatherer.gather.turn %>
<%= icon 'chevron-right' %>
<% end %>
<%= namelink gatherer.user %>
<% if gatherer == captain %>
<span class="captain">
<%= icon('star') %>
</span>
<% end %>
<% end %>
</li>
<% end %>
</ul>
<% if pick %>
<div class="controls">
<%= submit_tag 'Pick' %>
</div>
<% end %>
<% end %>