From 9aea27cb1e9ab30780e71dc070feb65b009765fa Mon Sep 17 00:00:00 2001 From: Fabrice Bellingard Date: Mon, 3 Dec 2012 16:35:28 +0100 Subject: [PATCH] SONAR-3972 Move the "Add to favorite" star into the breadcrumbs bar --- .../app/views/dashboard/_header.html.erb | 2 +- .../app/views/layouts/_breadcrumb.html.erb | 26 +++++++++++++------ .../src/main/webapp/stylesheets/layout.css | 5 ++++ 3 files changed, 24 insertions(+), 9 deletions(-) diff --git a/sonar-server/src/main/webapp/WEB-INF/app/views/dashboard/_header.html.erb b/sonar-server/src/main/webapp/WEB-INF/app/views/dashboard/_header.html.erb index 474bf68a477..c23bf7917d4 100644 --- a/sonar-server/src/main/webapp/WEB-INF/app/views/dashboard/_header.html.erb +++ b/sonar-server/src/main/webapp/WEB-INF/app/views/dashboard/_header.html.erb @@ -13,7 +13,7 @@ <% if @snapshot %>

- <%= link_to_favourite(@project) -%> <%= "Version #{@snapshot.version} - " if @snapshot.version.present? -%><%= l @snapshot.created_at -%> + <%= "Version #{@snapshot.version} - " if @snapshot.version.present? -%><%= l @snapshot.created_at -%> <% if @snapshot.project_snapshot.periods? %>
diff --git a/sonar-server/src/main/webapp/WEB-INF/app/views/layouts/_breadcrumb.html.erb b/sonar-server/src/main/webapp/WEB-INF/app/views/layouts/_breadcrumb.html.erb index 8a653b42cc1..bd1ffc42a10 100644 --- a/sonar-server/src/main/webapp/WEB-INF/app/views/layouts/_breadcrumb.html.erb +++ b/sonar-server/src/main/webapp/WEB-INF/app/views/layouts/_breadcrumb.html.erb @@ -1,13 +1,18 @@ <% if @breadcrumbs %>
- <% if @permalink %> -
    +
      + <% if @resource %> +
    • + <%= link_to_favourite(@resource) -%> +
    • + <% end %> + <% if @permalink %>
    • -
    - <% end %> + <% end %> +
    <% @breadcrumbs.each do |breadcrumb| @@ -36,13 +41,18 @@ %>
    - <% if !@review %> -
      +
        + <% if @resource %> +
      • + <%= link_to_favourite(@resource) -%> +
      • + <% end %> + <% if !@review %>
      • -
      - <% end %> + <% end %> +
      <% resource_link = {} diff --git a/sonar-server/src/main/webapp/stylesheets/layout.css b/sonar-server/src/main/webapp/stylesheets/layout.css index 1f6f21b27ed..880ea3eb43e 100644 --- a/sonar-server/src/main/webapp/stylesheets/layout.css +++ b/sonar-server/src/main/webapp/stylesheets/layout.css @@ -143,6 +143,11 @@ body, a { padding: 0 5px 0 0; } +#crumbs-ops li { + float: left; + padding: 0 0 0 10px; +} + #content { padding: 10px; } -- 2.39.5