skill-assessment-app/app/views/admin/candidate/index.html.erb

37 lines
1.1 KiB
Plaintext

<%
content_for :section_title, "Candidates"
%>
<main class="summary_tpl">
<%= link_to(admin_new_candidate_path, { class: 'secondary-btn' }) do %>
<button>Create New Candidate</button>
<% end if policy(Candidate).create? %>
<table cellspacing="0" cellpadding="0">
<tr>
<th>Candidate</th>
<th>Test ID</th>
<th>Email</th>
<th>Experience</th>
<th>Progress</th>
<th>Completed</th>
<th>Reminded</th>
</tr>
<% @candidates.each do |candidate| %>
<tr>
<td><%= link_to candidate.name, admin_edit_candidate_path(candidate.id) %></td>
<td><%= candidate.test_hash %></td>
<td>
<%= mail_to(candidate.email) %>
<br />
<%= link_to "resend welcome email", admin_resend_welcome_path(candidate.id), remote: true, class: '', data: { id: 'ajax-action' } %>
</td>
<td><%= candidate.experience %> years</td>
<td><%= candidate.status %></td>
<td><%= candidate.completed ? "Submitted" : "" %></td>
<td><%= candidate.reminded ? "Yes" : "" %></td>
</tr>
<% end %>
</table>
</main>