From 9c06f3b8c54efcc09db06265ee36e36fff2e44c1 Mon Sep 17 00:00:00 2001 From: Simon Brandhof Date: Mon, 10 Dec 2012 19:09:35 +0100 Subject: [PATCH] SONAR-3825 display the shared status in the header --- .../main/resources/org/sonar/l10n/core.properties | 1 + .../app/controllers/measures_controller.rb | 2 +- .../WEB-INF/app/views/measures/_sidebar.html.erb | 3 ++- .../WEB-INF/app/views/measures/search.html.erb | 15 +++++++++++++-- .../src/main/webapp/stylesheets/layout.css | 1 - 5 files changed, 17 insertions(+), 5 deletions(-) diff --git a/plugins/sonar-core-plugin/src/main/resources/org/sonar/l10n/core.properties b/plugins/sonar-core-plugin/src/main/resources/org/sonar/l10n/core.properties index 8fc028e7661..aa33bb80644 100644 --- a/plugins/sonar-core-plugin/src/main/resources/org/sonar/l10n/core.properties +++ b/plugins/sonar-core-plugin/src/main/resources/org/sonar/l10n/core.properties @@ -390,6 +390,7 @@ measure_filter.criteria.age=Age measure_filter.criteria.date=Date measure_filter.criteria.only_favourites=Favourites only measure_filter.criteria.key=Key +measure.filter.criteria.key_note=Use * to match zero or more characters and ? to match any single character measure_filter.criteria.name=Name measure_filter.criteria.language=Language measure_filter.criteria.metric=Metric diff --git a/sonar-server/src/main/webapp/WEB-INF/app/controllers/measures_controller.rb b/sonar-server/src/main/webapp/WEB-INF/app/controllers/measures_controller.rb index 6d6c80b2fac..3447146fbff 100644 --- a/sonar-server/src/main/webapp/WEB-INF/app/controllers/measures_controller.rb +++ b/sonar-server/src/main/webapp/WEB-INF/app/controllers/measures_controller.rb @@ -27,7 +27,7 @@ class MeasuresController < ApplicationController def search if params[:id] - @filter = MeasureFilter.find(params[:id]) + @filter = find_filter(params[:id]) else @filter = MeasureFilter.new end diff --git a/sonar-server/src/main/webapp/WEB-INF/app/views/measures/_sidebar.html.erb b/sonar-server/src/main/webapp/WEB-INF/app/views/measures/_sidebar.html.erb index 30f77a4ddca..0ade74a697c 100644 --- a/sonar-server/src/main/webapp/WEB-INF/app/views/measures/_sidebar.html.erb +++ b/sonar-server/src/main/webapp/WEB-INF/app/views/measures/_sidebar.html.erb @@ -110,7 +110,8 @@
  • class="marginbottom5"> <%= message('measure_filter.key_like') -%>:
    - +
    + <%= message 'measure.filter.criteria.key_note' -%>
  • class="marginbottom5"> <%= message 'measure_filter.criteria.only_favourites' %>: diff --git a/sonar-server/src/main/webapp/WEB-INF/app/views/measures/search.html.erb b/sonar-server/src/main/webapp/WEB-INF/app/views/measures/search.html.erb index c440fd2862a..a227532530e 100644 --- a/sonar-server/src/main/webapp/WEB-INF/app/views/measures/search.html.erb +++ b/sonar-server/src/main/webapp/WEB-INF/app/views/measures/search.html.erb @@ -34,9 +34,20 @@
    <% if @filter.name.present? %> <%= h @filter.name -%> - <% if @filter.description.present? %> -  <%= h @filter.description -%> + + <% if !@filter.shared %> + [<%= message 'measure_filter.private' -%>] + <% elsif logged_in? && @filter.user_id==current_user.id %> + [<%= message 'measure_filter.shared_with_all_users' -%>] + <% elsif @filter.user_id %> + [<%= message 'shared_by' -%> <%= @filter.user.name -%>] + <% else %> + [<%= message 'shared_by' -%> Sonar] <% end %> + + <% if @filter.description.present? %> + - <%= h @filter.description -%> + <% end %> <% end %>
    diff --git a/sonar-server/src/main/webapp/stylesheets/layout.css b/sonar-server/src/main/webapp/stylesheets/layout.css index 4db279d1c02..ed76d28fd1c 100644 --- a/sonar-server/src/main/webapp/stylesheets/layout.css +++ b/sonar-server/src/main/webapp/stylesheets/layout.css @@ -207,7 +207,6 @@ ul.sidebar { ul.sidebar li { list-style-type: none; - line-height: 1.1em; padding: 3px 10px; } -- 2.39.5