diff options
author | Jean-Baptiste Lievremont <jean-baptiste.lievremont@sonarsource.com> | 2014-07-22 09:37:19 +0200 |
---|---|---|
committer | Jean-Baptiste Lievremont <jean-baptiste.lievremont@sonarsource.com> | 2014-07-22 09:37:26 +0200 |
commit | fcc01fc2f80a914ed6a99742ff2a4c7d6799ca59 (patch) | |
tree | d04004f2914d7f8ca173692ce5f1147d19708573 /server | |
parent | 9a5ebae109e097b0f3401f306d75aaa1b0edcd1b (diff) | |
download | sonarqube-fcc01fc2f80a914ed6a99742ff2a4c7d6799ca59.tar.gz sonarqube-fcc01fc2f80a914ed6a99742ff2a4c7d6799ca59.zip |
SONAR-3373 Fix availability of the "Create" button
Diffstat (limited to 'server')
-rw-r--r-- | server/sonar-web/src/main/coffee/coding-rules/views/header-view.coffee | 5 | ||||
-rw-r--r-- | server/sonar-web/src/main/hbs/coding-rules/coding-rules-header.hbs | 2 |
2 files changed, 6 insertions, 1 deletions
diff --git a/server/sonar-web/src/main/coffee/coding-rules/views/header-view.coffee b/server/sonar-web/src/main/coffee/coding-rules/views/header-view.coffee index b3554347edf..caa03b54779 100644 --- a/server/sonar-web/src/main/coffee/coding-rules/views/header-view.coffee +++ b/server/sonar-web/src/main/coffee/coding-rules/views/header-view.coffee @@ -21,3 +21,8 @@ define [ createRule: -> @options.app.createManualRule() + + + serializeData: -> + _.extend super, + 'canWrite': @options.app.canWrite diff --git a/server/sonar-web/src/main/hbs/coding-rules/coding-rules-header.hbs b/server/sonar-web/src/main/hbs/coding-rules/coding-rules-header.hbs index 12fbc46ac5c..6f539db926b 100644 --- a/server/sonar-web/src/main/hbs/coding-rules/coding-rules-header.hbs +++ b/server/sonar-web/src/main/hbs/coding-rules/coding-rules-header.hbs @@ -2,5 +2,5 @@ <div class="navigator-header-actions button-group"> <button id="coding-rules-new-search">{{t 'coding_rules.new_search'}}</button> - <button id="coding-rules-create-rule">{{t 'coding_rules.create'}}</button> + {{#if canWrite}}<button id="coding-rules-create-rule">{{t 'coding_rules.create'}}</button>{{/if}} </div> |