<% if current_user.acts_as_reviewer? %>
Votes: <% if @candidate.pending? && current_user.commented_on?(@candidate.test_hash) %> <%= link_to admin_up_vote_path(test_hash: @candidate.test_hash), remote: true do %> Yea (<%= @candidate.votes.yea.count %>) <% end %> <%= link_to admin_down_vote_path(test_hash: @candidate.test_hash), remote: true do %> Nay (<%= @candidate.votes.nay.count %>) <% end %> <% elsif @candidate.pending? %>
You must comment before you can vote
Yea (<%= @candidate.votes.yea.count %>) Nay (<%= @candidate.votes.nay.count %>) <% else %> Voting closed - Yea (<%= @candidate.votes.yea.count %>) - Nay (<%= @candidate.votes.nay.count %>) <% end %> (Your vote: <%= current_user.my_vote(@candidate) %>)
<% end %> <% if current_user.acts_as_manager? %>
<%= form_tag admin_interview_path(test_hash: @candidate.test_hash) do %> Interview: <%= radio_button_tag :review_status, :approved, checked = @candidate.approved? %> <%= label_tag :review_status_approved, "Yes" %> <%= radio_button_tag :review_status, :declined, checked = @candidate.declined? %> <%= label_tag :review_status_declined, "No" %>
Review comments for recruiter <%= text_area_tag :review_comments, @candidate.review_comments %> <%= submit_tag 'Send Request' %>
<% end %>
<% else %> Candidate Interview Status: <%= @candidate.review_status %> <% unless @candidate.review_status.blank? %>
Review Status Comments:
<%= @candidate.review_comments %>
<% end %> <% end %>