# HG changeset patch # User Marcin Kuzminski # Date 2016-06-18 00:27:01 # Node ID 56e0b1a85c835892e03833fd8ec20fc732e89f21 # Parent c6ddf19a654d1e89d339479b970f4b734e5c7d26 gravatar: add flag to show current gravatar + user as disabled user (non-active) diff --git a/rhodecode/lib/helpers.py b/rhodecode/lib/helpers.py --- a/rhodecode/lib/helpers.py +++ b/rhodecode/lib/helpers.py @@ -827,10 +827,10 @@ def person_by_id(id_, show_attr="usernam 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): diff --git a/rhodecode/templates/base/base.html b/rhodecode/templates/base/base.html --- a/rhodecode/templates/base/base.html +++ b/rhodecode/templates/base/base.html @@ -134,10 +134,10 @@ -<%def name="gravatar_with_user(contact, size=16)"> +<%def name="gravatar_with_user(contact, size=16, show_disabled=False)">
${self.gravatar(h.email_or_none(contact), size)} - ${h.link_to_user(contact)} + ${h.link_to_user(contact)}