From ba0bfb94be915c5e6c4663da4d94a5ccbce94170 Mon Sep 17 00:00:00 2001 From: Stas Vilchik Date: Fri, 23 May 2014 17:02:32 +0200 Subject: [PATCH] SONAR-5333 Improve UI --- sonar-server/src/main/hbs/issues/issue.hbs | 24 +++++++------------ .../main/js/common/handlebars-extensions.js | 12 ++-------- .../src/main/less/component-viewer.less | 3 ++- sonar-server/src/main/less/style.less | 11 +++++---- 4 files changed, 18 insertions(+), 32 deletions(-) diff --git a/sonar-server/src/main/hbs/issues/issue.hbs b/sonar-server/src/main/hbs/issues/issue.hbs index 8e75cd7ad72..b9480d122f4 100644 --- a/sonar-server/src/main/hbs/issues/issue.hbs +++ b/sonar-server/src/main/hbs/issues/issue.hbs @@ -25,23 +25,9 @@ {{#if resolution}}({{translate "resolutions" resolution}}){{/if}} {{#ifNotEmpty transitions}} - {{#withFirst transitions}} + {{#each transitions}} {{translate "transitions" this}} - {{/withFirst}} - - {{#ifHasExtraTransitions transitions}} - - - {{/ifHasExtraTransitions}} + {{/each}} {{/ifNotEmpty}} @@ -97,6 +83,12 @@ + {{else}} + {{#inArray actions "set_severity"}} +
  • + {{translate "actions.set_severity"}} +
  • + {{/inArray}} {{/ifHasExtraActions}} {{#if debt}} diff --git a/sonar-server/src/main/js/common/handlebars-extensions.js b/sonar-server/src/main/js/common/handlebars-extensions.js index 0df9ff818e9..59ca2b3d9a1 100644 --- a/sonar-server/src/main/js/common/handlebars-extensions.js +++ b/sonar-server/src/main/js/common/handlebars-extensions.js @@ -160,20 +160,12 @@ define(['handlebars', 'moment'], function (Handlebars, moment) { }, ''); }); - Handlebars.registerHelper('ifHasExtraTransitions', function(transitions, options) { - if (transitions && transitions.length > 1) { - return options.fn(this); - } else { - return ''; - } - }); - Handlebars.registerHelper('ifHasExtraActions', function(actions, options) { - var actionsLeft = _.difference(actions, _.without(defaultActions, 'set_severity')); + var actionsLeft = _.difference(actions, defaultActions); if (actionsLeft.length > 0) { return options.fn(this); } else { - return ''; + return options.inverse(this); } }); diff --git a/sonar-server/src/main/less/component-viewer.less b/sonar-server/src/main/less/component-viewer.less index ac9577442af..74167741413 100644 --- a/sonar-server/src/main/less/component-viewer.less +++ b/sonar-server/src/main/less/component-viewer.less @@ -295,7 +295,7 @@ .component-viewer-header-component-project { color: #777; font-size: @smallFontSize; - margin-bottom: 4px; + margin-bottom: 3px; } .component-viewer-header-component-name { @@ -388,6 +388,7 @@ display: block; color: @baseFontColor; font-size: 18px; + font-weight: 300; i { position: relative; diff --git a/sonar-server/src/main/less/style.less b/sonar-server/src/main/less/style.less index db8c2a0c6ed..21a0b797066 100644 --- a/sonar-server/src/main/less/style.less +++ b/sonar-server/src/main/less/style.less @@ -2232,13 +2232,13 @@ table.nowrap td.small, td.nowrap.small, th.nowrap.small { /* Used on links which are located inside a dense text place or in tables */ /* in order to rapidly identify them */ .link-action { - text-decoration: underline !important; - color: #4183C4 !important; - cursor: pointer; + .widget-link; + + &.link-red { .widget-link-red; } } .link-red { - color: #990000 !important; + color: @red !important; } .link-more { @@ -2293,7 +2293,8 @@ table.nowrap td.small, td.nowrap.small, th.nowrap.small { .dropdown-menu a { text-decoration: none !important; - color: #333 !important; + border-bottom: none !important; + color: @baseFontColor !important; } .form-key-cell { -- 2.39.5