]> source.dussan.org Git - sonarqube.git/commitdiff
SONAR-3972 Remove permalink icon in the breadcrumbs bar
authorFabrice Bellingard <fabrice.bellingard@sonarsource.com>
Wed, 5 Dec 2012 14:16:39 +0000 (15:16 +0100)
committerFabrice Bellingard <fabrice.bellingard@sonarsource.com>
Wed, 5 Dec 2012 14:46:23 +0000 (15:46 +0100)
- And also do not display the star and the "Configuration" dropdown
  when showing a review.

sonar-server/src/main/webapp/WEB-INF/app/controllers/comparison_controller.rb
sonar-server/src/main/webapp/WEB-INF/app/views/layouts/_breadcrumb.html.erb

index 238de579673609d821250d6baad7549cc8e4d542..a2ee45dbbc9e4e18820f9e6b973df750792ad418 100644 (file)
@@ -58,11 +58,6 @@ class ComparisonController < ApplicationController
     @metrics = Metric.by_keys(metrics)
     
     @metric_to_choose = Metric.all.select {|m| m.display? && !@metrics.include?(m)}.sort_by(&:short_name)
-    
-    # UI breadcrumb and permalink
-    unless @snapshots.empty?
-      @permalink = url_for :controller => 'comparison', :action => 'index', :sids => @snapshots.map {|s| s.id.to_s}.join(','), :metrics => @metrics.map {|m| m.key}.join(',')
-    end
   end
   
   def versions
index bc3d59fb70459f71f875deea2737065b4b33189a..1cef87926938295838cf08379a8c1528a0dce20c 100644 (file)
@@ -6,18 +6,13 @@
 
   <div id="crumbs">
     <ul id="crumbs-ops">
-      <% if displayed_resource %>
+      <% if displayed_resource && !@review %>
         <li>
           <%= link_to_favourite(displayed_resource) -%>
         </li>
-      <% end %>
-      <% if @permalink %>
-        <li>
-          <a href="<%= @permalink -%>"><img src="<%= ApplicationController.root_context -%>/images/permalink.png" width="16" height="16" title="<%= message('permalink') -%>"/></a>
-        </li>
-      <% end %>
-      <% if displayed_resource && has_role?(:admin, displayed_resource) && !displayed_resource.entity? %>
-        <%= render 'layouts/menu_resource_settings' -%>
+        <% if has_role?(:admin, displayed_resource) && !displayed_resource.entity? %>
+          <%= render 'layouts/menu_resource_settings' -%>
+        <% end %>
       <% end %>
     </ul>
     <ul id="bc">
 
   <div id="crumbs">
     <ul id="crumbs-ops">
-      <% if displayed_resource %>
+      <% if displayed_resource && !@review %>
         <li>
           <%= link_to_favourite(displayed_resource) -%>
         </li>
-      <% end %>
-      <% if !@review %>
-        <li>
-          <a href="<%= url_for(:overwrite_params => {:id => displayed_resource.key}) -%>"><img src="<%= ApplicationController.root_context -%>/images/permalink.png" width="16" height="16" title="<%= message('permalink') -%>"/></a>
-        </li>
-      <% end %>
-      <% if displayed_resource && has_role?(:admin, displayed_resource) && !displayed_resource.entity? %>
-        <%= render 'layouts/menu_resource_settings' -%>
+        <% if has_role?(:admin, displayed_resource) && !displayed_resource.entity? %>
+          <%= render 'layouts/menu_resource_settings' -%>
+        <% end %>
       <% end %>
     </ul>
     <ul id="bc">