From: Andrew Browning Date: Wed, 2 Mar 2016 18:37:36 +0000 (-0500) Subject: Fix comment ID links on media comment report page X-Git-Url: https://vcs.fsf.org/?a=commitdiff_plain;h=b1d4973ca4f2d14ea2b17cec269ebd056da2da71;p=mediagoblin.git Fix comment ID links on media comment report page Change the comment ID behaviour and source of user_pages/report.html to match user_pages/media.html as of #5376. --- diff --git a/mediagoblin/templates/mediagoblin/user_pages/report.html b/mediagoblin/templates/mediagoblin/user_pages/report.html index 09502fcf..4a88f4b7 100644 --- a/mediagoblin/templates/mediagoblin/user_pages/report.html +++ b/mediagoblin/templates/mediagoblin/user_pages/report.html @@ -22,37 +22,31 @@
{% if comment is defined %}

{% trans %}Reporting this Comment{% endtrans %}

- {%- set comment_author = comment.get_actor %} - {%- set comment_author_url = request.urlgen( - 'mediagoblin.user_pages.user_home', - user=comment_author.username) %} - {%- set comment_url = request.urlgen( - 'mediagoblin.user_pages.media_home.view_comment', - comment=comment.id, - user=media.get_actor.username, - media=media.slug_or_id) %} + {% set comment_object = comment.comment() %} + {% set comment_author = comment_object.get_actor %} diff --git a/mediagoblin/user_pages/views.py b/mediagoblin/user_pages/views.py index ad03e011..6949aaf6 100644 --- a/mediagoblin/user_pages/views.py +++ b/mediagoblin/user_pages/views.py @@ -693,7 +693,7 @@ def file_a_report(request, media, comment): form = user_forms.CommentReportForm(request.form) context = {'media': comment.target(), - 'comment':comment.comment(), + 'comment':comment, 'form':form} else: form = user_forms.MediaReportForm(request.form)