]> source.dussan.org Git - sonarqube.git/commitdiff
SONAR-3088 Keep period config when navigating between dashboards
authorFabrice Bellingard <bellingard@gmail.com>
Thu, 2 Feb 2012 11:49:55 +0000 (12:49 +0100)
committerFabrice Bellingard <bellingard@gmail.com>
Thu, 2 Feb 2012 11:51:23 +0000 (12:51 +0100)
=> When switching from a project dashboard page to another one, the
   differential view configuration should be kept.

sonar-server/src/main/webapp/WEB-INF/app/views/layouts/_layout.html.erb

index 92bdd4e0d132c5b0f9329fa7fcf8356813f5d8ff..f14272916112a56156a8605e03c20267b4370987 100644 (file)
@@ -51,7 +51,7 @@
           <% elsif (selected_section==Navigation::SECTION_RESOURCE) %>
             <% ActiveDashboard.user_dashboards(current_user).each do |active_dashboard| %>
               <li class="<%= 'selected' if @dashboard && controller.controller_path=='dashboard' && active_dashboard.dashboard_id==@dashboard.id -%>">
-                <a href="<%= ApplicationController.root_context -%>/dashboard/index/<%= @project.id -%>?did=<%= active_dashboard.dashboard_id -%>"><%= active_dashboard.dashboard.name(true) -%></a>
+                <a href="<%= ApplicationController.root_context -%>/dashboard/index/<%= @project.id -%>?did=<%= active_dashboard.dashboard_id -%><%= "&period=#{params[:period]}" if params[:period] -%>"><%= active_dashboard.dashboard.name(true) -%></a>
               </li>
             <% end %>
             <li class="<%= 'selected' if request.request_uri.include?('/components/index') -%>">