From bf24c787762e7cf53ef636c6d1e7782141b2812d Mon Sep 17 00:00:00 2001 From: Stas Vilchik Date: Tue, 26 Aug 2014 18:05:09 +0600 Subject: [PATCH] SONAR-4963 Display group description in User window --- .../app/views/permission_templates/_edit_groups.html.erb | 8 +++++++- .../webapp/WEB-INF/app/views/roles/_edit_groups.html.erb | 8 +++++++- 2 files changed, 14 insertions(+), 2 deletions(-) diff --git a/server/sonar-web/src/main/webapp/WEB-INF/app/views/permission_templates/_edit_groups.html.erb b/server/sonar-web/src/main/webapp/WEB-INF/app/views/permission_templates/_edit_groups.html.erb index 6a12e9563ff..f7e46949545 100644 --- a/server/sonar-web/src/main/webapp/WEB-INF/app/views/permission_templates/_edit_groups.html.erb +++ b/server/sonar-web/src/main/webapp/WEB-INF/app/views/permission_templates/_edit_groups.html.erb @@ -14,7 +14,13 @@ var selectList = new SelectList({ el: '#select-list-group', width: '100%', - format: function (item) { return item.name; }, + format: function (item) { + var label = item.name; + if (item.description) { + label += '
' + item.description + '
' + } + return label; + }, searchUrl: baseUrl + '/permission_templates/search_groups?permission=<%= @permission -%>&template=<%= @permission_template.key -%>', selectUrl: baseUrl + '/permission_templates/add_group_permission', deselectUrl: baseUrl + '/permission_templates/remove_group_permission', diff --git a/server/sonar-web/src/main/webapp/WEB-INF/app/views/roles/_edit_groups.html.erb b/server/sonar-web/src/main/webapp/WEB-INF/app/views/roles/_edit_groups.html.erb index b19f387e095..186d8b2da26 100644 --- a/server/sonar-web/src/main/webapp/WEB-INF/app/views/roles/_edit_groups.html.erb +++ b/server/sonar-web/src/main/webapp/WEB-INF/app/views/roles/_edit_groups.html.erb @@ -14,7 +14,13 @@ var selectList = new SelectList({ el: '#select-users-permissions', width: '100%', - format: function (item) { return item.name; }, + format: function (item) { + var label = item.name; + if (item.description) { + label += '
' + item.description + '
' + } + return label; + }, searchUrl: baseUrl + '/permissions/search_groups?permission=<%= @role -%><%= @project ? "&component=" + @project.key : "" -%>', selectUrl: baseUrl + '/api/permissions/add', deselectUrl: baseUrl + '/api/permissions/remove', -- 2.39.5