Mercurial > public > src > rhodecode
changeset 433:7eba3d1e4227
webhelpers import bugfix for gravatar
+some css fixes, and added gravatar for summary.
author | Marcin Kuzminski <marcin@python-works.com> |
---|---|
date | Sun, 08 Aug 2010 02:09:32 +0200 |
parents | f5c1eec9f376 |
children | b1debb6c5a09 |
files | pylons_app/lib/helpers.py pylons_app/public/css/style.css pylons_app/templates/admin/users/user_edit.html pylons_app/templates/admin/users/users.html pylons_app/templates/summary/summary.html |
diffstat | 5 files changed, 17 insertions(+), 14 deletions(-) [+] |
line wrap: on
line diff
--- a/pylons_app/lib/helpers.py Sun Aug 08 01:27:14 2010 +0200 +++ b/pylons_app/lib/helpers.py Sun Aug 08 02:09:32 2010 +0200 @@ -305,14 +305,13 @@ #=============================================================================== import hashlib import urllib +from pylons import request -def gravatar_url(email): +def gravatar_url(email, size=30): ssl_enabled = 'https' == request.environ.get('HTTP_X_URL_SCHEME') default = 'identicon' - size = 32 baseurl_nossl = "http://www.gravatar.com/avatar/" baseurl_ssl = "https://secure.gravatar.com/avatar/" - baseurl = baseurl_ssl if ssl_enabled else baseurl_nossl
--- a/pylons_app/public/css/style.css Sun Aug 08 01:27:14 2010 +0200 +++ b/pylons_app/public/css/style.css Sun Aug 08 02:09:32 2010 +0200 @@ -3446,12 +3446,13 @@ /* ----------------------------------------------------------- GRAVATARS ----------------------------------------------------------- */ -.gravatar_box img{ - float:left; - padding-right: 5px; - padding-top:3px; -} - +div.gravatar{ + background-color:white; + border:1px solid #D0D0D0; + float:left; + margin-right:0.7em; + padding: 2px 2px 0px; +} /* ----------------------------------------------------------- jquery ui
--- a/pylons_app/templates/admin/users/user_edit.html Sun Aug 08 01:27:14 2010 +0200 +++ b/pylons_app/templates/admin/users/user_edit.html Sun Aug 08 02:09:32 2010 +0200 @@ -30,7 +30,7 @@ <div class="fields"> <div class="field"> <div class="gravatar_box"> - <img alt="gravatar" src="${h.gravatar_url(c.user.email)}"/> + <div class="gravatar"><img alt="gravatar" src="${h.gravatar_url(c.user.email)}"/></div> <p> <strong>Change your avatar at <a href="http://gravatar.com">gravatar.com</a></strong><br/> ${_('Using')} ${c.user.email}
--- a/pylons_app/templates/admin/users/users.html Sun Aug 08 01:27:14 2010 +0200 +++ b/pylons_app/templates/admin/users/users.html Sun Aug 08 02:09:32 2010 +0200 @@ -40,7 +40,7 @@ %for cnt,user in enumerate(c.users_list): %if user.name !='default': <tr class="parity${cnt%2}"> - <td> <img alt="gravatar" src="${h.gravatar_url(user.email)}"> </td> + <td><div class="gravatar"><img alt="gravatar" src="${h.gravatar_url(user.email)}"> </div></td> <td>${h.link_to(user.username,h.url('edit_user', id=user.user_id))}</td> <td>${user.name}</td> <td>${user.lastname}</td>
--- a/pylons_app/templates/summary/summary.html Sun Aug 08 01:27:14 2010 +0200 +++ b/pylons_app/templates/summary/summary.html Sun Aug 08 02:09:32 2010 +0200 @@ -4,8 +4,6 @@ ${_('Mercurial Repository Overview')} </%def> - - <%def name="breadcrumbs_links()"> ${h.link_to(u'Home',h.url('/'))} » @@ -64,7 +62,12 @@ <label>${_('Contact')}:</label> </div> <div class="input-short"> - ${c.repo_info.contact} + <div class="gravatar"> + <img alt="gravatar" src="${h.gravatar_url(c.repo_info.dbrepo.user.email)}"/> + </div> + ${_('Username')}: ${c.repo_info.dbrepo.user.username}<br/> + ${_('Name')}: ${c.repo_info.dbrepo.user.name} ${c.repo_info.dbrepo.user.lastname}<br/> + ${_('Email')}: <a href="mailto:${c.repo_info.dbrepo.user.email}">${c.repo_info.dbrepo.user.email}</a> </div> </div>