diff options
Diffstat (limited to 'mediagoblin/templates')
5 files changed, 14 insertions, 13 deletions
diff --git a/mediagoblin/templates/mediagoblin/fragments/header_notifications.html b/mediagoblin/templates/mediagoblin/fragments/header_notifications.html index 68c42bf4..99c5abba 100644 --- a/mediagoblin/templates/mediagoblin/fragments/header_notifications.html +++ b/mediagoblin/templates/mediagoblin/fragments/header_notifications.html @@ -4,9 +4,9 @@ <h3>{% trans %}New comments{% endtrans %}</h3> <ul> {% for notification in notifications %} - {% set comment = notification.subject %} + {% set comment = notification.obj() %} {% set comment_author = comment.get_actor %} - {% set media = comment.get_entry %} + {% set media = comment.get_reply_to() %} <li class="comment_wrapper"> <div class="comment_author"> <img src="{{ request.staticdirect('/images/icon_comment.png') }}" /> diff --git a/mediagoblin/templates/mediagoblin/moderation/report.html b/mediagoblin/templates/mediagoblin/moderation/report.html index 584dca99..abbd4a0c 100644 --- a/mediagoblin/templates/mediagoblin/moderation/report.html +++ b/mediagoblin/templates/mediagoblin/moderation/report.html @@ -33,10 +33,11 @@ {% trans %}Return to Reports Panel{% endtrans %}</a> </div> <h2>{% trans %}Report{% endtrans %} #{{ report.id }}</h2> - {% if report.is_comment_report() and report.comment %} + {% if report.is_comment_report() and report.object_id %} {% trans %}Reported comment{% endtrans %}: - {% set comment = report.comment %} + {% set comment = report.obj() %} + {% set target = report.obj().get_reply_to() %} {% set reported_user = comment.get_actor %} <div id="comment-{{ comment.id }}" class="comment_wrapper"> @@ -50,8 +51,8 @@ <a href="{{ request.urlgen( 'mediagoblin.user_pages.media_home.view_comment', comment=comment.id, - user=comment.get_media_entry.get_actor.username, - media=comment.get_media_entry.slug_or_id) }}#comment" + user=target.get_actor.username, + media=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) -%} @@ -65,9 +66,9 @@ {% endautoescape %} </div> </div> - {% elif report.is_media_entry_report() and report.media_entry %} + {% elif report.is_media_entry_report() and report.object_id %} - {% set media_entry = report.media_entry %} + {% set media_entry = report.obj() %} <div class="three columns media_thumbnail"> <a href="{{ request.urlgen('mediagoblin.user_pages.media_home', user=media_entry.get_actor.username, diff --git a/mediagoblin/templates/mediagoblin/moderation/report_panel.html b/mediagoblin/templates/mediagoblin/moderation/report_panel.html index 39ca90f5..c82cd412 100644 --- a/mediagoblin/templates/mediagoblin/moderation/report_panel.html +++ b/mediagoblin/templates/mediagoblin/moderation/report_panel.html @@ -81,7 +81,7 @@ curr_page !=p %} </tr> {% for report in report_list %} <tr> - {% if report.discriminator == "comment_report" %} + {% if report.is_comment_report %} <td> <img src="{{ request.staticdirect( @@ -97,7 +97,7 @@ curr_page !=p %} {% endtrans %} </a> </td> - {% elif report.discriminator == "media_report" %} + {% elif report.is_media_entry_report %} <td> <img src="{{ request.staticdirect( diff --git a/mediagoblin/templates/mediagoblin/moderation/user.html b/mediagoblin/templates/mediagoblin/moderation/user.html index 594f845d..1e48bf84 100644 --- a/mediagoblin/templates/mediagoblin/moderation/user.html +++ b/mediagoblin/templates/mediagoblin/moderation/user.html @@ -125,9 +125,9 @@ </a> </td> <td> - {% if report.discriminator == "comment_report" %} + {% if report.is_comment_report() %} <a>{%- trans %}Reported Comment{% endtrans -%}</a> - {% elif report.discriminator == "media_report" %} + {% elif report.is_media_entry_report() %} <a>{%- trans %}Reported Media Entry{% endtrans -%}</a> {% endif %} </td> diff --git a/mediagoblin/templates/mediagoblin/user_pages/media.html b/mediagoblin/templates/mediagoblin/user_pages/media.html index b74ca13e..1a35414f 100644 --- a/mediagoblin/templates/mediagoblin/user_pages/media.html +++ b/mediagoblin/templates/mediagoblin/user_pages/media.html @@ -93,7 +93,7 @@ <p>{{ media.description_html }}</p> {% endautoescape %} </div> - {% if comments and request.user and request.user.has_privilege('commenter') %} + {% if request.user and request.user.has_privilege('commenter') %} <div class="media_comments"> {% if app_config['allow_comments'] %} <a |