aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorSimon Brandhof <simon.brandhof@gmail.com>2012-12-10 19:09:35 +0100
committerSimon Brandhof <simon.brandhof@gmail.com>2012-12-10 19:09:35 +0100
commit9c06f3b8c54efcc09db06265ee36e36fff2e44c1 (patch)
tree6037801c41fe2218d75f0d3ff9367053b5f692fc
parent0cbd2d32b8b1d677313a22ad8121cf987e0ed8e6 (diff)
downloadsonarqube-9c06f3b8c54efcc09db06265ee36e36fff2e44c1.tar.gz
sonarqube-9c06f3b8c54efcc09db06265ee36e36fff2e44c1.zip
SONAR-3825 display the shared status in the header
-rw-r--r--plugins/sonar-core-plugin/src/main/resources/org/sonar/l10n/core.properties1
-rw-r--r--sonar-server/src/main/webapp/WEB-INF/app/controllers/measures_controller.rb2
-rw-r--r--sonar-server/src/main/webapp/WEB-INF/app/views/measures/_sidebar.html.erb3
-rw-r--r--sonar-server/src/main/webapp/WEB-INF/app/views/measures/search.html.erb15
-rw-r--r--sonar-server/src/main/webapp/stylesheets/layout.css1
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 @@
</li>
<li id="criteria-key" <%= "style='display:none'" unless @filter.criteria('keyRegexp') -%> class="marginbottom5">
<%= message('measure_filter.key_like') -%>:<br>
- <input type="text" name="keyRegexp" value="<%= h @filter.criteria['keyRegexp'] -%>">
+ <input type="text" name="keyRegexp" value="<%= h @filter.criteria['keyRegexp'] -%>"><br>
+ <span class="note"><%= message 'measure.filter.criteria.key_note' -%></span>
</li>
<li id="criteria-fav" <%= "style='display:none'" unless @filter.criteria('onFavourites') -%> class="marginbottom5">
<img src="<%= ApplicationController.root_context -%>/images/star.png"> <%= 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 @@
<div class="page_title">
<% if @filter.name.present? %>
<span class="h3"><%= h @filter.name -%></span>
- <% if @filter.description.present? %>
- &nbsp;<span class="note"><%= h @filter.description -%></span>
+ <span class="note">
+ <% 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 %>
+ </span>
+ <% if @filter.description.present? %>
+ - <span class="note"><%= h @filter.description -%></span>
+ <% end %>
<% end %>
</div>
</div>
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;
}