summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorStas Vilchik <vilchiks@gmail.com>2014-08-26 18:05:09 +0600
committerStas Vilchik <vilchiks@gmail.com>2014-08-26 18:05:09 +0600
commitbf24c787762e7cf53ef636c6d1e7782141b2812d (patch)
treed8e5907fd422f5e6ca587da60130ea95efd44674
parentdcfe048ad461dd07bf663586ca510e3a945b98ff (diff)
downloadsonarqube-bf24c787762e7cf53ef636c6d1e7782141b2812d.tar.gz
sonarqube-bf24c787762e7cf53ef636c6d1e7782141b2812d.zip
SONAR-4963 Display group description in User window
-rw-r--r--server/sonar-web/src/main/webapp/WEB-INF/app/views/permission_templates/_edit_groups.html.erb8
-rw-r--r--server/sonar-web/src/main/webapp/WEB-INF/app/views/roles/_edit_groups.html.erb8
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 += ' <div class="subtitle">' + item.description + '</div>'
+ }
+ 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 += ' <div class="subtitle">' + item.description + '</div>'
+ }
+ return label;
+ },
searchUrl: baseUrl + '/permissions/search_groups?permission=<%= @role -%><%= @project ? "&component=" + @project.key : "" -%>',
selectUrl: baseUrl + '/api/permissions/add',
deselectUrl: baseUrl + '/api/permissions/remove',