review
This commit is contained in:
19
app/views/review/index.html.erb
Normal file
19
app/views/review/index.html.erb
Normal file
@ -0,0 +1,19 @@
|
||||
<main class="summary_tpl">
|
||||
<h1>Completed Tests</h1>
|
||||
|
||||
<table cellspacing="0" cellpadding="0">
|
||||
<tr>
|
||||
<th>Test ID</th>
|
||||
<th>Experience</th>
|
||||
<th>Recruiter</th>
|
||||
</tr>
|
||||
|
||||
<% @candidates.each do |candidate| %>
|
||||
<tr>
|
||||
<td><%= link_to candidate.test_hash, review_test_path(candidate.test_hash) %></td>
|
||||
<td><%= candidate.experience %> years</td>
|
||||
<td><%= mail_to(candidate.recruiter.email) %></td>
|
||||
</tr>
|
||||
<% end %>
|
||||
</table>
|
||||
</main>
|
21
app/views/review/login.html.erb
Normal file
21
app/views/review/login.html.erb
Normal file
@ -0,0 +1,21 @@
|
||||
<main class="intro_tpl">
|
||||
<h1>Reviewer Login</h1>
|
||||
|
||||
<% if flash[:error].present? %>
|
||||
<div class="error"><%= flash[:error] %></div>
|
||||
<% end %>
|
||||
|
||||
<%= form_for :auth, url: review_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 "Login" %>
|
||||
<% end %>
|
||||
</main>
|
31
app/views/review/view.html.erb
Normal file
31
app/views/review/view.html.erb
Normal file
@ -0,0 +1,31 @@
|
||||
<main class="summary_tpl">
|
||||
<h2 class="prft-heading">Quiz Review</h2>
|
||||
<p>
|
||||
<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 />
|
||||
</p>
|
||||
|
||||
<% @quiz.each do |question| %>
|
||||
<%= form_for(:answer, url: post_summary_path, 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">
|
||||
<fieldset disabled class="answer-block">
|
||||
<%= hidden_field_tag 'answer[question_id]', question.question_id %>
|
||||
<%= render partial: "candidate/#{question.input_type}", locals: {question: question, form: form} %>
|
||||
</fieldset>
|
||||
</div>
|
||||
</article>
|
||||
<% end #form_tag %>
|
||||
<% end #questions loop %>
|
||||
|
||||
<%= link_to(review_path, { class: 'secondary-btn' }) do %>
|
||||
<button>Back to list</button>
|
||||
<% end %>
|
||||
</main>
|
Reference in New Issue
Block a user