35 lines
		
	
	
		
			1.4 KiB
		
	
	
	
		
			Plaintext
		
	
	
	
	
	
			
		
		
	
	
			35 lines
		
	
	
		
			1.4 KiB
		
	
	
	
		
			Plaintext
		
	
	
	
	
	
| <% # TODO: This needs to be extracted into a decorator, or something. It is only a quick hack solution. %>
 | |
| 
 | |
| <% if current_user.acts_as_reviewer? %>
 | |
|   <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>
 | |
| <% end %>
 | |
| 
 | |
| <% 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 %>
 |