66 lines
2.7 KiB
Plaintext
66 lines
2.7 KiB
Plaintext
<main class="summary_tpl">
|
|
<h2 class="prft-heading">Quiz Review</h2>
|
|
|
|
<div class="review_meta">
|
|
<div>
|
|
<strong>Test ID:</strong> <%= @candidate.test_hash %><br />
|
|
<strong>Years of Experience:</strong> <%= @candidate.experience %><br />
|
|
<strong>Recruiter Email:</strong> <%= mail_to @candidate.recruiter.name, @candidate.recruiter.email %><br />
|
|
</div>
|
|
<div>
|
|
<div class="review_meta__votes" data-id="vote-count">
|
|
<strong>Votes: </strong>
|
|
<%= link_to admin_up_vote_path(test_hash: @candidate.test_hash), remote: true do %>
|
|
Yea (<span data-id="up-votes"><%= @candidate.votes.yea.count %></span>)
|
|
<% end %>
|
|
<%= link_to admin_down_vote_path(test_hash: @candidate.test_hash), remote: true do %>
|
|
Nay (<span data-id="down-votes"><%= @candidate.votes.nay.count %></span>)
|
|
<% end %>
|
|
<small>(Your vote: <span data-id="my-vote"><%= current_user.my_vote(@candidate) %></span>)</small>
|
|
</div>
|
|
<% if current_user.acts_as_manager? %>
|
|
<div class="review_meta__vetos" data-id="veto-status">
|
|
<strong>Manager Vetos: </strong>
|
|
<%= link_to admin_approve_vote_path(test_hash: @candidate.test_hash), remote: true do %>
|
|
<span data-id="interview-request">
|
|
<%= @candidate.approved? ? "Requested" : "Request Interview" %>
|
|
</span>
|
|
<% end %>
|
|
<%= link_to admin_decline_vote_path(test_hash: @candidate.test_hash), remote: true do %>
|
|
<span data-id="interview-decline">
|
|
<%= @candidate.declined? ? "Declined" : "Decline Interview" %>
|
|
</span>
|
|
<% end %>
|
|
</div>
|
|
<% else %>
|
|
<strong>Candidate Interview Status: </strong><%= @candidate.review_status %>
|
|
<% end %>
|
|
</div>
|
|
</div>
|
|
|
|
<% @quiz.each do |question| %>
|
|
<%= form_for(:answer, url: '#never-post', html:{id: 'summary-form'}) do |form| %>
|
|
<article class="answer-sec <%= question.input_type %>-type" data-qid="<%= question.question_id %>">
|
|
<div class="question-heading">
|
|
<div class="question-title">
|
|
<h3><%= question.question %></h3>
|
|
</div>
|
|
</div>
|
|
|
|
<div class="answer-container">
|
|
<% if question.attachment.present? %>
|
|
<%= image_tag question.attachment %>
|
|
<% end %>
|
|
<fieldset disabled class="answer-block">
|
|
<%= render partial: "quiz/#{question.input_type}", locals: {question: question, answer: question.answer, form: form} %>
|
|
</fieldset>
|
|
</div>
|
|
</article>
|
|
<% end #form_tag %>
|
|
<% end #questions loop %>
|
|
|
|
<%= link_to(admin_results_path, { class: 'secondary-btn' }) do %>
|
|
<button>Back to list</button>
|
|
<% end %>
|
|
</main>
|