From f58e7e8c41c3972ffeae189b5368d1d29d006de7 Mon Sep 17 00:00:00 2001 From: Jean-Baptiste Lievremont Date: Wed, 8 Oct 2014 17:57:48 +0200 Subject: [PATCH] SONAR-5713 Make it more explicit that custom rule parameters cannot be changed at activation --- .../hbs/coding-rules/coding-rules-detail.hbs | 28 ++++++++++--------- ...oding-rules-quality-profile-activation.hbs | 7 +++-- .../resources/org/sonar/l10n/core.properties | 1 + 3 files changed, 21 insertions(+), 15 deletions(-) diff --git a/server/sonar-web/src/main/hbs/coding-rules/coding-rules-detail.hbs b/server/sonar-web/src/main/hbs/coding-rules/coding-rules-detail.hbs index 49e14ad7d1b..24295ac0478 100644 --- a/server/sonar-web/src/main/hbs/coding-rules/coding-rules-detail.hbs +++ b/server/sonar-web/src/main/hbs/coding-rules/coding-rules-detail.hbs @@ -51,18 +51,7 @@
{{{htmlDesc}}}
-{{#if isEditable}} -
-
- {{#if isManual}} - - {{else}} - - {{/if}} - -
-
-{{else}} +{{#unless isEditable}} {{#unless isManual}}
@@ -105,7 +94,7 @@
{{/if}}
{{/unless}} -{{/if}} +{{/unless}} {{#if params}} @@ -135,6 +124,19 @@ {{/if}} +{{#if isEditable}} +
+
+ {{#if isManual}} + + {{else}} + + {{/if}} + +
+
+{{/if}} + {{#if isTemplate}}
diff --git a/server/sonar-web/src/main/hbs/coding-rules/coding-rules-quality-profile-activation.hbs b/server/sonar-web/src/main/hbs/coding-rules/coding-rules-quality-profile-activation.hbs index 9e48279434d..82c3c09a8fc 100644 --- a/server/sonar-web/src/main/hbs/coding-rules/coding-rules-quality-profile-activation.hbs +++ b/server/sonar-web/src/main/hbs/coding-rules/coding-rules-quality-profile-activation.hbs @@ -35,7 +35,10 @@ - {{#unless isCustomRule}} + {{#if isCustomRule}} + + {{t 'coding_rules.custom_rule.activation_notice'}} + {{else}} {{#each params}}

{{key}}

@@ -60,7 +63,7 @@ {{/each}} - {{/unless}} + {{/if}}
diff --git a/sonar-core/src/main/resources/org/sonar/l10n/core.properties b/sonar-core/src/main/resources/org/sonar/l10n/core.properties index 0023bf0405f..ccb8accde99 100644 --- a/sonar-core/src/main/resources/org/sonar/l10n/core.properties +++ b/sonar-core/src/main/resources/org/sonar/l10n/core.properties @@ -1738,6 +1738,7 @@ coding_rules.create_custom_rule=Create Custom Rule coding_rules.create_manual_rule=Create Manual Rule coding_rules.custom_rule=Custom Rule coding_rules.custom_rule.title=This rule has been created through customization of a rule template +coding_rules.custom_rule.activation_notice=Note: parameters of a custom rule are not customizable on rule activation, only on custom rule edition. coding_rules.custom_rules=Custom Rules coding_rules.delete.custom.confirm=Are you sure you want to delete custom rule "{0}"? coding_rules.delete.manual.confirm=Are you sure you want to delete manual rule "{0}"? -- 2.39.5