From 4812edab08cf67c5116e1256a95c6cef518dc2d1 Mon Sep 17 00:00:00 2001 From: Olivier Lamy Date: Thu, 12 Jan 2012 14:12:32 +0000 Subject: [PATCH] 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 --- .../src/main/webapp/js/archiva/utils.js | 9 ++++++- .../js/redback/templates/user-edit.html | 27 ++++++++++++++++++- 2 files changed, 34 insertions(+), 2 deletions(-) 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}} -- 2.39.5