diff options
7 files changed, 50 insertions, 11 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 5d64d7b8e2a..8a11a25a530 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 @@ -660,6 +660,7 @@ issue_filter.no_filters=No filters issue_filter.delete_confirm_title=Delete Filter issue_filter.are_you_sure_want_delete_filter_x=Are you sure that you want to delete the filter "{0}"? issue_filter.private=Private +issue_filter.shared=Shared issue_filter.shared_with_all_users=Shared with all users issue_filter.sharing=Sharing issue_filter.no_issues=No Issues diff --git a/sonar-server/src/main/webapp/WEB-INF/app/views/issues/templates/_header.hbs.erb b/sonar-server/src/main/webapp/WEB-INF/app/views/issues/templates/_header.hbs.erb index 73642686161..e2187aa7baf 100644 --- a/sonar-server/src/main/webapp/WEB-INF/app/views/issues/templates/_header.hbs.erb +++ b/sonar-server/src/main/webapp/WEB-INF/app/views/issues/templates/_header.hbs.erb @@ -1,5 +1,24 @@ <script id="issues-header-template" type="text/x-handlebars-template"> - <h1 class="navigator-header-title">{{#if name}}{{name}}{{else}}<%= message ('issues') -%>{{/if}}</h1> + <h1 class="navigator-header-title"> + {{#if name}} + {{name}} + <span class="navigator-header-title-note"> + {{#unless shared}} + [<%= message 'issue_filter.private' -%>] + {{else}} + {{#eq user currentUser}} + [<%= message 'issue_filter.shared_with_all_users' -%>] + {{else}} + {{#if user}} + [<%= message 'issue_filter.shared' -%>] + {{/if}} + {{/eq}} + {{/unless}} + </span> + {{else}} + <%= message ('issues') -%> + {{/if}} + </h1> <div class="navigator-header-actions button-group"> <button id="issues-new-search"><%= message ('issue_filter.new_search') -%></button> diff --git a/sonar-server/src/main/webapp/WEB-INF/app/views/measures/_search_header.html.erb b/sonar-server/src/main/webapp/WEB-INF/app/views/measures/_search_header.html.erb index 3b06a9fec0d..20001f1b102 100644 --- a/sonar-server/src/main/webapp/WEB-INF/app/views/measures/_search_header.html.erb +++ b/sonar-server/src/main/webapp/WEB-INF/app/views/measures/_search_header.html.erb @@ -6,15 +6,17 @@ <h1 id="filter-title" class="navigator-header-title"> <% if @filter.id && @filter.name.present? %> <%= h @filter.name -%> - <% 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 class="navigator-header-title-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> <% else %> <%= message('layout.measures') -%> <% end %> diff --git a/sonar-server/src/main/webapp/javascripts/issues/extra.js b/sonar-server/src/main/webapp/javascripts/issues/extra.js index 89b29704a67..05b62be2c91 100644 --- a/sonar-server/src/main/webapp/javascripts/issues/extra.js +++ b/sonar-server/src/main/webapp/javascripts/issues/extra.js @@ -497,7 +497,8 @@ define( serializeData: function () { return _.extend({ canSave: this.model.id && this.options.app.state.get('search'), - appState: window.SS.appState.toJSON() + appState: window.SS.appState.toJSON(), + currentUser: window.SS.currentUser }, this.model.toJSON()); } diff --git a/sonar-server/src/main/webapp/stylesheets/navigator.css b/sonar-server/src/main/webapp/stylesheets/navigator.css index 3a0c5fd6f2a..b1f659991c2 100644 --- a/sonar-server/src/main/webapp/stylesheets/navigator.css +++ b/sonar-server/src/main/webapp/stylesheets/navigator.css @@ -144,6 +144,11 @@ font-size: 20px; line-height: 37px; } +.navigator-header-title-note { + vertical-align: middle; + color: #777; + font-size: 11px; +} .navigator-header-description { display: inline-block; vertical-align: middle; diff --git a/sonar-server/src/main/webapp/stylesheets/navigator/base.css b/sonar-server/src/main/webapp/stylesheets/navigator/base.css index 75947e16c9d..1ea09e69349 100644 --- a/sonar-server/src/main/webapp/stylesheets/navigator/base.css +++ b/sonar-server/src/main/webapp/stylesheets/navigator/base.css @@ -144,6 +144,11 @@ font-size: 20px; line-height: 37px; } +.navigator-header-title-note { + vertical-align: middle; + color: #777; + font-size: 11px; +} .navigator-header-description { display: inline-block; vertical-align: middle; diff --git a/sonar-server/src/main/webapp/stylesheets/navigator/base.less b/sonar-server/src/main/webapp/stylesheets/navigator/base.less index f779c3a1448..d14c1742820 100644 --- a/sonar-server/src/main/webapp/stylesheets/navigator/base.less +++ b/sonar-server/src/main/webapp/stylesheets/navigator/base.less @@ -153,6 +153,12 @@ line-height: @navigatorHeaderHeight; } +.navigator-header-title-note { + vertical-align: middle; + color: #777; + font-size: @smallFontSize; +} + .navigator-header-description { display: inline-block; vertical-align: middle; |