##// END OF EJS Templates
files: fixed case of partial url in generating files metadata
marcink -
r3716:67fe05b8 new-ui
parent child Browse files
Show More
@@ -272,6 +272,18 b' def files_breadcrumbs(repo_name, commit_'
272 return literal(' / '.join(url_segments) + icon)
272 return literal(' / '.join(url_segments) + icon)
273
273
274
274
275 def files_url_data(request):
276 matchdict = request.matchdict
277
278 if 'f_path' not in matchdict:
279 matchdict['f_path'] = ''
280
281 if 'commit_id' not in matchdict:
282 matchdict['commit_id'] = 'tip'
283
284 return json.dumps(matchdict)
285
286
275 def code_highlight(code, lexer, formatter, use_hl_filter=False):
287 def code_highlight(code, lexer, formatter, use_hl_filter=False):
276 """
288 """
277 Lex ``code`` with ``lexer`` and format it with the formatter ``formatter``.
289 Lex ``code`` with ``lexer`` and format it with the formatter ``formatter``.
@@ -35,7 +35,7 b''
35 metadataRequest = null;
35 metadataRequest = null;
36
36
37 // global metadata about URL
37 // global metadata about URL
38 filesUrlData = ${h.json.dumps(request.matchdict)|n};
38 filesUrlData = ${h.files_url_data(request)|n};
39 </script>
39 </script>
40
40
41 <div>
41 <div>
General Comments 0
You need to be logged in to leave comments. Login now