users_group_edit.html
228 lines
| 9.6 KiB
| text/html
|
HtmlLexer
r972 | ## -*- coding: utf-8 -*- | |||
<%inherit file="/base/base.html"/> | ||||
<%def name="title()"> | ||||
${_('Edit users group')} ${c.users_group.users_group_name} - ${c.rhodecode_name} | ||||
</%def> | ||||
<%def name="breadcrumbs_links()"> | ||||
r1888 | ${h.link_to(_('Admin'),h.url('admin_home'))} | |||
» | ||||
${h.link_to(_('UsersGroups'),h.url('users_groups'))} | ||||
r972 | » | |||
${_('edit')} "${c.users_group.users_group_name}" | ||||
</%def> | ||||
<%def name="page_nav()"> | ||||
${self.menu('admin')} | ||||
</%def> | ||||
<%def name="main()"> | ||||
r1124 | <div class="box box-left"> | |||
r972 | <!-- box / title --> | |||
<div class="title"> | ||||
r1888 | ${self.breadcrumbs()} | |||
r972 | </div> | |||
<!-- end box / title --> | ||||
${h.form(url('users_group', id=c.users_group.users_group_id),method='put', id='edit_users_group')} | ||||
<div class="form"> | ||||
<!-- fields --> | ||||
|
r3197 | <div class="fields"> | ||
<div class="field"> | ||||
<div class="label"> | ||||
<label for="users_group_name">${_('Group name')}:</label> | ||||
</div> | ||||
<div class="input"> | ||||
${h.text('users_group_name',class_='small')} | ||||
</div> | ||||
</div> | ||||
r1888 | ||||
|
r3197 | <div class="field"> | ||
<div class="label label-checkbox"> | ||||
<label for="users_group_active">${_('Active')}:</label> | ||||
</div> | ||||
<div class="checkboxes"> | ||||
${h.checkbox('users_group_active',value=True)} | ||||
</div> | ||||
</div> | ||||
<div class="field"> | ||||
r985 | <div class="label"> | |||
r972 | <label for="users_group_active">${_('Members')}:</label> | |||
</div> | ||||
r985 | <div class="select"> | |||
|
r3197 | <table> | ||
<tr> | ||||
<td> | ||||
<div> | ||||
<div style="float:left"> | ||||
<div class="text" style="padding: 0px 0px 6px;">${_('Choosen group members')}</div> | ||||
${h.select('users_group_members',[x[0] for x in c.group_members],c.group_members,multiple=True,size=8,style="min-width:210px")} | ||||
<div id="remove_all_elements" style="cursor:pointer;text-align:center"> | ||||
${_('Remove all elements')} | ||||
<img alt="remove" style="vertical-align:text-bottom" src="${h.url('/images/icons/arrow_right.png')}"/> | ||||
</div> | ||||
</div> | ||||
<div style="float:left;width:20px;padding-top:50px"> | ||||
<img alt="add" id="add_element" | ||||
style="padding:2px;cursor:pointer" | ||||
src="${h.url('/images/icons/arrow_left.png')}"/> | ||||
<br /> | ||||
<img alt="remove" id="remove_element" | ||||
style="padding:2px;cursor:pointer" | ||||
src="${h.url('/images/icons/arrow_right.png')}"/> | ||||
</div> | ||||
<div style="float:left"> | ||||
<div class="text" style="padding: 0px 0px 6px;">${_('Available members')}</div> | ||||
${h.select('available_members',[],c.available_members,multiple=True,size=8,style="min-width:210px")} | ||||
<div id="add_all_elements" style="cursor:pointer;text-align:center"> | ||||
<img alt="add" style="vertical-align:text-bottom" src="${h.url('/images/icons/arrow_left.png')}"/> | ||||
${_('Add all elements')} | ||||
</div> | ||||
</div> | ||||
</div> | ||||
</td> | ||||
</tr> | ||||
</table> | ||||
r1888 | </div> | |||
r972 | ||||
r1888 | </div> | |||
r972 | <div class="buttons"> | |||
r2607 | ${h.submit('save',_('save'),class_="ui-btn large")} | |||
r1888 | </div> | |||
</div> | ||||
</div> | ||||
${h.end_form()} | ||||
r972 | </div> | |||
r1888 | ||||
r1952 | <div class="box box-right"> | |||
<!-- box / title --> | ||||
<div class="title"> | ||||
<h5>${_('Permissions')}</h5> | ||||
</div> | ||||
${h.form(url('users_group_perm', id=c.users_group.users_group_id), method='put')} | ||||
<div class="form"> | ||||
<!-- fields --> | ||||
<div class="fields"> | ||||
<div class="field"> | ||||
<div class="label label-checkbox"> | ||||
r2709 | <label for="inherit_permissions">${_('Inherit default permissions')}:</label> | |||
</div> | ||||
<div class="checkboxes"> | ||||
${h.checkbox('inherit_default_permissions',value=True)} | ||||
</div> | ||||
<span class="help-block">${h.literal(_('Select to inherit permissions from %s settings. ' | ||||
'With this selected below options does not have any action') % h.link_to('default', url('edit_permission', id='default')))}</span> | ||||
r2815 | </div> | |||
r2709 | <div id="inherit_overlay" style="${'opacity:0.3' if c.users_group.inherit_default_permissions else ''}" > | |||
<div class="field"> | ||||
<div class="label label-checkbox"> | ||||
r1952 | <label for="create_repo_perm">${_('Create repositories')}:</label> | |||
</div> | ||||
<div class="checkboxes"> | ||||
${h.checkbox('create_repo_perm',value=True)} | ||||
</div> | ||||
</div> | ||||
r2709 | <div class="field"> | |||
<div class="label label-checkbox"> | ||||
<label for="fork_repo_perm">${_('Fork repositories')}:</label> | ||||
</div> | ||||
<div class="checkboxes"> | ||||
${h.checkbox('fork_repo_perm',value=True)} | ||||
</div> | ||||
</div> | ||||
r2815 | </div> | |||
r1952 | <div class="buttons"> | |||
r2607 | ${h.submit('save',_('Save'),class_="ui-btn large")} | |||
${h.reset('reset',_('Reset'),class_="ui-btn large")} | ||||
r1952 | </div> | |||
</div> | ||||
</div> | ||||
${h.end_form()} | ||||
</div> | ||||
<div class="box box-right"> | ||||
<!-- box / title --> | ||||
<div class="title"> | ||||
<h5>${_('Group members')}</h5> | ||||
</div> | ||||
r2987 | ||||
r1952 | <div class="group_members_wrap"> | |||
r2987 | % if c.group_members_obj: | |||
r1952 | <ul class="group_members"> | |||
%for user in c.group_members_obj: | ||||
<li> | ||||
<div class="group_member"> | ||||
<div class="gravatar"><img alt="gravatar" src="${h.gravatar_url(user.email,24)}"/> </div> | ||||
r2987 | <div>${h.link_to(user.username, h.url('edit_user',id=user.user_id))}</div> | |||
r1952 | <div>${user.full_name}</div> | |||
</div> | ||||
</li> | ||||
%endfor | ||||
</ul> | ||||
r2987 | %else: | |||
<span class="empty_data">${_('No members yet')}</span> | ||||
r3029 | %endif | |||
r1952 | </div> | |||
</div> | ||||
r2987 | ||||
<div class="box box-left"> | ||||
<!-- box / title --> | ||||
<div class="title"> | ||||
<h5>${_('Permissions defined for this group')}</h5> | ||||
</div> | ||||
## permissions overview | ||||
<div id="perms" class="table"> | ||||
%for section in sorted(c.users_group.permissions.keys()): | ||||
<div class="perms_section_head">${section.replace("_"," ").capitalize()}</div> | ||||
%if not c.users_group.permissions: | ||||
<span class="empty_data">${_('No permissions set yet')}</span> | ||||
%else: | ||||
<div id='tbl_list_wrap_${section}' class="yui-skin-sam"> | ||||
<table id="tbl_list_repository"> | ||||
<thead> | ||||
<tr> | ||||
<th class="left">${_('Name')}</th> | ||||
<th class="left">${_('Permission')}</th> | ||||
<th class="left">${_('Edit Permission')}</th> | ||||
</thead> | ||||
<tbody> | ||||
%for k in c.users_group.permissions[section]: | ||||
<% | ||||
section_perm = c.users_group.permissions[section].get(k) | ||||
_perm = section_perm.split('.')[-1] | ||||
%> | ||||
<tr> | ||||
<td> | ||||
%if section == 'repositories': | ||||
<a href="${h.url('summary_home',repo_name=k)}">${k}</a> | ||||
%elif section == 'repositories_groups': | ||||
<a href="${h.url('repos_group_home',group_name=k)}">${k}</a> | ||||
%endif | ||||
</td> | ||||
<td> | ||||
<span class="perm_tag ${_perm}">${section_perm}</span> | ||||
</td> | ||||
<td> | ||||
%if section == 'repositories': | ||||
<a href="${h.url('edit_repo',repo_name=k,anchor='permissions_manage')}">${_('edit')}</a> | ||||
%elif section == 'repositories_groups': | ||||
<a href="${h.url('edit_repos_group',id=k,anchor='permissions_manage')}">${_('edit')}</a> | ||||
%else: | ||||
-- | ||||
%endif | ||||
</td> | ||||
</tr> | ||||
%endfor | ||||
</tbody> | ||||
</table> | ||||
</div> | ||||
%endif | ||||
%endfor | ||||
</div> | ||||
</div> | ||||
r972 | <script type="text/javascript"> | |||
r2394 | MultiSelectWidget('users_group_members','available_members','edit_users_group'); | |||
r1888 | </script> | |||
</%def> | ||||