Commit 457b13e5 authored by Galen Evilla's avatar Galen Evilla

tweaks

parent 37e830e0
class PagesController < ApplicationController
def index
@users = User.all
@votes = Vote.all
@candidates = Candidate.all
@positions = Position.all
......
......@@ -3,12 +3,11 @@
<%=link_to "Add New Position", new_admin_position_path%>
<hr>
<% @positions.each do |c| %>
<h2><%= c.name %></h2>
<% @positions.each do |p| %>
<h2><%= link_to p.name, admin_position_path(p.id) %></h2>
<ul>
<% c.candidates.each do |p| %>
<li><%= link_to "#{p.first_name} #{p.last_name}" , admin_candidate_path(p.id) %></li>
<% p.candidates.each do |c|%>
<li><%=link_to c.full_name, admin_candidate_path(c.id)%></li>
<% end %>
</ul>
<% end %>
\ No newline at end of file
......@@ -35,7 +35,7 @@
<td></td>
<td><center><%=link_to c.full_name, admin_candidate_path(c.id)%></center></td>
<td><center><%=c.votes.count%></center></td>
<td><center><progress value="<%=c.votes.count%>" max="<%=total%>" >(<%=c.votes.count%>)</center></td>
<td><center><progress value="<%=c.votes.count%>" max="<%=@users.count%>" >(<%=c.votes.count%>)</center></td>
</tr>
<%end%>
</table>
......
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