gravatar: add flag to show current gravatar + user as disabled user (non-active)

This commit is contained in:
Marcin Kuzminski 2016-06-18 02:27:01 +02:00
parent 0276305290
commit 3a55b9c4e1
2 changed files with 4 additions and 4 deletions

View file

@ -827,10 +827,10 @@ def person_by_id(id_, show_attr="username_and_name"):
return id_
def gravatar_with_user(author):
def gravatar_with_user(author, show_disabled=False):
from rhodecode.lib.utils import PartialRenderer
_render = PartialRenderer('base/base.html')
return _render('gravatar_with_user', author)
return _render('gravatar_with_user', author, show_disabled=show_disabled)
def desc_stylize(value):

View file

@ -134,10 +134,10 @@
</%def>
<%def name="gravatar_with_user(contact, size=16)">
<%def name="gravatar_with_user(contact, size=16, show_disabled=False)">
<div class="rc-user tooltip" title="${contact}">
${self.gravatar(h.email_or_none(contact), size)}
<span class="user"> ${h.link_to_user(contact)}</span>
<span class="${'user user-disabled' if show_disabled else 'user'}"> ${h.link_to_user(contact)}</span>
</div>
</%def>