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

fixed candidates/positions index

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