period_index=nil if period_index && period_index<=0
if resource.display_dashboard?
if options[:dashboard]
- link_to(name || resource.name, {:overwrite_params => {:controller => 'dashboard', :action => 'index', :id => (resource.copy_resource_id||resource.id), :period => period_index}}, :title => options[:title])
+ link_to(name || resource.name, {:overwrite_params => {:controller => 'dashboard', :action => 'index', :id => (resource.copy_resource_id||resource.id), :period => period_index, :tab => options[:tab]}}, :title => options[:title])
else
# stay on the same page (for example components)
- link_to(name || resource.name, {:overwrite_params => {:id => (resource.copy_resource_id||resource.id), :period => period_index}}, :title => options[:title])
+ link_to(name || resource.name, {:overwrite_params => {:id => (resource.copy_resource_id||resource.id), :period => period_index, :tab => options[:tab]}}, :title => options[:title])
end
else
- link_to(name || resource.name, {:controller => 'resource', :action => 'index', :id => resource.id, :period => period_index}, :popup => ['resource', 'height=800,width=900,scrollbars=1,resizable=1'], :title => options[:title])
+ link_to(name || resource.name, {:controller => 'resource', :action => 'index', :id => resource.id, :period => period_index, :tab => options[:tab]}, :popup => ['resource', 'height=800,width=900,scrollbars=1,resizable=1'], :title => options[:title])
end
end
--- /dev/null
+<h3>Help Tips</h3>
+<table>
+ <tr>
+ <td>*bold*</td>
+ <td class="sep"></td>
+ <td><b>bold</b></td>
+ </tr>
+ <tr>
+ <td>``code``</td>
+ <td class="sep"></td>
+ <td><code>code</code></td>
+ </tr>
+ <tr>
+ <td colspan="3">* Bulleted point</td>
+ </tr>
+</table>
\ No newline at end of file
<% if current_user %>
<span class="actions" id="vActions<%= violation.id -%>">
<%= image_tag("sep12.png") -%>
- <% if violation.review %>
+ <%
+ if violation.review
+ unless violation.false_positive?
+ %>
<%= 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 %>
+ <%
+ end
+ else
+ %>
<%= link_to_remote "Review",
:url => { :controller => "reviews", :action => "violation_comment_form", :id => violation.id },
<% end %>
- <%= link_to_remote (violation.false_positive? ? "Unflag false-positive" : "Flag as false-positive"),
+ <%= link_to_remote (violation.false_positive? ? "Unflag as 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,
:complete => "$('vActions" + violation.id.to_s + "').hide();$('reviewForm" + violation.id.to_s + "').show();$('commentText" + violation.id.to_s + "').focus();" -%>
</td>
<td class="sep"></td>
<td style="vertical-align:top;width: 90px">
- <h3>Help Tips</h3>
- <table>
- <tr>
- <td>*bold*</td>
- <td class="sep"></td>
- <td><b>bold</b></td>
- </tr>
- <tr>
- <td>''code''</td>
- <td class="sep"></td>
- <td><code>code</code></td>
- </tr>
- <tr>
- <td colspan="3">* Bulleted point</td>
- </tr>
- </table>
+ <%= render :partial => 'markdown/help' -%>
</td>
</tr>
</table>
<td class="val" colspan="3">
<%= qualifier_icon(@review.resource) -%>
<% if !review.on_project? %> <%= @review.project.long_name -%> <%= image_tag 'sep12.png' -%> <% end %>
- <%= link_to_resource(review.resource, review.resource.long_name) %>
+ <%= link_to_resource(review.resource, review.resource.long_name, { :tab => :violations } ) %>
</td>
</tr>
</table>
</td>
<td class="sep"></td>
<td style="vertical-align:top;width: 90px">
- <h3>Help Tips</h3>
- <table>
- <tr>
- <td>*bold*</td>
- <td class="sep"></td>
- <td><b>bold</b></td>
- </tr>
- <tr>
- <td>''code''</td>
- <td class="sep"></td>
- <td><code>code</code></td>
- </tr>
- <tr>
- <td colspan="3">* Bulleted point</td>
- </tr>
- </table>
+ <%= render :partial => 'markdown/help' -%>
</td>
</tr>
</table>