diff options
author | Jessica Tallon <tsyesika@tsyesika.se> | 2016-02-29 12:03:41 +0000 |
---|---|---|
committer | Jessica Tallon <tsyesika@tsyesika.se> | 2016-02-29 12:33:51 +0000 |
commit | 6efcab2d69c5745c2ea9616302a08e38a5af3de6 (patch) | |
tree | 4844f7d68854db032ef9c2588adf819de3a291d8 /mediagoblin/templates | |
parent | 6d38b1858c73cd7154c9fdabdc17594a820d311b (diff) | |
download | mediagoblin-6efcab2d69c5745c2ea9616302a08e38a5af3de6.tar.lz mediagoblin-6efcab2d69c5745c2ea9616302a08e38a5af3de6.tar.xz mediagoblin-6efcab2d69c5745c2ea9616302a08e38a5af3de6.zip |
Change Notification.object_id to be ID of Comemnt not TextComment
This shouldn't really effect much but it is a needed change for the future
this changes the Notification.object_id to be the ID of the Comment (the link
table to the comment object) rather than TextComment (the comment object itself).
This is needed as now comments can be other things, other than TextComment.
Diffstat (limited to 'mediagoblin/templates')
-rw-r--r-- | mediagoblin/templates/mediagoblin/fragments/header_notifications.html | 19 |
1 files changed, 10 insertions, 9 deletions
diff --git a/mediagoblin/templates/mediagoblin/fragments/header_notifications.html b/mediagoblin/templates/mediagoblin/fragments/header_notifications.html index 99c5abba..58960e7a 100644 --- a/mediagoblin/templates/mediagoblin/fragments/header_notifications.html +++ b/mediagoblin/templates/mediagoblin/fragments/header_notifications.html @@ -4,9 +4,10 @@ <h3>{% trans %}New comments{% endtrans %}</h3> <ul> {% for notification in notifications %} - {% set comment = notification.obj() %} - {% set comment_author = comment.get_actor %} - {% set media = comment.get_reply_to() %} + {% set comment_wrapper = notification.obj() %} + {% set comment_object = comment_wrapper.comment() %} + {% set comment_author = comment_object.get_actor %} + {% set comment_target = comment_wrapper.target() %} <li class="comment_wrapper"> <div class="comment_author"> <img src="{{ request.staticdirect('/images/icon_comment.png') }}" /> @@ -16,12 +17,12 @@ {{- comment_author.username -}} </a> <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" + comment=comment_wrapper.id, + user=comment_target.get_actor.username, + media=comment_target.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> @@ -29,7 +30,7 @@ </div> <div class="comment_content"> {% autoescape False -%} - {{ comment.content_html }} + {{ comment_object.content_html }} {%- endautoescape %} </div> |