diff --git a/pagure/lib/__init__.py b/pagure/lib/__init__.py index 29d1841..1bfda0a 100644 --- a/pagure/lib/__init__.py +++ b/pagure/lib/__init__.py @@ -1238,6 +1238,7 @@ def add_pull_request_comment(session, request, commit, tree_id, filename, 'comment_added': comment_text, 'comment_user': pr_comment.user.user, 'comment_id': pr_comment.id, + 'project': request.project.fullname, 'avatar_url': avatar_url_from_email( pr_comment.user.default_email, size=16), 'comment_date': pr_comment.date_created.strftime( diff --git a/pagure/static/request_ev.js b/pagure/static/request_ev.js index 66d36ba..58219c5 100644 --- a/pagure/static/request_ev.js +++ b/pagure/static/request_ev.js @@ -2,7 +2,7 @@ add_comment = function(data, username) { console.log('Adding comment ' + data.comment_added); var field = $('#comments'); var edit_btn = ' \ \ @@ -61,41 +61,46 @@ add_comment = function(data, username) { \ '; } else { - var _data = '
\ -
\ - \ - ' + data.comment_user + '\ - \ - \ - seconds ago \ - \ -
\ -
\ -
\ -
\ - \ - ' - + emojione.toImage(data.comment_added) + '\ -
\ -
\ -
\ -
\ -
\ - \ - \ - '; - if ( data.comment_user == username) { - _data += edit_btn + - ''; - } - _data += '
\ -
\ -
'; + var _csrf = $('#csrf_token').clone(); + var _data = '
\ +
\ + \ +
\ +
\ +
\ + \ + ' + + emojione.toImage(data.comment_added) + '\ +
\ +
\ +
\ +
\ +
\ + \ + \ + '; + if ( data.comment_user == username) { + _data += edit_btn + + ''; + } + _data += '
\ +
\ +
\ + \ + '; } if (inline){