##// END OF EJS Templates
Docs updates
Docs updates

File last commit:

r1378:832399a4 beta
r1405:9c6f3943 beta
Show More
repo_edit_perms.html
96 lines | 4.5 KiB | text/html | HtmlLexer
#56 added ajax removal of users groups,...
r1015 <table id="permissions_manage">
<tr>
<td>${_('none')}</td>
<td>${_('read')}</td>
<td>${_('write')}</td>
<td>${_('admin')}</td>
<td>${_('member')}</td>
<td></td>
</tr>
## USERS
<script type="text/javascript">
function ajaxActionUser(user_id,field_id){
var sUrl = "${h.url('delete_repo_user',repo_name=c.repo_name)}";
var callback = { success:function(o){
var tr = YUD.get(String(field_id));
tr.parentNode.removeChild(tr);},
failure:function(o){
alert("${_('Failed to remove user')}");},};
var postData = '_method=delete&user_id='+user_id;
var request = YAHOO.util.Connect.asyncRequest('POST', sUrl, callback, postData);};
</script>
%for r2p in c.repo_info.repo_to_perm:
%if r2p.user.username =='default' and c.repo_info.private:
<tr>
<td colspan="4">
<span class="private_repo_msg">
${_('private repository')}
</span>
</td>
changed all urls for IMAGES files to use pylons url function
r1051 <td class="private_repo_msg"><img style="vertical-align:bottom" src="${h.url("/images/icons/user.png")}"/>${r2p.user.username}</td>
#56 added ajax removal of users groups,...
r1015 </tr>
%else:
<tr id="id${id(r2p.user.username)}">
<td>${h.radio('u_perm_%s' % r2p.user.username,'repository.none')}</td>
<td>${h.radio('u_perm_%s' % r2p.user.username,'repository.read')}</td>
<td>${h.radio('u_perm_%s' % r2p.user.username,'repository.write')}</td>
<td>${h.radio('u_perm_%s' % r2p.user.username,'repository.admin')}</td>
changed all urls for IMAGES files to use pylons url function
r1051 <td style="white-space: nowrap;"><img style="vertical-align:bottom" src="${h.url("/images/icons/user.png")}"/>${r2p.user.username}</td>
#56 added ajax removal of users groups,...
r1015 <td>
%if r2p.user.username !='default':
<span class="delete_icon action_button" onclick="ajaxActionUser(${r2p.user.user_id},'${'id%s'%id(r2p.user.username)}')">
fixes issue #203, added revoke message
r1378 ${_('revoke')}
#56 added ajax removal of users groups,...
r1015 </span>
%endif
</td>
</tr>
%endif
%endfor
## USERS GROUPS
<script type="text/javascript">
function ajaxActionUsersGroup(users_group_id,field_id){
var sUrl = "${h.url('delete_repo_users_group',repo_name=c.repo_name)}";
var callback = { success:function(o){
var tr = YUD.get(String(field_id));
tr.parentNode.removeChild(tr);},
failure:function(o){
alert("${_('Failed to remove users group')}");},};
var postData = '_method=delete&users_group_id='+users_group_id;
var request = YAHOO.util.Connect.asyncRequest('POST', sUrl, callback, postData);};
</script>
%for g2p in c.repo_info.users_group_to_perm:
<tr id="id${id(g2p.users_group.users_group_name)}">
<td>${h.radio('g_perm_%s' % g2p.users_group.users_group_name,'repository.none')}</td>
<td>${h.radio('g_perm_%s' % g2p.users_group.users_group_name,'repository.read')}</td>
<td>${h.radio('g_perm_%s' % g2p.users_group.users_group_name,'repository.write')}</td>
<td>${h.radio('g_perm_%s' % g2p.users_group.users_group_name,'repository.admin')}</td>
changed all urls for IMAGES files to use pylons url function
r1051 <td><img style="vertical-align:bottom" src="${h.url("/images/icons/group.png")}"/>${g2p.users_group.users_group_name}</td>
#56 added ajax removal of users groups,...
r1015 <td>
<span class="delete_icon action_button" onclick="ajaxActionUsersGroup(${g2p.users_group.users_group_id},'${'id%s'%id(g2p.users_group.users_group_name)}')">
fixes issue #203, added revoke message
r1378 ${_('revoke')}
#56 added ajax removal of users groups,...
r1015 </span>
</td>
</tr>
%endfor
<tr id="add_perm_input">
<td>${h.radio('perm_new_member','repository.none')}</td>
<td>${h.radio('perm_new_member','repository.read')}</td>
<td>${h.radio('perm_new_member','repository.write')}</td>
<td>${h.radio('perm_new_member','repository.admin')}</td>
<td class='ac'>
<div class="perm_ac" id="perm_ac">
${h.text('perm_new_member_name',class_='yui-ac-input')}
${h.hidden('perm_new_member_type')}
<div id="perm_container"></div>
</div>
</td>
<td></td>
</tr>
<tr>
<td colspan="6">
<span id="add_perm" class="add_icon" style="cursor: pointer;">
${_('Add another member')}
</span>
</td>
</tr>
</table>