2014-04-26 01:24:47 +00:00
|
|
|
<div class="gather-columns">
|
|
|
|
<div class="data">
|
2014-05-04 11:53:47 +00:00
|
|
|
<div class="contents">
|
|
|
|
<h4>Vote Captains</h4>
|
2014-03-23 00:22:25 +00:00
|
|
|
|
2014-05-04 11:53:47 +00:00
|
|
|
<table id="gatherers">
|
|
|
|
<% @gather.gatherers.most_voted.each do |gatherer| %>
|
|
|
|
<tr>
|
|
|
|
<td><%= flag gatherer.user.country %></td>
|
|
|
|
<td>
|
|
|
|
(<%= gatherer.votes %>)
|
|
|
|
<% if @gatherer and gatherer.real_votes.build(user: cuser).can_create? cuser %>
|
|
|
|
<%= link_to (h gatherer.user),
|
|
|
|
controller: "votes", action: "create",
|
|
|
|
vote: { votable_id: gatherer.id, votable_type: "Gatherer"},
|
|
|
|
method: "post" %>
|
|
|
|
<% else %>
|
|
|
|
<%= namelink gatherer.user %>
|
|
|
|
<% end %>
|
|
|
|
</td>
|
|
|
|
</tr>
|
|
|
|
<% end %>
|
|
|
|
</table>
|
2014-04-26 01:24:47 +00:00
|
|
|
|
2014-05-04 11:53:47 +00:00
|
|
|
<% if @gatherer %>
|
|
|
|
<p>Click to vote for captain.</p>
|
|
|
|
<% end %>
|
|
|
|
</div>
|
2014-04-26 01:24:47 +00:00
|
|
|
</div>
|
2014-03-23 00:22:25 +00:00
|
|
|
|
2014-04-26 01:24:47 +00:00
|
|
|
<%= render partial: 'votes' %>
|
2014-03-23 00:22:25 +00:00
|
|
|
</div>
|
|
|
|
|
2014-04-15 09:59:52 +00:00
|
|
|
<%= render partial: 'status' %>
|