ensl.org/app/views/gatherers/_list.html.erb
Luke Barratt 37e768c68f Switched web server to puma
Added styling to gathers page
Added styling to account page
Improved forms styling
2014-04-15 10:59:52 +01:00

38 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 %>
<% if pick %>
<a class="button tiny">Pick</a>
<% end %>
</table>
<% end %>