move recruiter to admin/candidate

This commit is contained in:
Mark Moser
2016-09-22 13:30:30 -05:00
parent 47d7188a2f
commit 9078c463f4
25 changed files with 383 additions and 327 deletions

View File

@ -0,0 +1,6 @@
<main class="intro_tpl">
<h1>Edit: <%= @candidate.name %></h1>
<p><strong>Test ID: </strong><%= @candidate.test_hash %></p>
<%= render partial: 'form', locals: { action: admin_update_candidate_path(@candidate.id), candidate: @candidate, quizzes: @quizzes } %>
</main>

View File

@ -1,7 +1,7 @@
<main class="summary_tpl">
<h1>Candidates</h1>
<%= link_to(new_candidate_path, { class: 'secondary-btn' }) do %>
<%= link_to(admin_new_candidate_path, { class: 'secondary-btn' }) do %>
<button>Create New Candidate</button>
<% end %>
@ -18,12 +18,12 @@
<% @candidates.each do |candidate| %>
<tr>
<td><%= link_to candidate.name, edit_candidate_path(candidate.id) %></td>
<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", resend_welcome_path(candidate.id), remote: true, class: '', data: { id: 'ajax-action' } %>
<%= 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>

View File

@ -0,0 +1,6 @@
<main class="intro_tpl">
<h1>New Candidate</h1>
<%= render partial: 'form', locals:
{ action: admin_create_candidate_path, candidate: @candidate, quizzes: @quizzes } %>
</main>

View File

@ -1,6 +0,0 @@
<main class="intro_tpl">
<h1>Edit: <%= @candidate.name %></h1>
<p><strong>Test ID: </strong><%= @candidate.test_hash %></p>
<%= render partial: 'form', locals: { action: update_candidate_path(@candidate.id), candidate: @candidate, quizzes: @quizzes } %>
</main>

View File

@ -1,21 +0,0 @@
<main class="intro_tpl">
<h1>Recruiter Login</h1>
<% if flash[:error].present? %>
<div class="error"><%= flash[:error] %></div>
<% end %>
<%= form_for :auth, url: recruiter_login_path do |form| %>
<div class="form-group">
<%= form.label :email %>
<%= form.email_field :email %>
</div>
<div class="form-group">
<%= form.label :password %>
<%= form.password_field :password %>
</div>
<%= submit_tag "Log in" %>
<% end %>
</main>

View File

@ -1,6 +0,0 @@
<main class="intro_tpl">
<h1>New Candidate</h1>
<%= render partial: 'form', locals:
{ action: create_candidate_path, candidate: @candidate, quizzes: @quizzes } %>
</main>