]> source.dussan.org Git - sonarqube.git/commitdiff
SONAR-4913 Update issue and measures page to show sharing details
authorStas Vilchik <vilchiks@gmail.com>
Thu, 13 Mar 2014 06:24:05 +0000 (12:24 +0600)
committerStas Vilchik <vilchiks@gmail.com>
Thu, 13 Mar 2014 06:24:05 +0000 (12:24 +0600)
plugins/sonar-core-plugin/src/main/resources/org/sonar/l10n/core.properties
sonar-server/src/main/webapp/WEB-INF/app/views/issues/templates/_header.hbs.erb
sonar-server/src/main/webapp/WEB-INF/app/views/measures/_search_header.html.erb
sonar-server/src/main/webapp/javascripts/issues/extra.js
sonar-server/src/main/webapp/stylesheets/navigator.css
sonar-server/src/main/webapp/stylesheets/navigator/base.css
sonar-server/src/main/webapp/stylesheets/navigator/base.less

index 5d64d7b8e2af474214331c3a711a70471def8bb7..8a11a25a530a466f165f1d5d931cdcd5346ce060 100644 (file)
@@ -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
index 73642686161d99ce72562d9700e220eef6770dd2..e2187aa7baf55d9225ef5d82307a6608c357a11e 100644 (file)
@@ -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>
index 3b06a9fec0d7fe84d3142442e1f8ee42322d7f1f..20001f1b102ce949ff7c5732627550e1b02ae391 100644 (file)
@@ -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 %>
index 89b29704a67e9f9900455eb582d3776e2d1f3db7..05b62be2c9192c67bdb93f5c6039ade098445ad9 100644 (file)
@@ -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());
         }
 
index 3a0c5fd6f2a58e69d9fc50b8746c2fbdf85a843b..b1f659991c23e63d4bb195aec89772718a6475e8 100644 (file)
   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;
index 75947e16c9d31207f8155150b2c6704cddaf9d74..1ea09e693496dd7bf5fd9642b616b556a991878c 100644 (file)
   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;
index f779c3a14486f2b788d06a8898a0da9a9beb38a8..d14c174282085056bdc56c96153f968d493e2a9f 100644 (file)
   line-height: @navigatorHeaderHeight;
 }
 
+.navigator-header-title-note {
+  vertical-align: middle;
+  color: #777;
+  font-size: @smallFontSize;
+}
+
 .navigator-header-description {
   display: inline-block;
   vertical-align: middle;