aboutsummaryrefslogtreecommitdiffstats
path: root/server/sonar-web/src/main/js/apps/coding-rules/templates
diff options
context:
space:
mode:
authorJulien Lancelot <julien.lancelot@sonarsource.com>2016-03-24 15:08:48 +0100
committerTeryk Bellahsene <teryk.bellahsene@sonarsource.com>2016-03-29 19:11:18 +0200
commit2b604976da1f7dbd47840728ec61b17833e43654 (patch)
tree1f7a193c95f27fa6093e8e9d1d512e9fcf166a9f /server/sonar-web/src/main/js/apps/coding-rules/templates
parent4325cef7f932d26dc3fbf171836c15a15d2e4903 (diff)
downloadsonarqube-2b604976da1f7dbd47840728ec61b17833e43654.tar.gz
sonarqube-2b604976da1f7dbd47840728ec61b17833e43654.zip
SONAR-7470 Drop ability to manage manual rules from UI
Diffstat (limited to 'server/sonar-web/src/main/js/apps/coding-rules/templates')
-rw-r--r--server/sonar-web/src/main/js/apps/coding-rules/templates/coding-rules-filters.hbs6
-rw-r--r--server/sonar-web/src/main/js/apps/coding-rules/templates/coding-rules-rule-details.hbs6
-rw-r--r--server/sonar-web/src/main/js/apps/coding-rules/templates/rule/coding-rules-manual-rule-creation.hbs51
-rw-r--r--server/sonar-web/src/main/js/apps/coding-rules/templates/rule/coding-rules-rule-description.hbs78
-rw-r--r--server/sonar-web/src/main/js/apps/coding-rules/templates/rule/coding-rules-rule-meta.hbs22
5 files changed, 49 insertions, 114 deletions
diff --git a/server/sonar-web/src/main/js/apps/coding-rules/templates/coding-rules-filters.hbs b/server/sonar-web/src/main/js/apps/coding-rules/templates/coding-rules-filters.hbs
index fb62c872c25..e307b61b100 100644
--- a/server/sonar-web/src/main/js/apps/coding-rules/templates/coding-rules-filters.hbs
+++ b/server/sonar-web/src/main/js/apps/coding-rules/templates/coding-rules-filters.hbs
@@ -1,9 +1,3 @@
<h1 class="page-title">
{{t 'coding_rules.page'}}
</h1>
-
-{{#if canWrite}}
- <div class="pull-right button-group">
- <button class="js-create-manual-rule">{{t 'coding_rules.create_manual_rule'}}</button>
- </div>
-{{/if}}
diff --git a/server/sonar-web/src/main/js/apps/coding-rules/templates/coding-rules-rule-details.hbs b/server/sonar-web/src/main/js/apps/coding-rules/templates/coding-rules-rule-details.hbs
index f889780e6c6..eba42ee65ef 100644
--- a/server/sonar-web/src/main/js/apps/coding-rules/templates/coding-rules-rule-details.hbs
+++ b/server/sonar-web/src/main/js/apps/coding-rules/templates/coding-rules-rule-details.hbs
@@ -5,11 +5,7 @@
{{#if isEditable}}
<div class="coding-rules-detail-description">
<div class="button-group">
- {{#if isManual}}
- <button class="js-edit-manual" id="coding-rules-detail-manual-rule-change">{{t 'edit'}}</button>
- {{else}}
- <button class="js-edit-custom" id="coding-rules-detail-custom-rule-change">{{t 'edit'}}</button>
- {{/if}}
+ <button class="js-edit-custom" id="coding-rules-detail-custom-rule-change">{{t 'edit'}}</button>
<button class="button-red js-delete" id="coding-rules-detail-rule-delete" class="button-red">{{t 'delete'}}</button>
</div>
</div>
diff --git a/server/sonar-web/src/main/js/apps/coding-rules/templates/rule/coding-rules-manual-rule-creation.hbs b/server/sonar-web/src/main/js/apps/coding-rules/templates/rule/coding-rules-manual-rule-creation.hbs
deleted file mode 100644
index 858bebf3854..00000000000
--- a/server/sonar-web/src/main/js/apps/coding-rules/templates/rule/coding-rules-manual-rule-creation.hbs
+++ /dev/null
@@ -1,51 +0,0 @@
-<form>
- <div class="modal-head">
- {{#if change}}
- <h2>{{t 'coding_rules.update_manual_rule'}}</h2>
- {{else}}
- <h2>{{t 'coding_rules.create_manual_rule'}}</h2>
- {{/if}}
- </div>
-
- <div class="modal-body">
- <div class="alert alert-warning hidden">{{t 'coding_rules.reactivate.help'}}</div>
- <div class="js-modal-messages"></div>
-
- <table>
- <tr class="property">
- <th class="nowrap"><h3>{{t 'name'}} <em class="mandatory">*</em></h3></th>
- <td>
- <input type="text" name="name" id="coding-rules-manual-rule-creation-name"
- class="coding-rules-name-key" value="{{name}}"/>
- </td>
- </tr>
- <tr class="property">
- <th class="nowrap"><h3>{{t 'key'}}{{#unless change}} <em class="mandatory">*</em>{{/unless}}</h3></th>
- <td>
- {{#if change}}
- {{key}}
- {{else}}
- <input type="text" name="key" id="coding-rules-manual-rule-creation-key"
- class="coding-rules-name-key" value="{{internalKey}}"/>
- {{/if}}
- </td>
- </tr>
- <tr class="property">
- <th class="nowrap"><h3>{{t 'description'}} <em class="mandatory">*</em></h3></th>
- <td>
- <textarea name="markdown_description" id="coding-rules-manual-rule-creation-html-description"
- class="coding-rules-markdown-description" rows="15">{{{mdDesc}}}</textarea>
- <span class="text-right">{{> '../../../../components/common/templates/_markdown-tips' }}</span>
- </td>
- </tr>
- </table>
- </div>
-
- <div class="modal-foot">
- <button id="coding-rules-manual-rule-creation-create">
- {{#if change}}{{t 'save'}}{{else}}{{t 'create'}}{{/if}}
- </button>
- <button id="coding-rules-manual-rule-creation-reactivate">{{t 'coding_rules.reactivate'}}</button>
- <a id="coding-rules-manual-rule-creation-cancel" class="js-modal-close">{{t 'cancel'}}</a>
- </div>
-</form>
diff --git a/server/sonar-web/src/main/js/apps/coding-rules/templates/rule/coding-rules-rule-description.hbs b/server/sonar-web/src/main/js/apps/coding-rules/templates/rule/coding-rules-rule-description.hbs
index f9ad18feb91..9992055a7c6 100644
--- a/server/sonar-web/src/main/js/apps/coding-rules/templates/rule/coding-rules-rule-description.hbs
+++ b/server/sonar-web/src/main/js/apps/coding-rules/templates/rule/coding-rules-rule-description.hbs
@@ -1,48 +1,46 @@
<div class="coding-rules-detail-description rule-desc markdown">{{{htmlDesc}}}</div>
{{#unless isEditable}}
- {{#unless isManual}}
- <div class="coding-rules-detail-description coding-rules-detail-description-extra">
- <div id="coding-rules-detail-description-extra">
- {{#if htmlNote}}
- <div class="rule-desc marginbottom10 markdown">{{{htmlNote}}}</div>
- {{/if}}
- {{#if canWrite}}
- <div class="button-group">
- <button id="coding-rules-detail-extend-description">{{t 'coding_rules.extend_description'}}</button>
- </div>
- {{/if}}
- </div>
-
+ <div class="coding-rules-detail-description coding-rules-detail-description-extra">
+ <div id="coding-rules-detail-description-extra">
+ {{#if htmlNote}}
+ <div class="rule-desc marginbottom10 markdown">{{{htmlNote}}}</div>
+ {{/if}}
{{#if canWrite}}
- <div class="coding-rules-detail-extend-description-form hidden">
- <table class="width100">
- <tbody>
- <tr>
- <td class="width100" colspan="2">
- <textarea id="coding-rules-detail-extend-description-text" rows="4"
- style="width: 100%; margin-bottom: 4px;">{{mdNote}}</textarea>
- </td>
- </tr>
- <tr>
- <td>
- <div class="button-group">
- <button id="coding-rules-detail-extend-description-submit">{{t 'save'}}</button>
- {{#if mdNote}}
- <button id="coding-rules-detail-extend-description-remove"
- class="button-red">{{t 'remove'}}</button>
- {{/if}}
- </div>
- <a id="coding-rules-detail-extend-description-cancel" class="action">{{t 'cancel'}}</a>
- </td>
- <td class="text-right">
- {{> '../../../../components/common/templates/_markdown-tips' }}
- </td>
- </tr>
- </tbody>
- </table>
+ <div class="button-group">
+ <button id="coding-rules-detail-extend-description">{{t 'coding_rules.extend_description'}}</button>
</div>
{{/if}}
</div>
- {{/unless}}
+
+ {{#if canWrite}}
+ <div class="coding-rules-detail-extend-description-form hidden">
+ <table class="width100">
+ <tbody>
+ <tr>
+ <td class="width100" colspan="2">
+ <textarea id="coding-rules-detail-extend-description-text" rows="4"
+ style="width: 100%; margin-bottom: 4px;">{{mdNote}}</textarea>
+ </td>
+ </tr>
+ <tr>
+ <td>
+ <div class="button-group">
+ <button id="coding-rules-detail-extend-description-submit">{{t 'save'}}</button>
+ {{#if mdNote}}
+ <button id="coding-rules-detail-extend-description-remove"
+ class="button-red">{{t 'remove'}}</button>
+ {{/if}}
+ </div>
+ <a id="coding-rules-detail-extend-description-cancel" class="action">{{t 'cancel'}}</a>
+ </td>
+ <td class="text-right">
+ {{> '../../../../components/common/templates/_markdown-tips' }}
+ </td>
+ </tr>
+ </tbody>
+ </table>
+ </div>
+ {{/if}}
+ </div>
{{/unless}}
diff --git a/server/sonar-web/src/main/js/apps/coding-rules/templates/rule/coding-rules-rule-meta.hbs b/server/sonar-web/src/main/js/apps/coding-rules/templates/rule/coding-rules-rule-meta.hbs
index 1b225182a0d..57503382826 100644
--- a/server/sonar-web/src/main/js/apps/coding-rules/templates/rule/coding-rules-rule-meta.hbs
+++ b/server/sonar-web/src/main/js/apps/coding-rules/templates/rule/coding-rules-rule-meta.hbs
@@ -15,17 +15,15 @@
</header>
<ul class="coding-rules-detail-properties">
- {{#unless isManual}}
- <li class="coding-rules-detail-property"
- data-toggle="tooltip" data-placement="bottom" title="{{t 'coding_rules.type.tooltip' this.type}}">
- {{issueType this.type}}
- </li>
+ <li class="coding-rules-detail-property"
+ data-toggle="tooltip" data-placement="bottom" title="{{t 'coding_rules.type.tooltip' this.type}}">
+ {{issueType this.type}}
+ </li>
- <li class="coding-rules-detail-property"
- data-toggle="tooltip" data-placement="bottom" title="Default rule severity">
- {{severityIcon severity}}&nbsp;{{t "severity" severity}}
- </li>
- {{/unless}}
+ <li class="coding-rules-detail-property"
+ data-toggle="tooltip" data-placement="bottom" title="Default rule severity">
+ {{severityIcon severity}}&nbsp;{{t "severity" severity}}
+ </li>
{{#notEq status 'READY'}}
<li class="coding-rules-detail-property"
@@ -54,8 +52,8 @@
<li class="coding-rules-detail-property">{{t 'coding_rules.available_since'}} {{d createdAt}}</li>
<li class="coding-rules-detail-property"
- data-toggle="tooltip" data-placement="bottom" title="Rule repository{{#unless isManual}} (language){{/unless}}">
- {{repoName}}{{#unless isManual}} ({{langName}}){{/unless}}
+ data-toggle="tooltip" data-placement="bottom" title="Rule repository{(language)">
+ {{repoName}}({{langName}})
</li>
{{#if isTemplate}}