<% if current_user %>
<span class="actions" id="vActions<%= violation.id -%>">
<%= image_tag("sep12.png") -%>
-
+ <% if violation.review %>
+
<%= link_to_remote (violation.review && violation.review.assignee_id ? "Reassign" : "Assign"),
:url => { :controller => "reviews", :action => "violation_assign_form", :violation_id => violation.id},
:update => "vActions" + violation.id.to_s,
:complete => "$('vActions" + violation.id.to_s + "').show();$('assignee_id').focus();" -%>
+ <% else %>
+
+ <%= link_to_remote "Review",
+ :url => { :controller => "reviews", :action => "violation_comment_form", :id => violation.id },
+ :update => "reviewForm" + violation.id.to_s,
+ :complete => "$('vActions#{violation.id}').hide();$('reviewForm" + violation.id.to_s + "').show();$('commentText" + violation.id.to_s + "').focus()" -%>
+ <% end %>
+
-
<%= link_to_remote (violation.false_positive? ? "Unflag false-positive" : "Flag as false-positive"),
:url => { :controller => "reviews", :action => "violation_false_positive_form", :id => violation.id, :false_positive => !violation.false_positive? },
:update => "reviewForm" + violation.id.to_s,
-<% if current_user %>
+<% if current_user && violation.review %>
<div style="padding: 5px" id="commentAction<%= violation.id -%>">
<%= link_to_remote "Add comment",
:url => { :controller => "reviews", :action => "violation_comment_form", :id => violation.id },