Files
@ acc05c33cc0c
Branch filter:
Location: kallithea/rhodecode/templates/admin/repos/repo_edit_perms.html - annotation
acc05c33cc0c
5.5 KiB
text/html
White space cleanup
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 | 1915f02f6d62 65129c332d37 65129c332d37 65129c332d37 65129c332d37 65129c332d37 65129c332d37 65129c332d37 65129c332d37 f91d3f9b7230 65129c332d37 65129c332d37 65129c332d37 65129c332d37 65129c332d37 65129c332d37 65129c332d37 65129c332d37 e5c8472ac0ac 65129c332d37 65129c332d37 65129c332d37 65129c332d37 65129c332d37 65129c332d37 65129c332d37 9a7d0fbc4a80 e5c8472ac0ac 9a7d0fbc4a80 65129c332d37 65129c332d37 65129c332d37 832399a4a45c 65129c332d37 f91d3f9b7230 65129c332d37 65129c332d37 65129c332d37 65129c332d37 f91d3f9b7230 f91d3f9b7230 65129c332d37 65129c332d37 65129c332d37 65129c332d37 65129c332d37 65129c332d37 9a7d0fbc4a80 889cda9c2d14 889cda9c2d14 889cda9c2d14 889cda9c2d14 889cda9c2d14 889cda9c2d14 9a7d0fbc4a80 65129c332d37 65129c332d37 832399a4a45c 65129c332d37 65129c332d37 65129c332d37 65129c332d37 c61c2ccea2b4 c61c2ccea2b4 c61c2ccea2b4 c61c2ccea2b4 c61c2ccea2b4 c61c2ccea2b4 c61c2ccea2b4 c61c2ccea2b4 c61c2ccea2b4 c61c2ccea2b4 c61c2ccea2b4 c61c2ccea2b4 c61c2ccea2b4 c61c2ccea2b4 acc05c33cc0c acc05c33cc0c c61c2ccea2b4 65129c332d37 65129c332d37 65129c332d37 65129c332d37 65129c332d37 65129c332d37 65129c332d37 9a7d0fbc4a80 9a7d0fbc4a80 9a7d0fbc4a80 9a7d0fbc4a80 9a7d0fbc4a80 9a7d0fbc4a80 9a7d0fbc4a80 9a7d0fbc4a80 9a7d0fbc4a80 9a7d0fbc4a80 9a7d0fbc4a80 9a7d0fbc4a80 9a7d0fbc4a80 9a7d0fbc4a80 9a7d0fbc4a80 9a7d0fbc4a80 f91d3f9b7230 9a7d0fbc4a80 9a7d0fbc4a80 f91d3f9b7230 9a7d0fbc4a80 9a7d0fbc4a80 9a7d0fbc4a80 9a7d0fbc4a80 9a7d0fbc4a80 9a7d0fbc4a80 9a7d0fbc4a80 9a7d0fbc4a80 f91d3f9b7230 9a7d0fbc4a80 9a7d0fbc4a80 9a7d0fbc4a80 9a7d0fbc4a80 9a7d0fbc4a80 9a7d0fbc4a80 9a7d0fbc4a80 9a7d0fbc4a80 c61c2ccea2b4 9a7d0fbc4a80 9a7d0fbc4a80 9a7d0fbc4a80 f91d3f9b7230 | <table id="permissions_manage" class="noborder">
<tr>
<td>${_('none')}</td>
<td>${_('read')}</td>
<td>${_('write')}</td>
<td>${_('admin')}</td>
<td>${_('member')}</td>
<td></td>
</tr>
## USERS
%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>
<td class="private_repo_msg"><img style="vertical-align:bottom" src="${h.url('/images/icons/user.png')}"/>${_('default')}</td>
</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>
<td style="white-space: nowrap;">
<img class="perm-gravatar" src="${h.gravatar_url(r2p.user.email,14)}"/>${r2p.user.username if r2p.user.username != 'default' else _('default')}
</td>
<td>
%if r2p.user.username !='default':
<span class="delete_icon action_button" onclick="ajaxActionUser(${r2p.user.user_id},'${'id%s'%id(r2p.user.username)}')">
${_('revoke')}
</span>
%endif
</td>
</tr>
%endif
%endfor
## USERS GROUPS
%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>
<td style="white-space: nowrap;">
<img class="perm-gravatar" src="${h.url('/images/icons/group.png')}"/>
%if h.HasPermissionAny('hg.admin')():
<a href="${h.url('edit_users_group',id=g2p.users_group.users_group_id)}">${g2p.users_group.users_group_name}</a>
%else:
${g2p.users_group.users_group_name}
%endif
</td>
<td>
<span class="delete_icon action_button" onclick="ajaxActionUsersGroup(${g2p.users_group.users_group_id},'${'id%s'%id(g2p.users_group.users_group_name)}')">
${_('revoke')}
</span>
</td>
</tr>
%endfor
<%
_tmpl = h.literal("""' \
<td><input type="radio" value="repository.none" name="perm_new_member_{0}" id="perm_new_member_{0}"></td> \
<td><input type="radio" value="repository.read" name="perm_new_member_{0}" id="perm_new_member_{0}"></td> \
<td><input type="radio" value="repository.write" name="perm_new_member_{0}" id="perm_new_member_{0}"></td> \
<td><input type="radio" value="repository.admin" name="perm_new_member_{0}" id="perm_new_member_{0}"></td> \
<td class="ac"> \
<div class="perm_ac" id="perm_ac_{0}"> \
<input class="yui-ac-input" id="perm_new_member_name_{0}" name="perm_new_member_name_{0}" value="" type="text"> \
<input id="perm_new_member_type_{0}" name="perm_new_member_type_{0}" value="" type="hidden"> \
<div id="perm_container_{0}"></div> \
</div> \
</td> \
<td></td>'""")
%>
## ADD HERE DYNAMICALLY NEW INPUTS FROM THE '_tmpl'
<tr class="new_members last_new_member" id="add_perm_input"></tr>
<tr>
<td colspan="6">
<span id="add_perm" class="add_icon" style="cursor: pointer;">
${_('Add another member')}
</span>
</td>
</tr>
</table>
<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);
};
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);
};
YUE.onDOMReady(function () {
if (!YUD.hasClass('perm_new_member_name', 'error')) {
YUD.setStyle('add_perm_input', 'display', 'none');
}
YAHOO.util.Event.addListener('add_perm', 'click', function () {
addPermAction(${_tmpl}, ${c.users_array|n}, ${c.users_groups_array|n});
});
});
</script>
|