##// END OF EJS Templates
comments: updated edit message when body is still the same.
comments: updated edit message when body is still the same.

File last commit:

r4351:2d86851b default
r4403:dc3600c4 default
Show More
user_edit_advanced.mako
211 lines | 10.5 KiB | application/x-mako | MakoHtmlLexer
/ rhodecode / templates / admin / users / user_edit_advanced.mako
templating: use .mako as extensions for template files.
r1282 <%namespace name="base" file="/base/base.mako"/>
<%
elems = [
templates: expose IDs of objects in advanced views. Usefull for API or ishell.
r3332 (_('User ID'), c.user.user_id, '', ''),
templating: use .mako as extensions for template files.
r1282 (_('Created on'), h.format_date(c.user.created_on), '', ''),
(_('Source of Record'), c.user.extern_type, '', ''),
(_('Last login'), c.user.last_login or '-', '', ''),
users: change last activity to re-use new column.
r1546 (_('Last activity'), c.user.last_activity, '', ''),
templating: use .mako as extensions for template files.
r1282
(_('Repositories'), len(c.user.repositories), '', [x.repo_name for x in c.user.repositories]),
(_('Repository groups'), len(c.user.repository_groups), '', [x.group_name for x in c.user.repository_groups]),
(_('User groups'), len(c.user.user_groups), '', [x.users_group_name for x in c.user.user_groups]),
artifacts: handle detach/delete of artifacts for users who own them and are to be deleted....
r4011 (_('Owned Artifacts'), len(c.user.artifacts), '', [x.file_uid for x in c.user.artifacts]),
dan
users: add additional information why user with pending reviews shouldn't be deleted.
r1923 (_('Reviewer of pull requests'), len(c.user.reviewer_pull_requests), '', ['Pull Request #{}'.format(x.pull_request.pull_request_id) for x in c.user.reviewer_pull_requests]),
user/user-groups: show if users or user groups are a part of review rules....
r2054 (_('Assigned to review rules'), len(c.user_to_review_rules), '', [x for x in c.user_to_review_rules]),
templating: use .mako as extensions for template files.
r1282 (_('Member of User groups'), len(c.user.group_member), '', [x.users_group.users_group_name for x in c.user.group_member]),
(_('Force password change'), c.user.user_data.get('force_password_change', 'False'), '', ''),
]
%>
<div class="panel panel-default">
<div class="panel-heading">
users/user-groups: added context of what we're editing....
r4232 <h3 class="panel-title">
${base.gravatar_with_user(c.user.username, 16, tooltip=False, _class='pull-left')}
&nbsp;- ${_('Access Permissions')}
</h3>
templating: use .mako as extensions for template files.
r1282 </div>
<div class="panel-body">
artifacts: handle detach/delete of artifacts for users who own them and are to be deleted....
r4011 <table class="rctable">
<tr>
<th>Name</th>
<th>Value</th>
<th>Action</th>
</tr>
% for elem in elems:
${base.tr_info_entry(elem)}
% endfor
</table>
templating: use .mako as extensions for template files.
r1282 </div>
</div>
<div class="panel panel-default">
<div class="panel-heading">
<h3 class="panel-title">${_('Force Password Reset')}</h3>
</div>
<div class="panel-body">
users: use two distinct actions for user password reset....
r3378 ${h.secure_form(h.route_path('user_disable_force_password_reset', user_id=c.user.user_id), request=request)}
templating: use .mako as extensions for template files.
r1282 <div class="field">
<button class="btn btn-default" type="submit">
users: use two distinct actions for user password reset....
r3378 <i class="icon-unlock"></i> ${_('Disable forced password reset')}
</button>
</div>
<div class="field">
<span class="help-block">
${_("Clear the forced password change flag.")}
</span>
</div>
${h.end_form()}
${h.secure_form(h.route_path('user_enable_force_password_reset', user_id=c.user.user_id), request=request)}
<div class="field">
<button class="btn btn-default" type="submit" onclick="return confirm('${_('Confirm to enable forced password change')}');">
<i class="icon-lock"></i> ${_('Enable forced password reset')}
templating: use .mako as extensions for template files.
r1282 </button>
</div>
<div class="field">
<span class="help-block">
${_("When this is enabled user will have to change they password when they next use RhodeCode system. This will also forbid vcs operations until someone makes a password change in the web interface")}
</span>
</div>
${h.end_form()}
users: use two distinct actions for user password reset....
r3378
templating: use .mako as extensions for template files.
r1282 </div>
</div>
<div class="panel panel-default">
<div class="panel-heading">
<h3 class="panel-title">${_('Personal Repository Group')}</h3>
</div>
<div class="panel-body">
users: ported controllers from pylons into pyramid views.
r2114 ${h.secure_form(h.route_path('user_create_personal_repo_group', user_id=c.user.user_id), request=request)}
templating: use .mako as extensions for template files.
r1282
%if c.personal_repo_group:
home: moved home and repo group views into pyramid....
r1774 <div class="panel-body-title-text">${_('Users personal repository group')} : ${h.link_to(c.personal_repo_group.group_name, h.route_path('repo_group_home', repo_group_name=c.personal_repo_group.group_name))}</div>
templating: use .mako as extensions for template files.
r1282 %else:
<div class="panel-body-title-text">
${_('This user currently does not have a personal repository group')}
<br/>
${_('New group will be created at: `/%(path)s`') % {'path': c.personal_repo_group_name}}
</div>
%endif
<button class="btn btn-default" type="submit" ${'disabled="disabled"' if c.personal_repo_group else ''}>
icons: updated iconography and fontello configuration
r3680 <i class="icon-repo-group"></i>
templating: use .mako as extensions for template files.
r1282 ${_('Create personal repository group')}
</button>
${h.end_form()}
</div>
</div>
<div class="panel panel-danger">
<div class="panel-heading">
<h3 class="panel-title">${_('Delete User')}</h3>
</div>
<div class="panel-body">
users: ported controllers from pylons into pyramid views.
r2114 ${h.secure_form(h.route_path('user_delete', user_id=c.user.user_id), request=request)}
templating: use .mako as extensions for template files.
r1282
users: updated UI for advanced section. Mostly fixes arround making clearer...
r3447 <table class="display rctable">
templating: use .mako as extensions for template files.
r1282 <tr>
<td>
translation: unified usage of pluralize function ungettext....
r1945 ${_ungettext('This user owns %s repository.', 'This user owns %s repositories.', len(c.user.repositories)) % len(c.user.repositories)}
templating: use .mako as extensions for template files.
r1282 </td>
<td>
users: updated UI for advanced section. Mostly fixes arround making clearer...
r3447 <input type="radio" id="user_repos_1" name="user_repos" value="detach" checked="checked" ${'disabled=1' if len(c.user.repositories) == 0 else ''} /> <label for="user_repos_1">${_('Detach repositories')}</label>
templating: use .mako as extensions for template files.
r1282 </td>
<td>
users: updated UI for advanced section. Mostly fixes arround making clearer...
r3447 <input type="radio" id="user_repos_2" name="user_repos" value="delete" ${'disabled=1' if len(c.user.repositories) == 0 else ''} /> <label for="user_repos_2">${_('Delete repositories')}</label>
templating: use .mako as extensions for template files.
r1282 </td>
</tr>
<tr>
<td>
translation: unified usage of pluralize function ungettext....
r1945 ${_ungettext('This user owns %s repository group.', 'This user owns %s repository groups.', len(c.user.repository_groups)) % len(c.user.repository_groups)}
templating: use .mako as extensions for template files.
r1282 </td>
<td>
users: updated UI for advanced section. Mostly fixes arround making clearer...
r3447 <input type="radio" id="user_repo_groups_1" name="user_repo_groups" value="detach" checked="checked" ${'disabled=1' if len(c.user.repository_groups) == 0 else ''} /> <label for="user_repo_groups_1">${_('Detach repository groups')}</label>
templating: use .mako as extensions for template files.
r1282 </td>
<td>
users: updated UI for advanced section. Mostly fixes arround making clearer...
r3447 <input type="radio" id="user_repo_groups_2" name="user_repo_groups" value="delete" ${'disabled=1' if len(c.user.repository_groups) == 0 else ''}/> <label for="user_repo_groups_2">${_('Delete repositories')}</label>
templating: use .mako as extensions for template files.
r1282 </td>
</tr>
<tr>
<td>
translation: unified usage of pluralize function ungettext....
r1945 ${_ungettext('This user owns %s user group.', 'This user owns %s user groups.', len(c.user.user_groups)) % len(c.user.user_groups)}
templating: use .mako as extensions for template files.
r1282 </td>
<td>
users: updated UI for advanced section. Mostly fixes arround making clearer...
r3447 <input type="radio" id="user_user_groups_1" name="user_user_groups" value="detach" checked="checked" ${'disabled=1' if len(c.user.user_groups) == 0 else ''}/> <label for="user_user_groups_1">${_('Detach user groups')}</label>
templating: use .mako as extensions for template files.
r1282 </td>
<td>
users: updated UI for advanced section. Mostly fixes arround making clearer...
r3447 <input type="radio" id="user_user_groups_2" name="user_user_groups" value="delete" ${'disabled=1' if len(c.user.user_groups) == 0 else ''}/> <label for="user_user_groups_2">${_('Delete repositories')}</label>
templating: use .mako as extensions for template files.
r1282 </td>
</tr>
artifacts: handle detach/delete of artifacts for users who own them and are to be deleted....
r4011
<tr>
<td>
dan
users: added option to detach pull requests for users which we delete....
r4351 ${_ungettext('This user owns %s pull request.', 'This user owns %s pull requests.', len(c.user.user_pull_requests)) % len(c.user.user_pull_requests)}
</td>
<td>
<input type="radio" id="user_pull_requests_1" name="user_pull_requests" value="detach" checked="checked" ${'disabled=1' if len(c.user.user_pull_requests) == 0 else ''}/> <label for="user_pull_requests_1">${_('Detach pull requests')}</label>
</td>
<td>
<input type="radio" id="user_pull_requests_2" name="user_pull_requests" value="delete" ${'disabled=1' if len(c.user.user_pull_requests) == 0 else ''}/> <label for="user_pull_requests_2">${_('Delete pull requests')}</label>
</td>
</tr>
<tr>
<td>
artifacts: handle detach/delete of artifacts for users who own them and are to be deleted....
r4011 ${_ungettext('This user owns %s artifact.', 'This user owns %s artifacts.', len(c.user.artifacts)) % len(c.user.artifacts)}
</td>
<td>
<input type="radio" id="user_artifacts_1" name="user_artifacts" value="detach" checked="checked" ${'disabled=1' if len(c.user.artifacts) == 0 else ''}/> <label for="user_artifacts_1">${_('Detach Artifacts')}</label>
</td>
<td>
<input type="radio" id="user_artifacts_2" name="user_artifacts" value="delete" ${'disabled=1' if len(c.user.artifacts) == 0 else ''}/> <label for="user_artifacts_2">${_('Delete Artifacts')}</label>
</td>
</tr>
templating: use .mako as extensions for template files.
r1282 </table>
<div style="margin: 0 0 20px 0" class="fake-space"></div>
users: updated UI for advanced section. Mostly fixes arround making clearer...
r3447 <div class="pull-left">
% if len(c.user.repositories) > 0 or len(c.user.repository_groups) > 0 or len(c.user.user_groups) > 0:
% endif
<span style="padding: 0 5px 0 0">${_('New owner for detached objects')}:</span>
dan
users: added option to detach pull requests for users which we delete....
r4351 <div class="pull-right">${base.gravatar_with_user(c.detach_user.email, 16, tooltip=True)}</div>
<input type="hidden" name="detach_user_id" value="${c.detach_user.user_id}">
users: updated UI for advanced section. Mostly fixes arround making clearer...
r3447 </div>
<div style="clear: both">
<div>
<p class="help-block">
${_("When selecting the detach option, the depending objects owned by this user will be assigned to the above user.")}
<br/>
${_("The delete option will delete the user and all his owned objects!")}
</p>
</div>
% if c.can_delete_user_message:
<p class="pre-formatting">${c.can_delete_user_message}</p>
% endif
</div>
<div style="margin: 0 0 20px 0" class="fake-space"></div>
templating: use .mako as extensions for template files.
r1282
<div class="field">
dan
users: added option to detach pull requests for users which we delete....
r4351 <input class="btn btn-small btn-danger" id="remove_user" name="remove_user"
onclick="submitConfirm(event, this, _gettext('Confirm to delete this user'), _gettext('Confirm Delete'), '${c.user.username}')"
${("disabled=1" if not c.can_delete_user else "")}
type="submit" value="${_('Delete this user')}"
>
templating: use .mako as extensions for template files.
r1282 </div>
${h.end_form()}
</div>
</div>