From fc747c6b992502c22bedd523963666dccefa067a Mon Sep 17 00:00:00 2001 From: Pierre-Yves Chibon Date: Jul 29 2015 15:49:33 +0000 Subject: [PATCH 1/2] Use the comment identifier for the anchor as done for the issues --- diff --git a/pagure/templates/pull_request.html b/pagure/templates/pull_request.html index d6a9abe..494584b 100644 --- a/pagure/templates/pull_request.html +++ b/pagure/templates/pull_request.html @@ -297,7 +297,7 @@ {% for comment in pull_request.discussion %} {% if not comment.commit_id %} - {{ show_comment(comment, loop.index, repo, username, + {{ show_comment(comment, comment.id, repo, username, requestid, form, repo_admin) }} {% endif %} {% endfor %} From 2c9d69940dea0cac0c10acd48698c07a2d15c924 Mon Sep 17 00:00:00 2001 From: Pierre-Yves Chibon Date: Jul 29 2015 15:49:33 +0000 Subject: [PATCH 2/2] Add the anchor to the comment using the comment identifier in inline comments --- diff --git a/pagure/ui/filters.py b/pagure/ui/filters.py index c5e3f62..d10a9a6 100644 --- a/pagure/ui/filters.py +++ b/pagure/ui/filters.py @@ -143,7 +143,13 @@ def format_loc(loc, commit=None, filename=None, prequest=None, index=None): output.append( '' '' - '' + '' '' @@ -159,6 +165,8 @@ def format_loc(loc, commit=None, filename=None, prequest=None, index=None): 'date': comment.date_created.strftime( '%b %d %Y %H:%M:%S'), 'comment': markdown_filter(comment.comment), + 'commentid': comment.id, + 'anchor': u'ΒΆ', } ) )
%(user)s' + '
' + '%(user)s ' + ' %(anchor)s ' + '
' + '
' '%(date)s%(templ_delete)s' '