aboutsummaryrefslogtreecommitdiffstats
path: root/mediagoblin/templates
diff options
context:
space:
mode:
authorJessica Tallon <tsyesika@tsyesika.se>2016-03-01 11:58:38 +0000
committerJessica Tallon <tsyesika@tsyesika.se>2016-03-01 12:04:08 +0000
commit161bc6b2c18f2d20eb759725b2df7fc7ac4a2728 (patch)
tree7e10e43dcc6fcd85e8f9e366f2e10dd0152745bc /mediagoblin/templates
parent1db8690fe9dc625bc648e04493d075cad76689cc (diff)
downloadmediagoblin-161bc6b2c18f2d20eb759725b2df7fc7ac4a2728.tar.lz
mediagoblin-161bc6b2c18f2d20eb759725b2df7fc7ac4a2728.tar.xz
mediagoblin-161bc6b2c18f2d20eb759725b2df7fc7ac4a2728.zip
Fix #5376 - Ensure links have correct ID
This ensures that links to comments have the correct ID (the ID of the Comment object) as well as fixing deletion on reports and fixing a few other little things. I hope this fixes the #5376 issue, though cannot reproduce so unable to confirm.
Diffstat (limited to 'mediagoblin/templates')
-rw-r--r--mediagoblin/templates/mediagoblin/user_pages/media.html11
1 files changed, 6 insertions, 5 deletions
diff --git a/mediagoblin/templates/mediagoblin/user_pages/media.html b/mediagoblin/templates/mediagoblin/user_pages/media.html
index 1a35414f..48a91ab7 100644
--- a/mediagoblin/templates/mediagoblin/user_pages/media.html
+++ b/mediagoblin/templates/mediagoblin/user_pages/media.html
@@ -123,7 +123,8 @@
{% endif %}
<ul style="list-style:none">
{% for comment in comments %}
- {% set comment_author = comment.get_actor %}
+ {% set comment_object = comment.comment() %}
+ {% set comment_author = comment_object.get_actor %}
<li id="comment-{{ comment.id }}"
{%- if pagination.active_id == comment.id %}
class="comment_wrapper comment_active">
@@ -143,15 +144,15 @@
user=media.get_actor.username,
media=media.slug_or_id) }}#comment"
class="comment_whenlink">
- <span title='{{- comment.created.strftime("%I:%M%p %Y-%m-%d") -}}'>
- {%- trans formatted_time=timesince(comment.created) -%}
+ <span title='{{- comment_object.created.strftime("%I:%M%p %Y-%m-%d") -}}'>
+ {%- trans formatted_time=timesince(comment_object.created) -%}
{{ formatted_time }} ago
{%- endtrans -%}
</span></a>:
</div>
<div class="comment_content">
{% autoescape False -%}
- {{ comment.content_html }}
+ {{ comment_object.content_html }}
{%- endautoescape %}
</div>
<div>
@@ -159,7 +160,7 @@
<a href="{{ request.urlgen('mediagoblin.user_pages.media_home.report_comment',
user=media.get_actor.username,
media=media.slug_or_id,
- comment=comment.id) }}">
+ comment=comment_object.id) }}">
{% trans %}Report{% endtrans %}</a>
{% endif %}
</div>