@@ -40,222 +40,225 @@
</div>
<div class="field">
<div class="label">
<label>${_('API key')}</label> ${c.user.api_key}
<div class="fields">
<label for="username">${_('Username')}:</label>
<div class="input">
${h.text('username',class_='medium')}
<label for="ldap_dn">${_('LDAP DN')}:</label>
${h.text('ldap_dn',class_='medium disabled',readonly="readonly")}
<label for="new_password">${_('New password')}:</label>
${h.password('new_password',class_='medium',autocomplete="off")}
<label for="password_confirmation">${_('New password confirmation')}:</label>
${h.password('password_confirmation',class_="medium",autocomplete="off")}
<label for="firstname">${_('First Name')}:</label>
${h.text('firstname',class_='medium')}
<label for="lastname">${_('Last Name')}:</label>
${h.text('lastname',class_='medium')}
<label for="email">${_('Email')}:</label>
${h.text('email',class_='medium')}
<div class="label label-checkbox">
<label for="active">${_('Active')}:</label>
<div class="checkboxes">
${h.checkbox('active',value=True)}
<label for="admin">${_('Admin')}:</label>
${h.checkbox('admin',value=True)}
<div class="buttons">
${h.submit('save',_('Save'),class_="ui-btn large")}
${h.reset('reset',_('Reset'),class_="ui-btn large")}
${h.end_form()}
<div class="box box-right">
<div style="min-height:780px" class="box box-right">
<!-- box / title -->
<div class="title">
<h5>${_('Permissions')}</h5>
${h.form(url('user_perm', id=c.user.user_id),method='put')}
<div class="form">
<!-- fields -->
<label for="create_repo_perm">${_('Create repositories')}:</label>
${h.checkbox('create_repo_perm',value=True)}
## permissions overview
<div id="perms" class="table">
%for section in sorted(c.perm_user.permissions.keys()):
<div class="perms_section_head">${section.replace("_"," ").capitalize()}</div>
%if not c.perm_user.permissions[section]:
<span style="color:#B9B9B9">${_('Nothing here yet')}</span>
%else:
<div id='tbl_list_wrap_${section}' class="yui-skin-sam">
<table id="tbl_list_${section}">
<thead>
<tr>
<th class="left">${_('Name')}</th>
<th class="left">${_('Permission')}</th>
<th class="left">${_('Edit Permission')}</th>
</thead>
<tbody>
%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
%>
<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>
${h.get_permission_name(k)}
%endif
</td>
%if section == 'global':
${h.bool2icon(k.split('.')[-1] != 'none')}
<span class="perm_tag ${_perm}">${section_perm}</span>
<a href="${h.url('edit_repo',repo_name=k,anchor='permissions_manage')}">${_('edit')}</a>
<a href="${h.url('edit_repos_group',id=k,anchor='permissions_manage')}">${_('edit')}</a>
--
</tr>
%endfor
</tbody>
</table>
<div class="box box-left">
<h5>${_('Email addresses')}</h5>
<div class="emails_wrap">
<table class="noborder">
%for em in c.user_email_map:
<td><div class="gravatar"><img alt="gravatar" src="${h.gravatar_url(em.user.email,16)}"/> </div></td>
<td><div class="email">${em.email}</div></td>
${h.form(url('user_emails_delete', id=c.user.user_id),method='delete')}
${h.hidden('del_email',em.email_id)}
${h.submit('remove_',_('delete'),id="remove_email_%s" % em.email_id,
class_="delete_icon action_button", onclick="return confirm('"+_('Confirm to delete this email: %s') % em.email+"');")}
${h.form(url('user_emails', id=c.user.user_id),method='put')}
<label for="email">${_('New email address')}:</label>
${h.text('new_email', class_='medium')}
${h.submit('save',_('Add'),class_="ui-btn large")}
</%def>
Status change: