]> source.dussan.org Git - sonarqube.git/commitdiff
SONAR-5713 Make it more explicit that custom rule parameters cannot be changed at...
authorJean-Baptiste Lievremont <jean-baptiste.lievremont@sonarsource.com>
Wed, 8 Oct 2014 15:57:48 +0000 (17:57 +0200)
committerJean-Baptiste Lievremont <jean-baptiste.lievremont@sonarsource.com>
Wed, 8 Oct 2014 16:09:06 +0000 (18:09 +0200)
server/sonar-web/src/main/hbs/coding-rules/coding-rules-detail.hbs
server/sonar-web/src/main/hbs/coding-rules/coding-rules-quality-profile-activation.hbs
sonar-core/src/main/resources/org/sonar/l10n/core.properties

index 49e14ad7d1ba112baf330c01623ad7ae1c33a575..24295ac0478e6f1797edaa00a22dae4e2c282d92 100644 (file)
 
 <div class="coding-rules-detail-description rule-desc markdown">{{{htmlDesc}}}</div>
 
-{{#if isEditable}}
-  <div class="coding-rules-detail-description">
-    <div class="button-group">
-      {{#if isManual}}
-        <button id="coding-rules-detail-manual-rule-change">{{t 'edit'}}</button>
-      {{else}}
-        <button id="coding-rules-detail-custom-rule-change">{{t 'edit'}}</button>
-      {{/if}}
-      <button id="coding-rules-detail-rule-delete" class="button-red">{{t 'delete'}}</button>
-    </div>
-  </div>
-{{else}}
+{{#unless isEditable}}
   {{#unless isManual}}
   <div class="coding-rules-detail-description coding-rules-detail-description-extra">
     <div id="coding-rules-detail-description-extra">
     </div>{{/if}}
   </div>
   {{/unless}}
-{{/if}}
+{{/unless}}
 
 
 {{#if params}}
   </div>
 {{/if}}
 
+{{#if isEditable}}
+  <div class="coding-rules-detail-description">
+    <div class="button-group">
+      {{#if isManual}}
+        <button id="coding-rules-detail-manual-rule-change">{{t 'edit'}}</button>
+      {{else}}
+        <button id="coding-rules-detail-custom-rule-change">{{t 'edit'}}</button>
+      {{/if}}
+      <button id="coding-rules-detail-rule-delete" class="button-red">{{t 'delete'}}</button>
+    </div>
+  </div>
+{{/if}}
+
 
 {{#if isTemplate}}
 <div class="coding-rules-detail-custom-rules-section">
index 9e48279434da5f7d2ca3a17abeb5427a6dc23be2..82c3c09a8fc787fdbad008c6d10d87145441d8ee 100644 (file)
           </select>
         </td>
       </tr>
-      {{#unless isCustomRule}}
+      {{#if isCustomRule}}
+      <tr class="property">
+        <td colspan="2">{{t 'coding_rules.custom_rule.activation_notice'}}</td>
+      {{else}}
       {{#each params}}
         <tr class="property">
           <th><h3>{{key}}</h3></th>
@@ -60,7 +63,7 @@
           </td>
         </tr>
       {{/each}}
-      {{/unless}}
+      {{/if}}
     </table>
   </div>
 
index 0023bf0405f44a30613b9d192402e23e2ce77dab..ccb8accde9975999dced54fd595a596aae41ff80 100644 (file)
@@ -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}"?