Show More
@@ -11,6 +11,7 b' from pylons.templating import render_mak' | |||||
11 | from paste.deploy.converters import asbool |
|
11 | from paste.deploy.converters import asbool | |
12 |
|
12 | |||
13 | from rhodecode import __version__ |
|
13 | from rhodecode import __version__ | |
|
14 | from rhodecode.lib import str2bool | |||
14 | from rhodecode.lib.auth import AuthUser, get_container_username |
|
15 | from rhodecode.lib.auth import AuthUser, get_container_username | |
15 | from rhodecode.lib.utils import get_repo_slug |
|
16 | from rhodecode.lib.utils import get_repo_slug | |
16 | from rhodecode.model import meta |
|
17 | from rhodecode.model import meta | |
@@ -25,6 +26,7 b' class BaseController(WSGIController):' | |||||
25 | def __before__(self): |
|
26 | def __before__(self): | |
26 | c.rhodecode_version = __version__ |
|
27 | c.rhodecode_version = __version__ | |
27 | c.rhodecode_name = config.get('rhodecode_title') |
|
28 | c.rhodecode_name = config.get('rhodecode_title') | |
|
29 | c.use_gravatar = str2bool(config.get('use_gravatar')) | |||
28 | c.ga_code = config.get('rhodecode_ga_code') |
|
30 | c.ga_code = config.get('rhodecode_ga_code') | |
29 | c.repo_name = get_repo_slug(request) |
|
31 | c.repo_name = get_repo_slug(request) | |
30 | c.backends = BACKENDS.keys() |
|
32 | c.backends = BACKENDS.keys() |
@@ -454,9 +454,8 b' HasRepoPermissionAny, HasRepoPermissionA' | |||||
454 | #============================================================================== |
|
454 | #============================================================================== | |
455 |
|
455 | |||
456 | def gravatar_url(email_address, size=30): |
|
456 | def gravatar_url(email_address, size=30): | |
457 |
if not str2bool(config['app_conf'].get('use_gravatar')) or |
|
457 | if (not str2bool(config['app_conf'].get('use_gravatar')) or | |
458 | not email_address or \ |
|
458 | not email_address or email_address == 'anonymous@rhodecode.org'): | |
459 | email_address == 'anonymous@rhodecode.org': |
|
|||
460 | return url("/images/user%s.png" % size) |
|
459 | return url("/images/user%s.png" % size) | |
461 |
|
460 | |||
462 | ssl_enabled = 'https' == request.environ.get('wsgi.url_scheme') |
|
461 | ssl_enabled = 'https' == request.environ.get('wsgi.url_scheme') |
@@ -29,10 +29,13 b'' | |||||
29 | <div class="field"> |
|
29 | <div class="field"> | |
30 | <div class="gravatar_box"> |
|
30 | <div class="gravatar_box"> | |
31 | <div class="gravatar"><img alt="gravatar" src="${h.gravatar_url(c.user.email)}"/></div> |
|
31 | <div class="gravatar"><img alt="gravatar" src="${h.gravatar_url(c.user.email)}"/></div> | |
32 | <p> |
|
32 | <p> | |
33 | <strong>${_('Change your avatar at')} <a href="http://gravatar.com">gravatar.com</a></strong><br/> |
|
33 | %if c.use_gravatar: | |
34 | ${_('Using')} ${c.user.email} |
|
34 | <strong>${_('Change your avatar at')} <a href="http://gravatar.com">gravatar.com</a></strong> | |
35 | </p> |
|
35 | <br/>${_('Using')} ${c.user.email} | |
|
36 | %else: | |||
|
37 | <br/>${c.user.email} | |||
|
38 | %endif | |||
36 | </div> |
|
39 | </div> | |
37 | </div> |
|
40 | </div> | |
38 | <div class="field"> |
|
41 | <div class="field"> |
@@ -29,8 +29,12 b'' | |||||
29 | <div class="gravatar_box"> |
|
29 | <div class="gravatar_box"> | |
30 | <div class="gravatar"><img alt="gravatar" src="${h.gravatar_url(c.user.email)}"/></div> |
|
30 | <div class="gravatar"><img alt="gravatar" src="${h.gravatar_url(c.user.email)}"/></div> | |
31 | <p> |
|
31 | <p> | |
32 | <strong>${_('Change your avatar at')} <a href="http://gravatar.com">gravatar.com</a></strong><br/> |
|
32 | %if c.use_gravatar: | |
33 | ${_('Using')} ${c.user.email} |
|
33 | <strong>${_('Change your avatar at')} <a href="http://gravatar.com">gravatar.com</a></strong> | |
|
34 | <br/>${_('Using')} ${c.user.email} | |||
|
35 | %else: | |||
|
36 | <br/>${c.user.email} | |||
|
37 | %endif | |||
34 | </p> |
|
38 | </p> | |
35 | </div> |
|
39 | </div> | |
36 | </div> |
|
40 | </div> |
General Comments 0
You need to be logged in to leave comments.
Login now