Commit b12fafe5 authored by Galen Evilla's avatar Galen Evilla

last na talaga

parent 74a957db
......@@ -10,10 +10,10 @@
<h2><center>Hello, <%= current_user.full_name %>!</center></h2>
<h4>Vote now for:</h4>
<ul>
<% if @positions.size > 0 %>
<%@positions.each do |p|%>
<li><%=p.name%><br>
<%voted_for = false%>
<% if p.candidates.size > 0 %>
<% p.candidates.each do |c|%>
<%c.votes.each do |v|%>
<%if v.user_id == current_user.id%>
......@@ -22,15 +22,14 @@
<% end %>
<%end%>
<% end %>
</ol>
<%if !voted_for%>
<%=link_to "Vote for a #{p.name}", "/voting/new/#{p.id}" %>
<%else%>
<%end%>
</li>
<%end%>
<% else %>
<h4>No available candidates to vote for.</h4>
<h5>No available candidates to vote for.</h5>
<%end%>
</li>
<%end%>
</ul>
<hr>
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment