]> source.dussan.org Git - sonarqube.git/commitdiff
SONAR-4963 Display group description in User window
authorStas Vilchik <vilchiks@gmail.com>
Tue, 26 Aug 2014 12:05:09 +0000 (18:05 +0600)
committerStas Vilchik <vilchiks@gmail.com>
Tue, 26 Aug 2014 12:05:09 +0000 (18:05 +0600)
server/sonar-web/src/main/webapp/WEB-INF/app/views/permission_templates/_edit_groups.html.erb
server/sonar-web/src/main/webapp/WEB-INF/app/views/roles/_edit_groups.html.erb

index 6a12e9563ffa0db7e3abd53e4e397d7447468a10..f7e469495453a3d2ab0e8c83d829d0d8537e29da 100644 (file)
   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',
index b19f387e09597c9f6b986d9fc42529a432b942e7..186d8b2da2698031bbd9b07b018e1adfe824b829 100644 (file)
   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',