##// END OF EJS Templates
webhelpers import bugfix for gravatar...
marcink -
r400:7eba3d1e default
parent child Browse files
Show More
@@ -305,14 +305,13 b' HasRepoPermissionAny, HasRepoPermissionA'
305 #===============================================================================
305 #===============================================================================
306 import hashlib
306 import hashlib
307 import urllib
307 import urllib
308 from pylons import request
308
309
309 def gravatar_url(email):
310 def gravatar_url(email, size=30):
310 ssl_enabled = 'https' == request.environ.get('HTTP_X_URL_SCHEME')
311 ssl_enabled = 'https' == request.environ.get('HTTP_X_URL_SCHEME')
311 default = 'identicon'
312 default = 'identicon'
312 size = 32
313 baseurl_nossl = "http://www.gravatar.com/avatar/"
313 baseurl_nossl = "http://www.gravatar.com/avatar/"
314 baseurl_ssl = "https://secure.gravatar.com/avatar/"
314 baseurl_ssl = "https://secure.gravatar.com/avatar/"
315
316 baseurl = baseurl_ssl if ssl_enabled else baseurl_nossl
315 baseurl = baseurl_ssl if ssl_enabled else baseurl_nossl
317
316
318
317
@@ -3446,12 +3446,13 b' table#permissions_manage tr#add_perm_inp'
3446 /* -----------------------------------------------------------
3446 /* -----------------------------------------------------------
3447 GRAVATARS
3447 GRAVATARS
3448 ----------------------------------------------------------- */
3448 ----------------------------------------------------------- */
3449 .gravatar_box img{
3449 div.gravatar{
3450 float:left;
3450 background-color:white;
3451 padding-right: 5px;
3451 border:1px solid #D0D0D0;
3452 padding-top:3px;
3452 float:left;
3453 }
3453 margin-right:0.7em;
3454
3454 padding: 2px 2px 0px;
3455 }
3455
3456
3456 /* -----------------------------------------------------------
3457 /* -----------------------------------------------------------
3457 jquery ui
3458 jquery ui
@@ -30,7 +30,7 b''
30 <div class="fields">
30 <div class="fields">
31 <div class="field">
31 <div class="field">
32 <div class="gravatar_box">
32 <div class="gravatar_box">
33 <img alt="gravatar" src="${h.gravatar_url(c.user.email)}"/>
33 <div class="gravatar"><img alt="gravatar" src="${h.gravatar_url(c.user.email)}"/></div>
34 <p>
34 <p>
35 <strong>Change your avatar at <a href="http://gravatar.com">gravatar.com</a></strong><br/>
35 <strong>Change your avatar at <a href="http://gravatar.com">gravatar.com</a></strong><br/>
36 ${_('Using')} ${c.user.email}
36 ${_('Using')} ${c.user.email}
@@ -40,7 +40,7 b''
40 %for cnt,user in enumerate(c.users_list):
40 %for cnt,user in enumerate(c.users_list):
41 %if user.name !='default':
41 %if user.name !='default':
42 <tr class="parity${cnt%2}">
42 <tr class="parity${cnt%2}">
43 <td> <img alt="gravatar" src="${h.gravatar_url(user.email)}"> </td>
43 <td><div class="gravatar"><img alt="gravatar" src="${h.gravatar_url(user.email)}"> </div></td>
44 <td>${h.link_to(user.username,h.url('edit_user', id=user.user_id))}</td>
44 <td>${h.link_to(user.username,h.url('edit_user', id=user.user_id))}</td>
45 <td>${user.name}</td>
45 <td>${user.name}</td>
46 <td>${user.lastname}</td>
46 <td>${user.lastname}</td>
@@ -4,8 +4,6 b''
4 ${_('Mercurial Repository Overview')}
4 ${_('Mercurial Repository Overview')}
5 </%def>
5 </%def>
6
6
7
8
9 <%def name="breadcrumbs_links()">
7 <%def name="breadcrumbs_links()">
10 ${h.link_to(u'Home',h.url('/'))}
8 ${h.link_to(u'Home',h.url('/'))}
11 &raquo;
9 &raquo;
@@ -64,7 +62,12 b' E.onDOMReady(function(e){'
64 <label>${_('Contact')}:</label>
62 <label>${_('Contact')}:</label>
65 </div>
63 </div>
66 <div class="input-short">
64 <div class="input-short">
67 ${c.repo_info.contact}
65 <div class="gravatar">
66 <img alt="gravatar" src="${h.gravatar_url(c.repo_info.dbrepo.user.email)}"/>
67 </div>
68 ${_('Username')}: ${c.repo_info.dbrepo.user.username}<br/>
69 ${_('Name')}: ${c.repo_info.dbrepo.user.name} ${c.repo_info.dbrepo.user.lastname}<br/>
70 ${_('Email')}: <a href="mailto:${c.repo_info.dbrepo.user.email}">${c.repo_info.dbrepo.user.email}</a>
68 </div>
71 </div>
69 </div>
72 </div>
70
73
General Comments 0
You need to be logged in to leave comments. Login now