Commit 439dbf3e authored by Jasmine Principe's avatar Jasmine Principe

fixed candidates/positions index

parent 2e43fdba
......@@ -4,18 +4,14 @@
<div class ="container">
<div class="row">
<div class="col-md-12">
<center>
<left>
<h1>Candidates</h1>
<%=link_to "Add a candidate", new_admin_candidate_path%>
</center>
</left>
<%@positions.each do |p|%>
<hr>
<h3><center><%=p.name%></center></h3>
<table class="table table-hover">
<thead>
<th><center>Name</center></th>
<th><center>Slogan</center></th>
</thead>
<table>
<%p.candidates.each do |c|%>
<tr>
<td>
......@@ -23,9 +19,6 @@
<%=link_to c.full_name, admin_candidate_path(c.id)%>
</center>
</td>
<td>
<center><%=c.slogan%></center>
</td>
</tr>
<%end%>
</table>
......
......@@ -4,27 +4,14 @@
<div class ="container">
<div class="row">
<div class="col-md-12">
<center>
<left>
<h1>Positions</h1>
<%=link_to "Add New Position", new_admin_position_path%>
</center>
</left>
<%@positions.each do |p|%>
<hr>
<h3><center><%= link_to p.name, admin_position_path(p.id) %></center></h3>
<table class="table table-hover">
<thead>
<th><center>Name</center></th>
</thead>
<%p.candidates.each do |c|%>
<tr>
<td>
<center>
<%=link_to c.full_name, admin_candidate_path(c.id)%>
</center>
</td>
</tr>
<%end%>
</table>
<%end%>
</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