Show More
@@ -1,95 +1,97 | |||||
1 | <table id="permissions_manage"> |
|
1 | <table id="permissions_manage"> | |
2 | <tr> |
|
2 | <tr> | |
3 | <td>${_('none')}</td> |
|
3 | <td>${_('none')}</td> | |
4 | <td>${_('read')}</td> |
|
4 | <td>${_('read')}</td> | |
5 | <td>${_('write')}</td> |
|
5 | <td>${_('write')}</td> | |
6 | <td>${_('admin')}</td> |
|
6 | <td>${_('admin')}</td> | |
7 | <td>${_('member')}</td> |
|
7 | <td>${_('member')}</td> | |
8 | <td></td> |
|
8 | <td></td> | |
9 | </tr> |
|
9 | </tr> | |
10 | ## USERS |
|
10 | ## USERS | |
11 | <script type="text/javascript"> |
|
11 | <script type="text/javascript"> | |
12 | function ajaxActionUser(user_id,field_id){ |
|
12 | function ajaxActionUser(user_id,field_id){ | |
13 | var sUrl = "${h.url('delete_repo_user',repo_name=c.repo_name)}"; |
|
13 | var sUrl = "${h.url('delete_repo_user',repo_name=c.repo_name)}"; | |
14 | var callback = { success:function(o){ |
|
14 | var callback = { success:function(o){ | |
15 | var tr = YUD.get(String(field_id)); |
|
15 | var tr = YUD.get(String(field_id)); | |
16 | tr.parentNode.removeChild(tr);}, |
|
16 | tr.parentNode.removeChild(tr);}, | |
17 | failure:function(o){ |
|
17 | failure:function(o){ | |
18 | alert("${_('Failed to remove user')}");},}; |
|
18 | alert("${_('Failed to remove user')}");},}; | |
19 | var postData = '_method=delete&user_id='+user_id; |
|
19 | var postData = '_method=delete&user_id='+user_id; | |
20 | var request = YAHOO.util.Connect.asyncRequest('POST', sUrl, callback, postData);}; |
|
20 | var request = YAHOO.util.Connect.asyncRequest('POST', sUrl, callback, postData);}; | |
21 | </script> |
|
21 | </script> | |
22 | %for r2p in c.repo_info.repo_to_perm: |
|
22 | %for r2p in c.repo_info.repo_to_perm: | |
23 | %if r2p.user.username =='default' and c.repo_info.private: |
|
23 | %if r2p.user.username =='default' and c.repo_info.private: | |
24 | <tr> |
|
24 | <tr> | |
25 | <td colspan="4"> |
|
25 | <td colspan="4"> | |
26 | <span class="private_repo_msg"> |
|
26 | <span class="private_repo_msg"> | |
27 | ${_('private repository')} |
|
27 | ${_('private repository')} | |
28 | </span> |
|
28 | </span> | |
29 | </td> |
|
29 | </td> | |
30 | <td class="private_repo_msg"><img style="vertical-align:bottom" src="${h.url("/images/icons/user.png")}"/>${r2p.user.username}</td> |
|
30 | <td class="private_repo_msg"><img style="vertical-align:bottom" src="${h.url("/images/icons/user.png")}"/>${r2p.user.username}</td> | |
31 | </tr> |
|
31 | </tr> | |
32 | %else: |
|
32 | %else: | |
33 | <tr id="id${id(r2p.user.username)}"> |
|
33 | <tr id="id${id(r2p.user.username)}"> | |
34 | <td>${h.radio('u_perm_%s' % r2p.user.username,'repository.none')}</td> |
|
34 | <td>${h.radio('u_perm_%s' % r2p.user.username,'repository.none')}</td> | |
35 | <td>${h.radio('u_perm_%s' % r2p.user.username,'repository.read')}</td> |
|
35 | <td>${h.radio('u_perm_%s' % r2p.user.username,'repository.read')}</td> | |
36 | <td>${h.radio('u_perm_%s' % r2p.user.username,'repository.write')}</td> |
|
36 | <td>${h.radio('u_perm_%s' % r2p.user.username,'repository.write')}</td> | |
37 | <td>${h.radio('u_perm_%s' % r2p.user.username,'repository.admin')}</td> |
|
37 | <td>${h.radio('u_perm_%s' % r2p.user.username,'repository.admin')}</td> | |
38 | <td style="white-space: nowrap;"><img style="vertical-align:bottom" src="${h.url("/images/icons/user.png")}"/>${r2p.user.username}</td> |
|
38 | <td style="white-space: nowrap;"><img style="vertical-align:bottom" src="${h.url("/images/icons/user.png")}"/>${r2p.user.username}</td> | |
39 | <td> |
|
39 | <td> | |
40 | %if r2p.user.username !='default': |
|
40 | %if r2p.user.username !='default': | |
41 | <span class="delete_icon action_button" onclick="ajaxActionUser(${r2p.user.user_id},'${'id%s'%id(r2p.user.username)}')"> |
|
41 | <span class="delete_icon action_button" onclick="ajaxActionUser(${r2p.user.user_id},'${'id%s'%id(r2p.user.username)}')"> | |
|
42 | ${_('revoke')} | |||
42 | </span> |
|
43 | </span> | |
43 | %endif |
|
44 | %endif | |
44 | </td> |
|
45 | </td> | |
45 | </tr> |
|
46 | </tr> | |
46 | %endif |
|
47 | %endif | |
47 | %endfor |
|
48 | %endfor | |
48 |
|
49 | |||
49 | ## USERS GROUPS |
|
50 | ## USERS GROUPS | |
50 | <script type="text/javascript"> |
|
51 | <script type="text/javascript"> | |
51 | function ajaxActionUsersGroup(users_group_id,field_id){ |
|
52 | function ajaxActionUsersGroup(users_group_id,field_id){ | |
52 | var sUrl = "${h.url('delete_repo_users_group',repo_name=c.repo_name)}"; |
|
53 | var sUrl = "${h.url('delete_repo_users_group',repo_name=c.repo_name)}"; | |
53 | var callback = { success:function(o){ |
|
54 | var callback = { success:function(o){ | |
54 | var tr = YUD.get(String(field_id)); |
|
55 | var tr = YUD.get(String(field_id)); | |
55 | tr.parentNode.removeChild(tr);}, |
|
56 | tr.parentNode.removeChild(tr);}, | |
56 | failure:function(o){ |
|
57 | failure:function(o){ | |
57 | alert("${_('Failed to remove users group')}");},}; |
|
58 | alert("${_('Failed to remove users group')}");},}; | |
58 | var postData = '_method=delete&users_group_id='+users_group_id; |
|
59 | var postData = '_method=delete&users_group_id='+users_group_id; | |
59 | var request = YAHOO.util.Connect.asyncRequest('POST', sUrl, callback, postData);}; |
|
60 | var request = YAHOO.util.Connect.asyncRequest('POST', sUrl, callback, postData);}; | |
60 | </script> |
|
61 | </script> | |
61 | %for g2p in c.repo_info.users_group_to_perm: |
|
62 | %for g2p in c.repo_info.users_group_to_perm: | |
62 | <tr id="id${id(g2p.users_group.users_group_name)}"> |
|
63 | <tr id="id${id(g2p.users_group.users_group_name)}"> | |
63 | <td>${h.radio('g_perm_%s' % g2p.users_group.users_group_name,'repository.none')}</td> |
|
64 | <td>${h.radio('g_perm_%s' % g2p.users_group.users_group_name,'repository.none')}</td> | |
64 | <td>${h.radio('g_perm_%s' % g2p.users_group.users_group_name,'repository.read')}</td> |
|
65 | <td>${h.radio('g_perm_%s' % g2p.users_group.users_group_name,'repository.read')}</td> | |
65 | <td>${h.radio('g_perm_%s' % g2p.users_group.users_group_name,'repository.write')}</td> |
|
66 | <td>${h.radio('g_perm_%s' % g2p.users_group.users_group_name,'repository.write')}</td> | |
66 | <td>${h.radio('g_perm_%s' % g2p.users_group.users_group_name,'repository.admin')}</td> |
|
67 | <td>${h.radio('g_perm_%s' % g2p.users_group.users_group_name,'repository.admin')}</td> | |
67 | <td><img style="vertical-align:bottom" src="${h.url("/images/icons/group.png")}"/>${g2p.users_group.users_group_name}</td> |
|
68 | <td><img style="vertical-align:bottom" src="${h.url("/images/icons/group.png")}"/>${g2p.users_group.users_group_name}</td> | |
68 | <td> |
|
69 | <td> | |
69 | <span class="delete_icon action_button" onclick="ajaxActionUsersGroup(${g2p.users_group.users_group_id},'${'id%s'%id(g2p.users_group.users_group_name)}')"> |
|
70 | <span class="delete_icon action_button" onclick="ajaxActionUsersGroup(${g2p.users_group.users_group_id},'${'id%s'%id(g2p.users_group.users_group_name)}')"> | |
|
71 | ${_('revoke')} | |||
70 | </span> |
|
72 | </span> | |
71 | </td> |
|
73 | </td> | |
72 | </tr> |
|
74 | </tr> | |
73 | %endfor |
|
75 | %endfor | |
74 | <tr id="add_perm_input"> |
|
76 | <tr id="add_perm_input"> | |
75 | <td>${h.radio('perm_new_member','repository.none')}</td> |
|
77 | <td>${h.radio('perm_new_member','repository.none')}</td> | |
76 | <td>${h.radio('perm_new_member','repository.read')}</td> |
|
78 | <td>${h.radio('perm_new_member','repository.read')}</td> | |
77 | <td>${h.radio('perm_new_member','repository.write')}</td> |
|
79 | <td>${h.radio('perm_new_member','repository.write')}</td> | |
78 | <td>${h.radio('perm_new_member','repository.admin')}</td> |
|
80 | <td>${h.radio('perm_new_member','repository.admin')}</td> | |
79 | <td class='ac'> |
|
81 | <td class='ac'> | |
80 | <div class="perm_ac" id="perm_ac"> |
|
82 | <div class="perm_ac" id="perm_ac"> | |
81 | ${h.text('perm_new_member_name',class_='yui-ac-input')} |
|
83 | ${h.text('perm_new_member_name',class_='yui-ac-input')} | |
82 | ${h.hidden('perm_new_member_type')} |
|
84 | ${h.hidden('perm_new_member_type')} | |
83 | <div id="perm_container"></div> |
|
85 | <div id="perm_container"></div> | |
84 | </div> |
|
86 | </div> | |
85 | </td> |
|
87 | </td> | |
86 | <td></td> |
|
88 | <td></td> | |
87 | </tr> |
|
89 | </tr> | |
88 | <tr> |
|
90 | <tr> | |
89 | <td colspan="6"> |
|
91 | <td colspan="6"> | |
90 | <span id="add_perm" class="add_icon" style="cursor: pointer;"> |
|
92 | <span id="add_perm" class="add_icon" style="cursor: pointer;"> | |
91 | ${_('Add another member')} |
|
93 | ${_('Add another member')} | |
92 | </span> |
|
94 | </span> | |
93 | </td> |
|
95 | </td> | |
94 | </tr> |
|
96 | </tr> | |
95 | </table> No newline at end of file |
|
97 | </table> |
General Comments 0
You need to be logged in to leave comments.
Login now