annotate rhodecode/templates/admin/repos/repo_edit_perms.html @ 1378:832399a4a45c beta

fixes issue #203, added revoke message
author Marcin Kuzminski <marcin@python-works.com>
date Sun, 12 Jun 2011 19:30:19 +0200
parents 90eadff2c2a8
children 9a7d0fbc4a80
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
1015
65129c332d37 #56 added ajax removal of users groups,
Marcin Kuzminski <marcin@python-works.com>
parents:
diff changeset
1 <table id="permissions_manage">
65129c332d37 #56 added ajax removal of users groups,
Marcin Kuzminski <marcin@python-works.com>
parents:
diff changeset
2 <tr>
65129c332d37 #56 added ajax removal of users groups,
Marcin Kuzminski <marcin@python-works.com>
parents:
diff changeset
3 <td>${_('none')}</td>
65129c332d37 #56 added ajax removal of users groups,
Marcin Kuzminski <marcin@python-works.com>
parents:
diff changeset
4 <td>${_('read')}</td>
65129c332d37 #56 added ajax removal of users groups,
Marcin Kuzminski <marcin@python-works.com>
parents:
diff changeset
5 <td>${_('write')}</td>
65129c332d37 #56 added ajax removal of users groups,
Marcin Kuzminski <marcin@python-works.com>
parents:
diff changeset
6 <td>${_('admin')}</td>
65129c332d37 #56 added ajax removal of users groups,
Marcin Kuzminski <marcin@python-works.com>
parents:
diff changeset
7 <td>${_('member')}</td>
65129c332d37 #56 added ajax removal of users groups,
Marcin Kuzminski <marcin@python-works.com>
parents:
diff changeset
8 <td></td>
65129c332d37 #56 added ajax removal of users groups,
Marcin Kuzminski <marcin@python-works.com>
parents:
diff changeset
9 </tr>
65129c332d37 #56 added ajax removal of users groups,
Marcin Kuzminski <marcin@python-works.com>
parents:
diff changeset
10 ## USERS
65129c332d37 #56 added ajax removal of users groups,
Marcin Kuzminski <marcin@python-works.com>
parents:
diff changeset
11 <script type="text/javascript">
65129c332d37 #56 added ajax removal of users groups,
Marcin Kuzminski <marcin@python-works.com>
parents:
diff changeset
12 function ajaxActionUser(user_id,field_id){
65129c332d37 #56 added ajax removal of users groups,
Marcin Kuzminski <marcin@python-works.com>
parents:
diff changeset
13 var sUrl = "${h.url('delete_repo_user',repo_name=c.repo_name)}";
65129c332d37 #56 added ajax removal of users groups,
Marcin Kuzminski <marcin@python-works.com>
parents:
diff changeset
14 var callback = { success:function(o){
65129c332d37 #56 added ajax removal of users groups,
Marcin Kuzminski <marcin@python-works.com>
parents:
diff changeset
15 var tr = YUD.get(String(field_id));
65129c332d37 #56 added ajax removal of users groups,
Marcin Kuzminski <marcin@python-works.com>
parents:
diff changeset
16 tr.parentNode.removeChild(tr);},
65129c332d37 #56 added ajax removal of users groups,
Marcin Kuzminski <marcin@python-works.com>
parents:
diff changeset
17 failure:function(o){
65129c332d37 #56 added ajax removal of users groups,
Marcin Kuzminski <marcin@python-works.com>
parents:
diff changeset
18 alert("${_('Failed to remove user')}");},};
65129c332d37 #56 added ajax removal of users groups,
Marcin Kuzminski <marcin@python-works.com>
parents:
diff changeset
19 var postData = '_method=delete&user_id='+user_id;
65129c332d37 #56 added ajax removal of users groups,
Marcin Kuzminski <marcin@python-works.com>
parents:
diff changeset
20 var request = YAHOO.util.Connect.asyncRequest('POST', sUrl, callback, postData);};
65129c332d37 #56 added ajax removal of users groups,
Marcin Kuzminski <marcin@python-works.com>
parents:
diff changeset
21 </script>
65129c332d37 #56 added ajax removal of users groups,
Marcin Kuzminski <marcin@python-works.com>
parents:
diff changeset
22 %for r2p in c.repo_info.repo_to_perm:
65129c332d37 #56 added ajax removal of users groups,
Marcin Kuzminski <marcin@python-works.com>
parents:
diff changeset
23 %if r2p.user.username =='default' and c.repo_info.private:
65129c332d37 #56 added ajax removal of users groups,
Marcin Kuzminski <marcin@python-works.com>
parents:
diff changeset
24 <tr>
65129c332d37 #56 added ajax removal of users groups,
Marcin Kuzminski <marcin@python-works.com>
parents:
diff changeset
25 <td colspan="4">
65129c332d37 #56 added ajax removal of users groups,
Marcin Kuzminski <marcin@python-works.com>
parents:
diff changeset
26 <span class="private_repo_msg">
65129c332d37 #56 added ajax removal of users groups,
Marcin Kuzminski <marcin@python-works.com>
parents:
diff changeset
27 ${_('private repository')}
65129c332d37 #56 added ajax removal of users groups,
Marcin Kuzminski <marcin@python-works.com>
parents:
diff changeset
28 </span>
65129c332d37 #56 added ajax removal of users groups,
Marcin Kuzminski <marcin@python-works.com>
parents:
diff changeset
29 </td>
1051
90eadff2c2a8 changed all urls for IMAGES files to use pylons url function
Marcin Kuzminski <marcin@python-works.com>
parents: 1015
diff changeset
30 <td class="private_repo_msg"><img style="vertical-align:bottom" src="${h.url("/images/icons/user.png")}"/>${r2p.user.username}</td>
1015
65129c332d37 #56 added ajax removal of users groups,
Marcin Kuzminski <marcin@python-works.com>
parents:
diff changeset
31 </tr>
65129c332d37 #56 added ajax removal of users groups,
Marcin Kuzminski <marcin@python-works.com>
parents:
diff changeset
32 %else:
65129c332d37 #56 added ajax removal of users groups,
Marcin Kuzminski <marcin@python-works.com>
parents:
diff changeset
33 <tr id="id${id(r2p.user.username)}">
65129c332d37 #56 added ajax removal of users groups,
Marcin Kuzminski <marcin@python-works.com>
parents:
diff changeset
34 <td>${h.radio('u_perm_%s' % r2p.user.username,'repository.none')}</td>
65129c332d37 #56 added ajax removal of users groups,
Marcin Kuzminski <marcin@python-works.com>
parents:
diff changeset
35 <td>${h.radio('u_perm_%s' % r2p.user.username,'repository.read')}</td>
65129c332d37 #56 added ajax removal of users groups,
Marcin Kuzminski <marcin@python-works.com>
parents:
diff changeset
36 <td>${h.radio('u_perm_%s' % r2p.user.username,'repository.write')}</td>
65129c332d37 #56 added ajax removal of users groups,
Marcin Kuzminski <marcin@python-works.com>
parents:
diff changeset
37 <td>${h.radio('u_perm_%s' % r2p.user.username,'repository.admin')}</td>
1051
90eadff2c2a8 changed all urls for IMAGES files to use pylons url function
Marcin Kuzminski <marcin@python-works.com>
parents: 1015
diff changeset
38 <td style="white-space: nowrap;"><img style="vertical-align:bottom" src="${h.url("/images/icons/user.png")}"/>${r2p.user.username}</td>
1015
65129c332d37 #56 added ajax removal of users groups,
Marcin Kuzminski <marcin@python-works.com>
parents:
diff changeset
39 <td>
65129c332d37 #56 added ajax removal of users groups,
Marcin Kuzminski <marcin@python-works.com>
parents:
diff changeset
40 %if r2p.user.username !='default':
65129c332d37 #56 added ajax removal of users groups,
Marcin Kuzminski <marcin@python-works.com>
parents:
diff changeset
41 <span class="delete_icon action_button" onclick="ajaxActionUser(${r2p.user.user_id},'${'id%s'%id(r2p.user.username)}')">
1378
832399a4a45c fixes issue #203, added revoke message
Marcin Kuzminski <marcin@python-works.com>
parents: 1051
diff changeset
42 ${_('revoke')}
1015
65129c332d37 #56 added ajax removal of users groups,
Marcin Kuzminski <marcin@python-works.com>
parents:
diff changeset
43 </span>
65129c332d37 #56 added ajax removal of users groups,
Marcin Kuzminski <marcin@python-works.com>
parents:
diff changeset
44 %endif
65129c332d37 #56 added ajax removal of users groups,
Marcin Kuzminski <marcin@python-works.com>
parents:
diff changeset
45 </td>
65129c332d37 #56 added ajax removal of users groups,
Marcin Kuzminski <marcin@python-works.com>
parents:
diff changeset
46 </tr>
65129c332d37 #56 added ajax removal of users groups,
Marcin Kuzminski <marcin@python-works.com>
parents:
diff changeset
47 %endif
65129c332d37 #56 added ajax removal of users groups,
Marcin Kuzminski <marcin@python-works.com>
parents:
diff changeset
48 %endfor
65129c332d37 #56 added ajax removal of users groups,
Marcin Kuzminski <marcin@python-works.com>
parents:
diff changeset
49
65129c332d37 #56 added ajax removal of users groups,
Marcin Kuzminski <marcin@python-works.com>
parents:
diff changeset
50 ## USERS GROUPS
65129c332d37 #56 added ajax removal of users groups,
Marcin Kuzminski <marcin@python-works.com>
parents:
diff changeset
51 <script type="text/javascript">
65129c332d37 #56 added ajax removal of users groups,
Marcin Kuzminski <marcin@python-works.com>
parents:
diff changeset
52 function ajaxActionUsersGroup(users_group_id,field_id){
65129c332d37 #56 added ajax removal of users groups,
Marcin Kuzminski <marcin@python-works.com>
parents:
diff changeset
53 var sUrl = "${h.url('delete_repo_users_group',repo_name=c.repo_name)}";
65129c332d37 #56 added ajax removal of users groups,
Marcin Kuzminski <marcin@python-works.com>
parents:
diff changeset
54 var callback = { success:function(o){
65129c332d37 #56 added ajax removal of users groups,
Marcin Kuzminski <marcin@python-works.com>
parents:
diff changeset
55 var tr = YUD.get(String(field_id));
65129c332d37 #56 added ajax removal of users groups,
Marcin Kuzminski <marcin@python-works.com>
parents:
diff changeset
56 tr.parentNode.removeChild(tr);},
65129c332d37 #56 added ajax removal of users groups,
Marcin Kuzminski <marcin@python-works.com>
parents:
diff changeset
57 failure:function(o){
65129c332d37 #56 added ajax removal of users groups,
Marcin Kuzminski <marcin@python-works.com>
parents:
diff changeset
58 alert("${_('Failed to remove users group')}");},};
65129c332d37 #56 added ajax removal of users groups,
Marcin Kuzminski <marcin@python-works.com>
parents:
diff changeset
59 var postData = '_method=delete&users_group_id='+users_group_id;
65129c332d37 #56 added ajax removal of users groups,
Marcin Kuzminski <marcin@python-works.com>
parents:
diff changeset
60 var request = YAHOO.util.Connect.asyncRequest('POST', sUrl, callback, postData);};
65129c332d37 #56 added ajax removal of users groups,
Marcin Kuzminski <marcin@python-works.com>
parents:
diff changeset
61 </script>
65129c332d37 #56 added ajax removal of users groups,
Marcin Kuzminski <marcin@python-works.com>
parents:
diff changeset
62 %for g2p in c.repo_info.users_group_to_perm:
65129c332d37 #56 added ajax removal of users groups,
Marcin Kuzminski <marcin@python-works.com>
parents:
diff changeset
63 <tr id="id${id(g2p.users_group.users_group_name)}">
65129c332d37 #56 added ajax removal of users groups,
Marcin Kuzminski <marcin@python-works.com>
parents:
diff changeset
64 <td>${h.radio('g_perm_%s' % g2p.users_group.users_group_name,'repository.none')}</td>
65129c332d37 #56 added ajax removal of users groups,
Marcin Kuzminski <marcin@python-works.com>
parents:
diff changeset
65 <td>${h.radio('g_perm_%s' % g2p.users_group.users_group_name,'repository.read')}</td>
65129c332d37 #56 added ajax removal of users groups,
Marcin Kuzminski <marcin@python-works.com>
parents:
diff changeset
66 <td>${h.radio('g_perm_%s' % g2p.users_group.users_group_name,'repository.write')}</td>
65129c332d37 #56 added ajax removal of users groups,
Marcin Kuzminski <marcin@python-works.com>
parents:
diff changeset
67 <td>${h.radio('g_perm_%s' % g2p.users_group.users_group_name,'repository.admin')}</td>
1051
90eadff2c2a8 changed all urls for IMAGES files to use pylons url function
Marcin Kuzminski <marcin@python-works.com>
parents: 1015
diff changeset
68 <td><img style="vertical-align:bottom" src="${h.url("/images/icons/group.png")}"/>${g2p.users_group.users_group_name}</td>
1015
65129c332d37 #56 added ajax removal of users groups,
Marcin Kuzminski <marcin@python-works.com>
parents:
diff changeset
69 <td>
65129c332d37 #56 added ajax removal of users groups,
Marcin Kuzminski <marcin@python-works.com>
parents:
diff changeset
70 <span class="delete_icon action_button" onclick="ajaxActionUsersGroup(${g2p.users_group.users_group_id},'${'id%s'%id(g2p.users_group.users_group_name)}')">
1378
832399a4a45c fixes issue #203, added revoke message
Marcin Kuzminski <marcin@python-works.com>
parents: 1051
diff changeset
71 ${_('revoke')}
1015
65129c332d37 #56 added ajax removal of users groups,
Marcin Kuzminski <marcin@python-works.com>
parents:
diff changeset
72 </span>
65129c332d37 #56 added ajax removal of users groups,
Marcin Kuzminski <marcin@python-works.com>
parents:
diff changeset
73 </td>
65129c332d37 #56 added ajax removal of users groups,
Marcin Kuzminski <marcin@python-works.com>
parents:
diff changeset
74 </tr>
65129c332d37 #56 added ajax removal of users groups,
Marcin Kuzminski <marcin@python-works.com>
parents:
diff changeset
75 %endfor
65129c332d37 #56 added ajax removal of users groups,
Marcin Kuzminski <marcin@python-works.com>
parents:
diff changeset
76 <tr id="add_perm_input">
65129c332d37 #56 added ajax removal of users groups,
Marcin Kuzminski <marcin@python-works.com>
parents:
diff changeset
77 <td>${h.radio('perm_new_member','repository.none')}</td>
65129c332d37 #56 added ajax removal of users groups,
Marcin Kuzminski <marcin@python-works.com>
parents:
diff changeset
78 <td>${h.radio('perm_new_member','repository.read')}</td>
65129c332d37 #56 added ajax removal of users groups,
Marcin Kuzminski <marcin@python-works.com>
parents:
diff changeset
79 <td>${h.radio('perm_new_member','repository.write')}</td>
65129c332d37 #56 added ajax removal of users groups,
Marcin Kuzminski <marcin@python-works.com>
parents:
diff changeset
80 <td>${h.radio('perm_new_member','repository.admin')}</td>
65129c332d37 #56 added ajax removal of users groups,
Marcin Kuzminski <marcin@python-works.com>
parents:
diff changeset
81 <td class='ac'>
65129c332d37 #56 added ajax removal of users groups,
Marcin Kuzminski <marcin@python-works.com>
parents:
diff changeset
82 <div class="perm_ac" id="perm_ac">
65129c332d37 #56 added ajax removal of users groups,
Marcin Kuzminski <marcin@python-works.com>
parents:
diff changeset
83 ${h.text('perm_new_member_name',class_='yui-ac-input')}
65129c332d37 #56 added ajax removal of users groups,
Marcin Kuzminski <marcin@python-works.com>
parents:
diff changeset
84 ${h.hidden('perm_new_member_type')}
65129c332d37 #56 added ajax removal of users groups,
Marcin Kuzminski <marcin@python-works.com>
parents:
diff changeset
85 <div id="perm_container"></div>
65129c332d37 #56 added ajax removal of users groups,
Marcin Kuzminski <marcin@python-works.com>
parents:
diff changeset
86 </div>
65129c332d37 #56 added ajax removal of users groups,
Marcin Kuzminski <marcin@python-works.com>
parents:
diff changeset
87 </td>
65129c332d37 #56 added ajax removal of users groups,
Marcin Kuzminski <marcin@python-works.com>
parents:
diff changeset
88 <td></td>
65129c332d37 #56 added ajax removal of users groups,
Marcin Kuzminski <marcin@python-works.com>
parents:
diff changeset
89 </tr>
65129c332d37 #56 added ajax removal of users groups,
Marcin Kuzminski <marcin@python-works.com>
parents:
diff changeset
90 <tr>
65129c332d37 #56 added ajax removal of users groups,
Marcin Kuzminski <marcin@python-works.com>
parents:
diff changeset
91 <td colspan="6">
65129c332d37 #56 added ajax removal of users groups,
Marcin Kuzminski <marcin@python-works.com>
parents:
diff changeset
92 <span id="add_perm" class="add_icon" style="cursor: pointer;">
65129c332d37 #56 added ajax removal of users groups,
Marcin Kuzminski <marcin@python-works.com>
parents:
diff changeset
93 ${_('Add another member')}
65129c332d37 #56 added ajax removal of users groups,
Marcin Kuzminski <marcin@python-works.com>
parents:
diff changeset
94 </span>
65129c332d37 #56 added ajax removal of users groups,
Marcin Kuzminski <marcin@python-works.com>
parents:
diff changeset
95 </td>
65129c332d37 #56 added ajax removal of users groups,
Marcin Kuzminski <marcin@python-works.com>
parents:
diff changeset
96 </tr>
65129c332d37 #56 added ajax removal of users groups,
Marcin Kuzminski <marcin@python-works.com>
parents:
diff changeset
97 </table>