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