Commit f252bec3 authored by Galen Evilla's avatar Galen Evilla

tweaks some more

parent 5fed7c3e
...@@ -16,7 +16,6 @@ ...@@ -16,7 +16,6 @@
<%@positions.each do |p|%> <%@positions.each do |p|%>
<hr> <hr>
<h3><center><%=p.name%></center></h3> <h3><center><%=p.name%></center></h3>
<% if p.candidates.size > 0 %> <% if p.candidates.size > 0 %>
<table class="table table-hover"> <table class="table table-hover">
<thead> <thead>
...@@ -39,7 +38,7 @@ ...@@ -39,7 +38,7 @@
</tr> </tr>
<%end%> <%end%>
<%else%> <%else%>
<h4><center>No created candidates.</center></h4> <h4><center>No candidates available.</center></h4>
<%end%> <%end%>
<center> <center>
<div class="btn btn-info" role ="button"> <div class="btn btn-info" role ="button">
...@@ -49,7 +48,7 @@ ...@@ -49,7 +48,7 @@
</table> </table>
<%end%> <%end%>
<% else %> <% else %>
<h4><center>No created candidates.</center></h4> <h4><center>No candidates available.</center></h4>
<% end %> <% end %>
</div> </div>
</div> </div>
......
...@@ -26,7 +26,7 @@ ...@@ -26,7 +26,7 @@
<h2><%= @candidate.position.name %></h2> <h2><%= @candidate.position.name %></h2>
<br> <br>
<h3>" <%= @candidate.slogan%> "</h3> <h3>"<%= @candidate.slogan%>"</h3>
<br> <br>
<center> <center>
<table class="table table-hover"> <table class="table table-hover">
...@@ -46,18 +46,22 @@ ...@@ -46,18 +46,22 @@
</table> </table>
</center> </center>
<hr> <hr>
<% if @candidate.votes.count > 0 %>
<h3>Voters who voted for <%= @candidate.full_name%></h3> <h3>Voters who voted for <%= @candidate.full_name%></h3>
<ul> <ul>
<li> <li>
<% @candidate.votes.each do |v|%> <% @candidate.votes.each do |v|%>
<%= "#{v.user.full_name}"%> <%= "#{v.user.full_name}"%>
<p> <br>
Comments: <%=v.comment%> <p>
</p> Comments: <%=v.comment%>
</li> </p>
<%end%> </li>
</ul> <%end%>
</ul>
<%else%>
<h3>No Voters.</h3>
<%end%>
<hr> <hr>
<%= link_to "Back to Candidates", admin_candidates_path %> <%= link_to "Back to Candidates", admin_candidates_path %>
</div> </div>
......
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