From c72242aeb49bb2bf291d7486c45931b6f3cd325d Mon Sep 17 00:00:00 2001 From: Pierre-Yves Chibon Date: Feb 22 2016 15:38:40 +0000 Subject: Specify the tree identifier when building the table of code --- diff --git a/pagure/ui/filters.py b/pagure/ui/filters.py index f64cfb6..418f653 100644 --- a/pagure/ui/filters.py +++ b/pagure/ui/filters.py @@ -52,7 +52,8 @@ def format_ts(string): @APP.template_filter('format_loc') -def format_loc(loc, commit=None, filename=None, prequest=None, index=None): +def format_loc(loc, commit=None, filename=None, tree=None, prequest=None, + index=None): """ Template filter putting the provided lines of code into a table """ if loc is None: @@ -88,7 +89,8 @@ def format_loc(loc, commit=None, filename=None, prequest=None, index=None): '' '' '' + ' data-filename="%(filename)s" data-commit="%(commit)s"' + ' data-tree="%(tree)s">' '

' '' '

' @@ -99,6 +101,7 @@ def format_loc(loc, commit=None, filename=None, prequest=None, index=None): 'img': flask.url_for('static', filename='users.png'), 'filename': filename, 'commit': commit, + 'tree': tree, } ) )