##// END OF EJS Templates
partial-renderer: use package resource format for templates....
marcink -
r2313:d272914f default
parent child Browse files
Show More
@@ -87,7 +87,7 b' class AdminUserGroupsView(BaseAppView, D'
87 87 self.request, column_map=column_map)
88 88
89 89 _render = self.request.get_partial_renderer(
90 'data_table/_dt_elements.mako')
90 'rhodecode:templates/data_table/_dt_elements.mako')
91 91
92 92 def user_group_name(user_group_id, user_group_name):
93 93 return _render("user_group_name", user_group_id, user_group_name)
@@ -91,7 +91,7 b' class AdminUsersView(BaseAppView, DataGr'
91 91 self.request, column_map=column_map)
92 92
93 93 _render = self.request.get_partial_renderer(
94 'data_table/_dt_elements.mako')
94 'rhodecode:templates/data_table/_dt_elements.mako')
95 95
96 96 def user_actions(user_id, username):
97 97 return _render("user_actions", user_id, username)
@@ -114,7 +114,7 b' class GistView(BaseAppView):'
114 114 c.active = 'public'
115 115
116 116 _render = self.request.get_partial_renderer(
117 'data_table/_dt_elements.mako')
117 'rhodecode:templates/data_table/_dt_elements.mako')
118 118
119 119 data = []
120 120
@@ -492,7 +492,7 b' class MyAccountView(BaseAppView, DataGri'
492 492 draw, start, limit = self._extract_chunk(self.request)
493 493 search_q, order_by, order_dir = self._extract_ordering(self.request)
494 494 _render = self.request.get_partial_renderer(
495 'data_table/_dt_elements.mako')
495 'rhodecode:templates/data_table/_dt_elements.mako')
496 496
497 497 pull_requests = PullRequestModel().get_im_participating_in(
498 498 user_id=self._rhodecode_user.user_id,
@@ -88,7 +88,7 b' class RepoFeedView(RepoAppView):'
88 88
89 89 def _get_description(self, commit):
90 90 _renderer = self.request.get_partial_renderer(
91 'feed/atom_feed_entry.mako')
91 'rhodecode:templates/feed/atom_feed_entry.mako')
92 92 parsed_diff, limited_diff = self._changes(commit)
93 93 return _renderer(
94 94 'body',
@@ -69,7 +69,7 b' class RepoPullRequestsView(RepoAppView, '
69 69 draw, start, limit = self._extract_chunk(self.request)
70 70 search_q, order_by, order_dir = self._extract_ordering(self.request)
71 71 _render = self.request.get_partial_renderer(
72 'data_table/_dt_elements.mako')
72 'rhodecode:templates/data_table/_dt_elements.mako')
73 73
74 74 # pagination
75 75
@@ -940,7 +940,8 b' def person_by_id(id_, show_attr="usernam'
940 940
941 941
942 942 def gravatar_with_user(request, author, show_disabled=False):
943 _render = request.get_partial_renderer('base/base.mako')
943 _render = request.get_partial_renderer(
944 'rhodecode:templates/base/base.mako')
944 945 return _render('gravatar_with_user', author, show_disabled=show_disabled)
945 946
946 947
@@ -36,7 +36,8 b' class PyramidPartialRenderer(object):'
36 36 Partial renderer used to render chunks of html used in datagrids
37 37 use like::
38 38
39 _renderer = request.get_partial_renderer('_dt/template_base.mako')
39 _renderer = request.get_partial_renderer(
40 'rhodecode:templates/_dt/template_base.mako')
40 41 _render('quick_menu', args, kwargs)
41 42
42 43 :param tmpl_name: template path relate to /templates/ dir
@@ -301,15 +301,24 b' class EmailNotificationModel(BaseModel):'
301 301 TYPE_TEST = 'test'
302 302
303 303 email_types = {
304 TYPE_MAIN: 'email_templates/main.mako',
305 TYPE_TEST: 'email_templates/test.mako',
306 TYPE_EMAIL_TEST: 'email_templates/email_test.mako',
307 TYPE_REGISTRATION: 'email_templates/user_registration.mako',
308 TYPE_PASSWORD_RESET: 'email_templates/password_reset.mako',
309 TYPE_PASSWORD_RESET_CONFIRMATION: 'email_templates/password_reset_confirmation.mako',
310 TYPE_COMMIT_COMMENT: 'email_templates/commit_comment.mako',
311 TYPE_PULL_REQUEST: 'email_templates/pull_request_review.mako',
312 TYPE_PULL_REQUEST_COMMENT: 'email_templates/pull_request_comment.mako',
304 TYPE_MAIN:
305 'rhodecode:templates/email_templates/main.mako',
306 TYPE_TEST:
307 'rhodecode:templates/email_templates/test.mako',
308 TYPE_EMAIL_TEST:
309 'rhodecode:templates/email_templates/email_test.mako',
310 TYPE_REGISTRATION:
311 'rhodecode:templates/email_templates/user_registration.mako',
312 TYPE_PASSWORD_RESET:
313 'rhodecode:templates/email_templates/password_reset.mako',
314 TYPE_PASSWORD_RESET_CONFIRMATION:
315 'rhodecode:templates/email_templates/password_reset_confirmation.mako',
316 TYPE_COMMIT_COMMENT:
317 'rhodecode:templates/email_templates/commit_comment.mako',
318 TYPE_PULL_REQUEST:
319 'rhodecode:templates/email_templates/pull_request_review.mako',
320 TYPE_PULL_REQUEST_COMMENT:
321 'rhodecode:templates/email_templates/pull_request_comment.mako',
313 322 }
314 323
315 324 def __init__(self):
@@ -204,7 +204,7 b' class RepoModel(BaseModel):'
204 204 def get_repos_as_dict(self, repo_list=None, admin=False,
205 205 super_user_actions=False):
206 206 _render = get_current_request().get_partial_renderer(
207 'data_table/_dt_elements.mako')
207 'rhodecode:templates/data_table/_dt_elements.mako')
208 208 c = _render.get_call_context()
209 209
210 210 def quick_menu(repo_name):
@@ -680,7 +680,7 b' class RepoGroupModel(BaseModel):'
680 680
681 681 from pyramid.threadlocal import get_current_request
682 682 _render = get_current_request().get_partial_renderer(
683 'data_table/_dt_elements.mako')
683 'rhodecode:templates/data_table/_dt_elements.mako')
684 684 c = _render.get_call_context()
685 685 h = _render.get_helpers()
686 686
General Comments 0
You need to be logged in to leave comments. Login now