<link rel"stylesheet" type="text/css" href="application.css">

<h1 style="font-family:'Droid Sans';margin-left:50px;margin-top:50px;">
	Election 2016
</h1>

<h2 style="margin-left:50px";>
Candidates
</h2>
<h5> <%= link_to "Add Candidate", new_admin_candidate_path %>


<hr>


<table width="100%", align="center">
  <tr>
    <th>Position</th>
    <th>First Name</th>
    <th>Last Name</th>
    <th> Nickname</th>
    <th>Slogan</th>
  </tr>
  <% @candidates.each do |a| %>
    <tr>
      <td><%= a.position.name %></td>
      <td><%= a.first_name %></td>
      <td><%= a.last_name %></td>
      <td><%= a.nickname %></td>
      <td><%= a.slogan %></td>
      <td>
        <%= link_to "Show", candidate_path(a.id) %>
        <%= link_to "Edit", edit_admin_candidate_path(a.id) %>
        <%= link_to "Delete", admin_candidate_path(a.id), method: :delete, data: { confirm: 'Are you sure?' } %>
      </td>
    </tr>
  <% end %>
</table>


<br>

<h4 style="margin:100px;"><%= link_to "Home", root_path %></h4>
