users_group_edit.html
154 lines
| 6.5 KiB
| text/html
|
HtmlLexer
r972 | ## -*- coding: utf-8 -*- | |||
<%inherit file="/base/base.html"/> | ||||
<%def name="title()"> | ||||
r3582 | ${_('Edit user group')} ${c.users_group.users_group_name} · ${c.rhodecode_name} | |||
r972 | </%def> | |||
<%def name="breadcrumbs_links()"> | ||||
r1888 | ${h.link_to(_('Admin'),h.url('admin_home'))} | |||
» | ||||
Mads Kiilerich
|
r3417 | ${h.link_to(_('UserGroups'),h.url('users_groups'))} | ||
r972 | » | |||
Mads Kiilerich
|
r3654 | ${_('Edit %s') % c.users_group.users_group_name} | ||
r972 | </%def> | |||
<%def name="page_nav()"> | ||||
${self.menu('admin')} | ||||
</%def> | ||||
<%def name="main()"> | ||||
r3714 | <div class="box box-left" style="clear: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 --> | ||||
Mads Kiilerich
|
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 | ||||
Mads Kiilerich
|
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"> | |||
Mads Kiilerich
|
r3197 | <table> | ||
<tr> | ||||
<td> | ||||
<div> | ||||
<div style="float:left"> | ||||
Mads Kiilerich
|
r3622 | <div class="text" style="padding: 0px 0px 6px;">${_('Chosen group members')}</div> | ||
Mads Kiilerich
|
r3197 | ${h.select('users_group_members',[x[0] for x in c.group_members],c.group_members,multiple=True,size=8,style="min-width:210px")} | ||
Mads Kiilerich
|
r3624 | <div id="remove_all_elements" style="cursor:pointer;text-align:center"> | ||
Mads Kiilerich
|
r3197 | ${_('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"> | |||
Mads Kiilerich
|
r3654 | ${h.submit('Save',_('Save'),class_="ui-btn large")} | ||
r1888 | </div> | |||
</div> | ||||
</div> | ||||
${h.end_form()} | ||||
r3714 | <div class="group_members_wrap"> | |||
% if c.group_members_obj: | ||||
<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> | ||||
<div>${h.link_to(user.username, h.url('edit_user',id=user.user_id))}</div> | ||||
<div>${user.full_name}</div> | ||||
</div> | ||||
</li> | ||||
%endfor | ||||
</ul> | ||||
%else: | ||||
<span class="empty_data">${_('No members yet')}</span> | ||||
%endif | ||||
</div> | ||||
</div> | ||||
r3736 | <div class="box box-right"> | |||
<!-- box / title --> | ||||
<div class="title"> | ||||
<h5>${_('Global Permissions')}</h5> | ||||
</div> | ||||
<%namespace name="dpb" file="/base/default_perms_box.html"/> | ||||
${dpb.default_perms_box(url('users_group_perm', id=c.users_group.users_group_id))} | ||||
r3861 | ||||
## permissions overview | ||||
<%namespace name="p" file="/base/perms_summary.html"/> | ||||
${p.perms_summary(c.permissions)} | ||||
r3736 | </div> | |||
r3714 | ||||
r3861 | <div class="box box-right" style="clear:right"> | |||
r3714 | <div class="title"> | |||
<h5>${_('Permissions')}</h5> | ||||
</div> | ||||
${h.form(url('set_user_group_perm_member', id=c.users_group.users_group_id),method='post')} | ||||
<div class="form"> | ||||
<div class="fields"> | ||||
<div class="field"> | ||||
<div class="label"> | ||||
<label for="input">${_('Permissions')}:</label> | ||||
</div> | ||||
<div class="input"> | ||||
<%include file="user_group_edit_perms.html"/> | ||||
</div> | ||||
</div> | ||||
<div class="buttons"> | ||||
${h.submit('save',_('Save'),class_="ui-btn large")} | ||||
${h.reset('reset',_('Reset'),class_="ui-btn large")} | ||||
</div> | ||||
</div> | ||||
</div> | ||||
${h.end_form()} | ||||
r972 | </div> | |||
r1888 | ||||
r972 | <script type="text/javascript"> | |||
r2394 | MultiSelectWidget('users_group_members','available_members','edit_users_group'); | |||
r1888 | </script> | |||
</%def> | ||||