html reset

This commit is contained in:
Mark Moser
2017-03-20 10:57:50 -05:00
parent cb6f41fe29
commit 0727440a31
58 changed files with 397 additions and 529 deletions

View File

@ -1,27 +1,27 @@
<%= render partial: 'shared/form_model_errors', locals: { obj: candidate } %>
<%= form_for candidate, url: action, method: :post do |form| %>
<div class="form-group">
<div>
<%= form.label :name, "Candidate name" %>
<%= form.text_field :name %>
</div>
<div class="form-group">
<div>
<%= form.label :email, "Candidate email" %>
<%= form.email_field :email %>
</div>
<div class="form-group">
<div>
<%= form.label :experience, "Years of experience" %>
<%= form.select :experience, experience_options(candidate.experience), include_blank: false %>
</div>
<div class="form-group">
<div>
<%= form.label :project, "Client or project" %>
<%= form.text_field :project %>
</div>
<div class="form-group">
<div>
<%= form.radio_button :position, 'full-time' %>
<%= form.label "position_full-time", "Full-time" %>
@ -29,12 +29,12 @@
<%= form.label :position_contract, "Contract" %>
</div>
<div class="form-group">
<div>
<%= form.label :skill_needs, "Specific skill needs" %>
<%= form.text_field :skill_needs %>
</div>
<div class="form-group">
<div>
<%= form.label :quiz_id, "Quiz" %>
<%= form.select :quiz_id, quiz_options(quizzes, candidate.quiz_id), include_blank: (quizzes.size > 1) %>
</div>

View File

@ -1,10 +1,7 @@
<%
content_for :title, "Edit Candidate - Skills Assessment Admin"
%>
<% content_for :title, "Edit Candidate - Skills Assessment Admin" %>
<main class="intro_tpl">
<h1>Edit: <%= @candidate.name %></h1>
<p><strong>Test ID: </strong><%= @candidate.test_hash %></p>
<h1>Edit: <%= @candidate.name %></h1>
<%= render partial: 'form', locals: { action: admin_update_candidate_path(@candidate.id), candidate: @candidate, quizzes: @quizzes } %>
</main>
<div><strong>Test ID: </strong><%= @candidate.test_hash %></div>
<%= render partial: 'form', locals: { action: admin_update_candidate_path(@candidate.id), candidate: @candidate, quizzes: @quizzes } %>

View File

@ -2,39 +2,37 @@
content_for :section_title, "Candidates"
content_for :title, "Candidates - Skills Assessment Admin"
%>
<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">
<%= link_to("Create New Candidate", admin_new_candidate_path, { class: "" }) if policy(Candidate).create? %>
<table cellspacing="0" cellpadding="0">
<tr>
<th><%= sortable "name", "Candidate" %></th>
<th><%= sortable "test_hash", "Test ID" %></th>
<th><%= sortable "email" %></th>
<th><%= sortable "experience" %></th>
<th>Progress</th>
<th><%= sortable "completed_at", "Completed" %></th>
<th><%= sortable "reminded" %></th>
<th>Interview?</th>
</tr>
<% @candidates.each do |candidate| %>
<tr>
<th><%= sortable "name", "Candidate" %></th>
<th><%= sortable "test_hash", "Test ID" %></th>
<th><%= sortable "email" %></th>
<th><%= sortable "experience" %></th>
<th>Progress</th>
<th><%= sortable "completed_at", "Completed" %></th>
<th><%= sortable "reminded" %></th>
<th>Interview?</th>
<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 ? link_to("Submitted", admin_result_path(candidate.test_hash)) : "" %></td>
<td><%= candidate.reminded ? "Yes" : "" %></td>
<td><%= candidate.interview? %></td>
</tr>
<% end %>
</table>
<% @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 ? link_to("Submitted", admin_result_path(candidate.test_hash)) : "" %></td>
<td><%= candidate.reminded ? "Yes" : "" %></td>
<td><%= candidate.interview? %></td>
</tr>
<% end %>
</table>
<%= paginate @candidates %>
</main>
<%= paginate @candidates %>

View File

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