From: Stas Vilchik Date: Wed, 30 Jul 2014 08:29:30 +0000 (+0200) Subject: SONAR-5490 Improve readability and payload of results in the Coding Rules page X-Git-Tag: 4.5-RC1~320^2~27 X-Git-Url: https://source.dussan.org/?a=commitdiff_plain;h=ae80c0c09c19e021d03016cbb87e5e372b2aabe3;p=sonarqube.git SONAR-5490 Improve readability and payload of results in the Coding Rules page Fix the issue with whitespace when there are no tags and no status --- diff --git a/server/sonar-web/src/main/coffee/coding-rules/views/coding-rules-list-item-view.coffee b/server/sonar-web/src/main/coffee/coding-rules/views/coding-rules-list-item-view.coffee index 92d7aa3aead..0c77a630538 100644 --- a/server/sonar-web/src/main/coffee/coding-rules/views/coding-rules-list-item-view.coffee +++ b/server/sonar-web/src/main/coffee/coding-rules/views/coding-rules-list-item-view.coffee @@ -24,6 +24,8 @@ define [ serializeData: -> + tags = _.union @model.get('sysTags'), @model.get('tags') _.extend super, manualRuleLabel: t 'coding_rules.manual_rule' - allTags: _.union @model.get('sysTags'), @model.get('tags') + allTags: tags + showDetails: (@model.get('status') != 'READY') || (_.isArray(tags) && tags.length > 0) diff --git a/server/sonar-web/src/main/hbs/coding-rules/coding-rules-list-item.hbs b/server/sonar-web/src/main/hbs/coding-rules/coding-rules-list-item.hbs index e8005ae79d2..afa53e8d33d 100644 --- a/server/sonar-web/src/main/hbs/coding-rules/coding-rules-list-item.hbs +++ b/server/sonar-web/src/main/hbs/coding-rules/coding-rules-list-item.hbs @@ -1,16 +1,18 @@
{{default language manualRuleLabel}} -
- {{#if allTags}} - - - {{join allTags ', '}} - -    - {{/if}} + {{#if showDetails}} +
+ {{#if allTags}} + + + {{join allTags ', '}} + +    + {{/if}} - {{#notEq status 'READY'}}{{status}}{{/notEq}} -
+ {{#notEq status 'READY'}}{{status}}{{/notEq}} +
+ {{/if}}
{{name}}