ensl.org/app/views/gathers/_voting.html.erb
Luke Barratt 644ffb41ef Added forum styling
Improvements to sizing/spacing
2014-05-04 12:53:47 +01:00

34 lines
975 B
Text

<div class="gather-columns">
<div class="data">
<div class="contents">
<h4>Vote Captains</h4>
<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>
<% if @gatherer %>
<p>Click to vote for captain.</p>
<% end %>
</div>
</div>
<%= render partial: 'votes' %>
</div>
<%= render partial: 'status' %>