From 8e4fdfb5a554724c7dfc4af94d46ea8d2175c6c0 Mon Sep 17 00:00:00 2001 From: Grégoire Aubert Date: Thu, 13 Apr 2017 15:36:08 +0200 Subject: SONAR-6911 Improve the display of default groups --- .../sonar-web/src/main/js/apps/groups/list-item-view.js | 12 +++++++++--- .../main/js/apps/groups/templates/groups-list-item.hbs | 15 +++++++++++---- 2 files changed, 20 insertions(+), 7 deletions(-) (limited to 'server/sonar-web/src/main/js/apps/groups') 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 @@
- - + {{#unless default}} + + + {{/unless}}
{{name}} + {{#if default}} + ({{t 'default'}}) + {{/if}}
- Members + {{t 'members'}}
{{membersCount}} - + {{#unless default}} + + {{/unless}}
-- cgit v1.2.3