Mercurial > kallithea
changeset 6597:a1f8bf0428c5
admin: clean-up of Gravatar and IP in user profile headers
Move things around and use Bootstrap compatible markup.
The user IP will rarely be relevant - especially not on the admin pages; the IP
configuration there is more for other user's IP. It might however be somewhat
relevant for a (non-admin) user to know his own IP. There is no obvious place
to show that - it doesn't really fit in as a part of the user profile. Anyway,
just show it under Show Permissions.
author | Mads Kiilerich <mads@kiilerich.com> |
---|---|
date | Sat, 15 Apr 2017 01:56:27 +0200 |
parents | 304aae43194c |
children | 6f6ee1cfe2d6 |
files | kallithea/templates/admin/my_account/my_account.html kallithea/templates/admin/my_account/my_account_perms.html kallithea/templates/admin/my_account/my_account_profile.html kallithea/templates/admin/settings/settings_visual.html kallithea/templates/admin/users/user_edit_profile.html |
diffstat | 5 files changed, 24 insertions(+), 34 deletions(-) [+] |
line wrap: on
line diff
--- a/kallithea/templates/admin/my_account/my_account.html Fri Apr 14 21:30:42 2017 +0200 +++ b/kallithea/templates/admin/my_account/my_account.html Sat Apr 15 01:56:27 2017 +0200 @@ -22,14 +22,6 @@ ##main <div class="panel-body settings"> <ul class="nav nav-pills nav-stacked"> - <li> - <div class="gravatar_box" style="height: 26px"> - ${h.gravatar_div(c.user.email, div_style="float: left")} - <div class="truncate" style="margin:10px 0px 10px 0px; color:#5f5f5f; float:left; width: 100px"> - <strong>${c.user.username}</strong> - </div> - </div> - </li> <li class="${'active' if c.active=='profile' else ''}"><a href="${h.url('my_account')}">${_('Profile')}</a></li> <li class="${'active' if c.active=='emails' else ''}"><a href="${h.url('my_account_emails')}">${_('Email Addresses')}</a></li> <li class="${'active' if c.active=='password' else ''}"><a href="${h.url('my_account_password')}">${_('Password')}</a></li>
--- a/kallithea/templates/admin/my_account/my_account_perms.html Fri Apr 14 21:30:42 2017 +0200 +++ b/kallithea/templates/admin/my_account/my_account_perms.html Sat Apr 15 01:56:27 2017 +0200 @@ -1,5 +1,9 @@ ## permissions overview <div id="perms_container"> +<h4>${_('Current IP')}</h4> +<div> + ${request.ip_addr} +</div> <%namespace name="p" file="/base/perms_summary.html"/> ${p.perms_summary(c.perm_user.permissions, actions=False)} </div>
--- a/kallithea/templates/admin/my_account/my_account_profile.html Fri Apr 14 21:30:42 2017 +0200 +++ b/kallithea/templates/admin/my_account/my_account_profile.html Sat Apr 15 01:56:27 2017 +0200 @@ -2,18 +2,16 @@ <div class="form"> <div class="form-horizontal"> <div class="form-group"> - <div class="gravatar_box"> + <label class="control-label">${_('Gravatar')}:</label> + <div class="gravatar_box clearfix"> ${h.gravatar_div(c.user.email)} - <p> + </div> + <div> %if c.visual.use_gravatar: - <strong>${_('Change your avatar at')} <a href="http://gravatar.com">gravatar.com</a></strong> - <br/>${_('Using')} ${c.user.email} + ${_('Change %s avatar at') % c.user.email} <a href="http://gravatar.com">gravatar.com</a> %else: - <strong>${_('Avatars are disabled')}</strong> - <br/>${c.user.email or _('Missing email, please update your user email address.')} - [${_('Current IP')}: ${request.ip_addr}] + ${_('Avatars are disabled')} %endif - </p> </div> </div>
--- a/kallithea/templates/admin/settings/settings_visual.html Fri Apr 14 21:30:42 2017 +0200 +++ b/kallithea/templates/admin/settings/settings_visual.html Sat Apr 15 01:56:27 2017 +0200 @@ -25,7 +25,7 @@ <div class="checkbox"> <label> ${h.checkbox('use_gravatar','True')} - ${_('Use Gravatars in Kallithea')} + ${_('Show user Gravatars')} </label> </div> ${h.text('gravatar_url', size=80, class_='form-control')}
--- a/kallithea/templates/admin/users/user_edit_profile.html Fri Apr 14 21:30:42 2017 +0200 +++ b/kallithea/templates/admin/users/user_edit_profile.html Sat Apr 15 01:56:27 2017 +0200 @@ -1,23 +1,19 @@ ${h.form(url('update_user', id=c.user.user_id))} <div class="form"> - <div class="form-group"> - <div class="gravatar_box"> - ${h.gravatar_div(c.user.email)} - <p> - %if c.visual.use_gravatar: - <strong>${_('Change avatar at')} <a href="http://gravatar.com">gravatar.com</a></strong> - <br/>${_('Using')} ${c.user.email} - %else: - <strong>${_('Avatars are disabled')}</strong> - <br/>${c.user.email or _('Missing email, please update this user email address.')} - ##show current ip just if we show ourself - %if request.authuser.username == c.user.username: - [${_('Current IP')}: ${request.ip_addr}] - %endif - %endif + <div class="form-horizontal"> + <div class="form-group"> + <label class="control-label">${_('Gravatar')}:</label> + <div class="gravatar_box clearfix"> + ${h.gravatar_div(c.user.email)} + </div> + <div> + %if c.visual.use_gravatar: + ${_('Change %s avatar at') % c.user.email} <a href="http://gravatar.com">gravatar.com</a> + %else: + ${_('Avatars are disabled')} + %endif + </div> </div> - </div> - <div class="form-horizontal"> <div class="form-group"> <label class="control-label" for="username">${_('Username')}:</label>