Show More
@@ -167,6 +167,14 b' var pyroutes = (function() {' | |||||
167 | return sprintf.apply(null, argv); |
|
167 | return sprintf.apply(null, argv); | |
168 | }; |
|
168 | }; | |
169 | return { |
|
169 | return { | |
|
170 | 'asset': function(path, ver) { | |||
|
171 | var asset_url = ASSET_URL || '/_static/'; | |||
|
172 | var ret = asset_url + path; | |||
|
173 | if (ver !== undefined) { | |||
|
174 | ret += '?ver=' + ver; | |||
|
175 | } | |||
|
176 | return ret; | |||
|
177 | }, | |||
170 | 'url': function(route_name, params) { |
|
178 | 'url': function(route_name, params) { | |
171 | var result = route_name; |
|
179 | var result = route_name; | |
172 | if (typeof(params) !== 'object'){ |
|
180 | if (typeof(params) !== 'object'){ |
@@ -56,6 +56,7 b" c.template_context['visual']['default_re" | |||||
56 | var REPO_TYPE = ''; |
|
56 | var REPO_TYPE = ''; | |
57 | %endif |
|
57 | %endif | |
58 | var APPLICATION_URL = "${h.url('home').rstrip('/')}"; |
|
58 | var APPLICATION_URL = "${h.url('home').rstrip('/')}"; | |
|
59 | var ASSET_URL = "${h.asset('')}"; | |||
59 | var DEFAULT_RENDERER = "${h.get_visual_attr(c, 'default_renderer')}"; |
|
60 | var DEFAULT_RENDERER = "${h.get_visual_attr(c, 'default_renderer')}"; | |
60 | var CSRF_TOKEN = "${getattr(c, 'csrf_token', '')}"; |
|
61 | var CSRF_TOKEN = "${getattr(c, 'csrf_token', '')}"; | |
61 | % if getattr(c, 'rhodecode_user', None): |
|
62 | % if getattr(c, 'rhodecode_user', None): |
General Comments 0
You need to be logged in to leave comments.
Login now