Show More
@@ -126,7 +126,7 b' class AdminUsersView(BaseAppView, DataGr' | |||
|
126 | 126 | users_data = [] |
|
127 | 127 | for user in users_list: |
|
128 | 128 | users_data.append({ |
|
129 | "username": h.gravatar_with_user(user.username), | |
|
129 | "username": h.gravatar_with_user(self.request, user.username), | |
|
130 | 130 | "email": user.email, |
|
131 | 131 | "first_name": user.first_name, |
|
132 | 132 | "last_name": user.last_name, |
@@ -923,9 +923,8 b' def person_by_id(id_, show_attr="usernam' | |||
|
923 | 923 | return id_ |
|
924 | 924 | |
|
925 | 925 | |
|
926 | def gravatar_with_user(author, show_disabled=False): | |
|
927 | from rhodecode.lib.utils import PartialRenderer | |
|
928 | _render = PartialRenderer('base/base.mako') | |
|
926 | def gravatar_with_user(request, author, show_disabled=False): | |
|
927 | _render = request.get_partial_renderer('base/base.mako') | |
|
929 | 928 | return _render('gravatar_with_user', author, show_disabled=show_disabled) |
|
930 | 929 | |
|
931 | 930 |
@@ -442,7 +442,7 b' class ScmModel(BaseModel):' | |||
|
442 | 442 | f_path = os.path.normpath(f_path) |
|
443 | 443 | return f_path |
|
444 | 444 | |
|
445 | def get_dirnode_metadata(self, commit, dir_node): | |
|
445 | def get_dirnode_metadata(self, request, commit, dir_node): | |
|
446 | 446 | if not dir_node.is_dir(): |
|
447 | 447 | return [] |
|
448 | 448 | |
@@ -463,7 +463,8 b' class ScmModel(BaseModel):' | |||
|
463 | 463 | 'short_id': last_commit.short_id, |
|
464 | 464 | 'message': h.escape(last_commit.message), |
|
465 | 465 | 'author': h.escape(last_commit.author), |
|
466 |
'user_profile': h.gravatar_with_user( |
|
|
466 | 'user_profile': h.gravatar_with_user( | |
|
467 | request, last_commit.author), | |
|
467 | 468 | }) |
|
468 | 469 | |
|
469 | 470 | return data |
@@ -18,7 +18,7 b'' | |||
|
18 | 18 | <td class="cb-annotate-info tooltip" |
|
19 | 19 | title="Author: ${tooltip(annotation.author) | entity}<br>Date: ${annotation.date}<br>Message: ${annotation.message | entity}" |
|
20 | 20 | > |
|
21 | ${h.gravatar_with_user(annotation.author, 16) | n} | |
|
21 | ${h.gravatar_with_user(request, annotation.author, 16) | n} | |
|
22 | 22 | <div class="cb-annotate-message truncate-wrap">${h.chop_at_smart(annotation.message, '\n', suffix_if_chopped='...')}</div> |
|
23 | 23 | </td> |
|
24 | 24 | <td class="cb-annotate-message-spacer"> |
@@ -65,7 +65,7 b'' | |||
|
65 | 65 | </td> |
|
66 | 66 | <td class="td-user" data-attr-name="author"> |
|
67 | 67 | % if c.full_load: |
|
68 | <span data-author="${node.last_commit.author}" title="${h.tooltip(node.last_commit.author)}">${h.gravatar_with_user(node.last_commit.author)|n}</span> | |
|
68 | <span data-author="${node.last_commit.author}" title="${h.tooltip(node.last_commit.author)}">${h.gravatar_with_user(request, node.last_commit.author)|n}</span> | |
|
69 | 69 | % endif |
|
70 | 70 | </td> |
|
71 | 71 | %else: |
General Comments 0
You need to be logged in to leave comments.
Login now