## -*- coding: utf-8 -*- <%inherit file="/base/base.html"/> <%def name="title()"> ${_('Edit user')} ${c.user.username} - ${c.rhodecode_name} <%def name="breadcrumbs_links()"> ${h.link_to(_('Admin'),h.url('admin_home'))} » ${h.link_to(_('Users'),h.url('users'))} » ${_('edit')} "${c.user.username}" <%def name="page_nav()"> ${self.menu('admin')} <%def name="main()">
${self.breadcrumbs()}
${h.form(url('update_user', id=c.user.user_id),method='put')}
gravatar

%if c.use_gravatar: ${_('Change your avatar at')} gravatar.com
${_('Using')} ${c.user.email} %else:
${c.user.email} %endif

${c.user.api_key}
${h.text('username',class_='medium')}
${h.text('ldap_dn',class_='medium disabled',readonly="readonly")}
${h.password('new_password',class_='medium',autocomplete="off")}
${h.password('password_confirmation',class_="medium",autocomplete="off")}
${h.text('name',class_='medium')}
${h.text('lastname',class_='medium')}
${h.text('email',class_='medium')}
${h.checkbox('active',value=True)}
${h.checkbox('admin',value=True)}
${h.submit('save',_('Save'),class_="ui-button")} ${h.reset('reset',_('Reset'),class_="ui-button")}
${h.end_form()}
${_('Permissions')}
${h.form(url('user_perm', id=c.user.user_id),method='put')}
${h.checkbox('create_repo_perm',value=True)}
${h.submit('save',_('Save'),class_="ui-button")} ${h.reset('reset',_('Reset'),class_="ui-button")}
${h.end_form()} ## permissions overview
%for section in sorted(c.perm_user.permissions.keys()):
${section.replace("_"," ").capitalize()}
%for k in c.perm_user.permissions[section]: <% if section != 'global': section_perm = c.perm_user.permissions[section].get(k) _perm = section_perm.split('.')[-1] else: _perm = section_perm = None %> %endfor
${_('Name')} ${_('Permission')}
%if section == 'repositories': ${k} %elif section == 'repositories_groups': ${k} %else: ${k} %endif %if section == 'global': ${h.bool2icon(True)} %else: ${section_perm} %endif
%endfor