ensl.org/app/views/gathers/_voting.html.erb
Luke Barratt f2d908a06f 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

29 lines
806 B
Text

<div class="data">
<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>
<%= render partial: 'votes' %>
<%= render partial: 'status' %>