mirror of https://github.com/apache/archiva.git
add buttons to switch from users assigned role view to update view
git-svn-id: https://svn.apache.org/repos/asf/archiva/trunk@1227083 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
parent
f922429f2f
commit
25140af4f0
|
@ -67,6 +67,15 @@ $(function() {
|
|||
}
|
||||
);
|
||||
}
|
||||
|
||||
this.updateMode=function(){
|
||||
$("#main-content #role-list-users").hide();
|
||||
$("#main-content #role-edit-users").show();
|
||||
}
|
||||
this.viewMode=function(){
|
||||
$("#main-content #role-edit-users").hide();
|
||||
$("#main-content #role-list-users").show();
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
|
@ -119,18 +119,23 @@
|
|||
<div class="page-header">
|
||||
<h3>${$.i18n.prop('role.edit.users.defined.in.current.role')}</h3>
|
||||
</div>
|
||||
<div id="role-list-users">
|
||||
{{if $data.users}}
|
||||
<ul>
|
||||
{{each users}}
|
||||
<li>${$value.fullName} - ( ${$value.username} - ${$value.email} ) </li>
|
||||
{{/each}}
|
||||
</ul>
|
||||
{{else}}
|
||||
${$.i18n.prop('role.edit.no.user.defined')}
|
||||
{{/if}}
|
||||
|
||||
{{if $data.users}}
|
||||
<ul>
|
||||
{{each users}}
|
||||
<li>${$value.fullName} - ( ${$value.username} - ${$value.email} ) </li>
|
||||
{{/each}}
|
||||
</ul>
|
||||
{{else}}
|
||||
${$.i18n.prop('role.edit.no.user.defined')}
|
||||
{{/if}}
|
||||
<button class="btn" data-bind="click:updateMode">${$.i18n.prop('role.update.mode')}</button>
|
||||
|
||||
</div>
|
||||
|
||||
<div id="role-edit-users" class="clearfix ar-multiselect" style="display:none">
|
||||
|
||||
<div id="role-edit-users" class="clearfix ar-multiselect">
|
||||
<div class="ar-multiselect-column ar-multiselect-left">
|
||||
<select data-bind="options: otherUsers ,optionsText: 'username',selectedOptions:selectedOtherUsers" multiple="true" id="role-edit-available-users"></select>
|
||||
</div>
|
||||
|
@ -144,6 +149,8 @@
|
|||
<select data-bind="options: users ,optionsText: 'username',selectedOptions:selectedUsers" multiple="true" id="role-edit-affected-users"></select>
|
||||
</div>
|
||||
<button class="btn" data-bind="click: saveUsers">${$.i18n.prop('save')}</button>
|
||||
<br/>
|
||||
<button class="btn" data-bind="click:viewMode">${$.i18n.prop('role.view.mode')}</button>
|
||||
</div>
|
||||
|
||||
</script>
|
||||
|
|
Loading…
Reference in New Issue