diff options
author | Grégoire Aubert <gregoire.aubert@sonarsource.com> | 2017-04-13 15:36:08 +0200 |
---|---|---|
committer | Grégoire Aubert <gregaubert@users.noreply.github.com> | 2017-04-13 22:39:40 +0200 |
commit | 8e4fdfb5a554724c7dfc4af94d46ea8d2175c6c0 (patch) | |
tree | 01665f56d16436cc84a236e0352936ab7427b201 /server/sonar-web/src/main/js/apps/groups | |
parent | 39bfea3ee221b6c71479f87a709f31e7d50ae15b (diff) | |
download | sonarqube-8e4fdfb5a554724c7dfc4af94d46ea8d2175c6c0.tar.gz sonarqube-8e4fdfb5a554724c7dfc4af94d46ea8d2175c6c0.zip |
SONAR-6911 Improve the display of default groups
Diffstat (limited to 'server/sonar-web/src/main/js/apps/groups')
-rw-r--r-- | server/sonar-web/src/main/js/apps/groups/list-item-view.js | 12 | ||||
-rw-r--r-- | server/sonar-web/src/main/js/apps/groups/templates/groups-list-item.hbs | 15 |
2 files changed, 20 insertions, 7 deletions
diff --git a/server/sonar-web/src/main/js/apps/groups/list-item-view.js b/server/sonar-web/src/main/js/apps/groups/list-item-view.js index 58ac7ef50b1..ea6a0824950 100644 --- a/server/sonar-web/src/main/js/apps/groups/list-item-view.js +++ b/server/sonar-web/src/main/js/apps/groups/list-item-view.js @@ -46,18 +46,24 @@ export default Marionette.ItemView.extend({ onUpdateClick(e) { e.preventDefault(); - this.updateGroup(); + if (!this.model.get('default')) { + this.updateGroup(); + } }, onDeleteClick(e) { e.preventDefault(); - this.deleteGroup(); + if (!this.model.get('default')) { + this.deleteGroup(); + } }, onUsersClick(e) { e.preventDefault(); $('.tooltip').remove(); - this.showUsers(); + if (!this.model.get('default')) { + this.showUsers(); + } }, updateGroup() { diff --git a/server/sonar-web/src/main/js/apps/groups/templates/groups-list-item.hbs b/server/sonar-web/src/main/js/apps/groups/templates/groups-list-item.hbs index 809a41b624b..85306c7f827 100644 --- a/server/sonar-web/src/main/js/apps/groups/templates/groups-list-item.hbs +++ b/server/sonar-web/src/main/js/apps/groups/templates/groups-list-item.hbs @@ -1,19 +1,26 @@ <div class="pull-right big-spacer-left nowrap"> - <a class="js-group-update icon-edit little-spacer-right" title="Update Details" data-toggle="tooltip" href="#"></a> - <a class="js-group-delete icon-delete" title="Delete" data-toggle="tooltip" href="#"></a> + {{#unless default}} + <a class="js-group-update icon-edit little-spacer-right" title={{t 'users.update_details'}} data-toggle="tooltip" href="#"></a> + <a class="js-group-delete icon-delete" title={{t 'delete'}} data-toggle="tooltip" href="#"></a> + {{/unless}} </div> <div class="display-inline-block text-top width-20"> <strong class="js-group-name">{{name}}</strong> + {{#if default}} + <span class="little-spacer-left">({{t 'default'}})</span> + {{/if}} </div> <div class="display-inline-block text-top big-spacer-left width-25"> <div class="pull-left spacer-right"> - <strong>Members</strong> + <strong>{{t 'members'}}</strong> </div> <div class="overflow-hidden bordered-left"> <span class="spacer-left spacer-right">{{membersCount}}</span> - <a class="js-group-users icon-bullet-list" title="Update Users" data-toggle="tooltip" href="#"></a> + {{#unless default}} + <a class="js-group-users icon-bullet-list" title={{t 'users.update'}} data-toggle="tooltip" href="#"></a> + {{/unless}} </div> </div> |