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.
This commit is contained in:
parent
399272eea5
commit
b1d4973ca4
@ -22,37 +22,31 @@
|
|||||||
<form action="" method=POST >
|
<form action="" method=POST >
|
||||||
{% if comment is defined %}
|
{% if comment is defined %}
|
||||||
<h3>{% trans %}Reporting this Comment{% endtrans %}</h3>
|
<h3>{% trans %}Reporting this Comment{% endtrans %}</h3>
|
||||||
{%- set comment_author = comment.get_actor %}
|
{% set comment_object = comment.comment() %}
|
||||||
{%- set comment_author_url = request.urlgen(
|
{% set comment_author = comment_object.get_actor %}
|
||||||
'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) %}
|
|
||||||
<div id="comment-{{ comment.id }}"
|
<div id="comment-{{ comment.id }}"
|
||||||
class="comment_wrapper">
|
class="comment_wrapper">
|
||||||
<div class="comment_author">
|
<div class="comment_author">
|
||||||
<img
|
<img src="{{ request.staticdirect('/images/icon_comment.png') }}" />
|
||||||
src="{{ request.staticdirect('/images/icon_comment.png') }}" />
|
<a href="{{ request.urlgen('mediagoblin.user_pages.user_home',
|
||||||
<a href="{{ comment_author_url }}"
|
user=comment_author.username) }}"
|
||||||
class="comment_authorlink">
|
class="comment_authorlink">
|
||||||
{{- comment_author.username -}}
|
{{- comment_author.username -}}
|
||||||
</a>
|
</a>
|
||||||
<a href="{{ comment_url }}"
|
<a href="{{ request.urlgen('mediagoblin.user_pages.media_home.view_comment',
|
||||||
|
comment=comment.id,
|
||||||
|
user=media.get_actor.username,
|
||||||
|
media=media.slug_or_id) }}#comment"
|
||||||
class="comment_whenlink">
|
class="comment_whenlink">
|
||||||
<span
|
<span title='{{- comment_object.created.strftime("%I:%M%p %Y-%m-%d") -}}'>
|
||||||
title='{{- comment.created.strftime("%I:%M%p %Y-%m-%d") -}}'>
|
{%- trans formatted_time=timesince(comment_object.created) -%}
|
||||||
|
|
||||||
{%- trans formatted_time=timesince(comment.created) -%}
|
|
||||||
{{ formatted_time }} ago
|
{{ formatted_time }} ago
|
||||||
{%- endtrans -%}
|
{%- endtrans -%}
|
||||||
</span></a>:
|
</span></a>:
|
||||||
</div>
|
</div>
|
||||||
<div class="comment_content">
|
<div class="comment_content">
|
||||||
{% autoescape False -%}
|
{% autoescape False -%}
|
||||||
{{ comment.content_html }}
|
{{ comment_object.content_html }}
|
||||||
{%- endautoescape %}
|
{%- endautoescape %}
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
@ -693,7 +693,7 @@ def file_a_report(request, media, comment):
|
|||||||
|
|
||||||
form = user_forms.CommentReportForm(request.form)
|
form = user_forms.CommentReportForm(request.form)
|
||||||
context = {'media': comment.target(),
|
context = {'media': comment.target(),
|
||||||
'comment':comment.comment(),
|
'comment':comment,
|
||||||
'form':form}
|
'form':form}
|
||||||
else:
|
else:
|
||||||
form = user_forms.MediaReportForm(request.form)
|
form = user_forms.MediaReportForm(request.form)
|
||||||
|
Loading…
x
Reference in New Issue
Block a user