From: Olivier Lamy Date: Thu, 12 Jan 2012 14:12:32 +0000 (+0000) Subject: user roles edit display roles from templates/resources X-Git-Tag: archiva-1.4-M3~1605 X-Git-Url: https://source.dussan.org/?a=commitdiff_plain;h=4812edab08cf67c5116e1256a95c6cef518dc2d1;p=archiva.git user roles edit display roles from templates/resources git-svn-id: https://svn.apache.org/repos/asf/archiva/trunk@1230555 13f79535-47bb-0310-9956-ffa450edef68 --- diff --git a/archiva-modules/archiva-web/archiva-webapp-js/src/main/webapp/js/archiva/utils.js b/archiva-modules/archiva-web/archiva-webapp-js/src/main/webapp/js/archiva/utils.js index b2e3bd57a..a3c2aad23 100644 --- a/archiva-modules/archiva-web/archiva-webapp-js/src/main/webapp/js/archiva/utils.js +++ b/archiva-modules/archiva-web/archiva-webapp-js/src/main/webapp/js/archiva/utils.js @@ -206,4 +206,11 @@ mapStringArray=function(data){ } } return null; -} \ No newline at end of file +} + +// extends jquery tmpl to support var def +$.extend($.tmpl.tag, { + "var": { + open: "var $1;" + } +}); \ No newline at end of file diff --git a/archiva-modules/archiva-web/archiva-webapp-js/src/main/webapp/js/redback/templates/user-edit.html b/archiva-modules/archiva-web/archiva-webapp-js/src/main/webapp/js/redback/templates/user-edit.html index 94f39d624..cd14299f2 100644 --- a/archiva-modules/archiva-web/archiva-webapp-js/src/main/webapp/js/redback/templates/user-edit.html +++ b/archiva-modules/archiva-web/archiva-webapp-js/src/main/webapp/js/redback/templates/user-edit.html @@ -109,9 +109,34 @@ + + {{if roleTemplates}} + + + + + {{each roleTemplates}} + + {{/each}} + + + + {{each resources}} + {{var curResource = $value}} + + + {{each roleTemplates}} + + {{/each}} + + {{/each}} + +
 ${$value.namePrefix}
${curResource}
+ {{/if}} + {{/each}}