mirror of https://github.com/apache/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
This commit is contained in:
parent
82e113d72f
commit
4812edab08
|
@ -207,3 +207,10 @@ mapStringArray=function(data){
|
|||
}
|
||||
return null;
|
||||
}
|
||||
|
||||
// extends jquery tmpl to support var def
|
||||
$.extend($.tmpl.tag, {
|
||||
"var": {
|
||||
open: "var $1;"
|
||||
}
|
||||
});
|
|
@ -109,9 +109,34 @@
|
|||
</blockquote>
|
||||
<ul>
|
||||
{{each $value.globalRoles}}
|
||||
<li><div><input type="checkbox" value="${$value}" data-bind="checked: user.assignedRoles" /> ${$value}</div></li>
|
||||
<li><input type="checkbox" value="${$value}" data-bind="checked: user.assignedRoles"> ${$value}</input></li>
|
||||
{{/each}}
|
||||
</ul>
|
||||
|
||||
{{if roleTemplates}}
|
||||
<table class="bordered-table">
|
||||
<thead>
|
||||
<tr>
|
||||
<th> </th>
|
||||
{{each roleTemplates}}
|
||||
<th>${$value.namePrefix}</th>
|
||||
{{/each}}
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
{{each resources}}
|
||||
{{var curResource = $value}}
|
||||
<tr>
|
||||
<td>${curResource}</td>
|
||||
{{each roleTemplates}}
|
||||
<td><input type="checkbox" value="${$value.namePrefix}${$value.delimiter}${curResource}" data-bind="checked: user.assignedRoles"/></td>
|
||||
{{/each}}
|
||||
</tr>
|
||||
{{/each}}
|
||||
</tbody>
|
||||
</table>
|
||||
{{/if}}
|
||||
|
||||
{{/each}}
|
||||
|
||||
<button class="btn" data-bind="click:updateUserRoles">${$.i18n.prop('update')}</button>
|
||||
|
|
Loading…
Reference in New Issue