diff --git a/templates/notifications/_blocks.html.twig b/templates/notifications/_blocks.html.twig index 4e9a157e4..d36861d69 100644 --- a/templates/notifications/_blocks.html.twig +++ b/templates/notifications/_blocks.html.twig @@ -1,106 +1,152 @@ {% block entry_created_notification %} - {{ component('user_inline', {user: notification.entry.user}) }} {{ 'added_new_thread'|trans|lower }} - {{ notification.entry.shortTitle }} + {% if not notification.entry.magazine.apId and (app.user.admin or notification.entry.magazine.userIsModerator(app.user)) %} + style="border-color:var(--kbin-upvoted-color);" + {% set titleString = 'notification_created_on_this_instance'|trans %} + {% set titleString = titleString ~ notification.entry.user.username %} + title="{{ titleString }}" + {% endif %}>
+ {{ component('user_inline', {user: notification.entry.user}) }} {{ 'added_new_thread'|trans|lower }} - {{ notification.entry.shortTitle ~ modString }} {% endblock entry_created_notification %} {% block entry_edited_notification %} + >
{{ component('user_inline', {user: notification.entry.user}) }} {{ 'edited_thread'|trans|lower }} - {{ notification.entry.shortTitle }} {% endblock entry_edited_notification %} {% block entry_deleted_notification %} + >
{{ notification.entry.shortTitle }} {% if notification.entry.isTrashed %}{{ 'removed'|trans|lower }}{% else %}{{ 'deleted'|trans|lower }}{% endif %} {% endblock entry_deleted_notification %} {% block entry_mentioned_notification %} + >
{{ component('user_inline', {user: notification.entry.user}) }} {{ 'mentioned_you'|trans|lower }} - {{ notification.entry.shortTitle }} {% endblock entry_mentioned_notification %} {% block entry_comment_created_notification %} + {% if not notification.comment.magazine.apId and (app.user.admin or notification.comment.magazine.userIsModerator(app.user)) %} + style="border-color:var(--kbin-upvoted-color);" + {% set titleString = 'notification_created_on_this_instance'|trans %} + {% set titleString = titleString ~ notification.comment.user.username %} + title="{{ titleString }}" + {% endif %}>
{{ component('user_inline', {user: notification.comment.user}) }} {{ 'added_new_comment'|trans|lower }} - {{ notification.comment.shortTitle }} {% endblock entry_comment_created_notification %} {% block entry_comment_edited_notification %} + >
{{ component('user_inline', {user: notification.comment.user}) }} {{ 'edited_comment'|trans|lower }} - {{ notification.comment.shortTitle }} {% endblock entry_comment_edited_notification %} {% block entry_comment_reply_notification %} + >
{{ component('user_inline', {user: notification.comment.user}) }} {{ 'replied_to_your_comment'|trans|lower }} - {{ notification.comment.shortTitle }} {% endblock entry_comment_reply_notification %} {% block entry_comment_deleted_notification %} + >
{{ 'comment'|trans }} {{ notification.comment.shortTitle }} - {% if notification.comment.isTrashed %}{{ 'removed'|trans|lower }}{% else %}{{ 'deleted'|trans|lower }}{% endif %} {% endblock entry_comment_deleted_notification %} {% block entry_comment_mentioned_notification %} + >
{{ component('user_inline', {user: notification.comment.user}) }} {{ 'mentioned_you'|trans|lower }} - {{ notification.comment.shortTitle }} {% endblock entry_comment_mentioned_notification %} {% block post_created_notification %} + {% if not notification.post.magazine.apId and (app.user.admin or notification.post.magazine.userIsModerator(app.user)) %} + style="border-color:var(--kbin-upvoted-color);" + {% set titleString = 'notification_created_on_this_instance'|trans %} + {% set titleString = titleString ~ notification.post.user.username %} + title="{{ titleString }}" + {% endif %}>
{{ component('user_inline', {user: notification.post.user}) }} {{ 'added_new_post'|trans|lower }} - {{ notification.post.shortTitle }} {% endblock post_created_notification %} {% block post_edited_notification %} + >
{{ component('user_inline', {user: notification.post.user}) }} {{ 'edit_post'|trans|lower }} - {{ notification.post.shortTitle }} {% endblock post_edited_notification %} {% block post_deleted_notification %} + >
{{ 'post'|trans }} {{ notification.post.shortTitle }} - {% if notification.comment.isTrashed %}{{ 'removed'|trans|lower }}{% else %}{{ 'deleted'|trans|lower }}{% endif %} {% endblock post_deleted_notification %} {% block post_mentioned_notification %} + >
{{ component('user_inline', {user: notification.post.user}) }} {{ 'mentioned_you'|trans|lower }} - {{ notification.post.shortTitle }} {% endblock post_mentioned_notification %} {% block post_comment_created_notification %} + {% if not notification.comment.magazine.apId and (app.user.admin or notification.comment.magazine.userIsModerator(app.user)) %} + style="border-color:var(--kbin-upvoted-color);" + {% set titleString = 'notification_created_on_this_instance'|trans %} + {% set titleString = titleString ~ notification.comment.user.username %} + title="{{ titleString }}" + {% endif %}>
{{ component('user_inline', {user: notification.comment.user}) }} {{ 'added_new_comment'|trans|lower }} - {{ notification.comment.shortTitle }} {% endblock post_comment_created_notification %} {% block post_comment_edited_notification %} + >
{{ component('user_inline', {user: notification.comment.user}) }} {{ 'edited_comment'|trans|lower }} - {{ notification.comment.shortTitle }} {% endblock post_comment_edited_notification %} {% block post_comment_reply_notification %} + >
{{ component('user_inline', {user: notification.comment.user}) }} {{ 'replied_to_your_comment'|trans|lower }} - {{ notification.comment.shortTitle }} {% endblock post_comment_reply_notification %} {% block post_comment_deleted_notification %} + >
{{ 'comment'|trans }} {{ notification.comment.shortTitle }} - {% if notification.comment.isTrashed %}{{ 'removed'|trans|lower }}{% else %}{{ 'deleted'|trans|lower }}{% endif %} {% endblock post_comment_deleted_notification %} {% block post_comment_mentioned_notification %} + >
{{ component('user_inline', {user: notification.comment.user}) }} {{ 'mentioned_you'|trans|lower }} - {{ notification.comment.shortTitle }} {% endblock post_comment_mentioned_notification %} {% block message_notification %} - {{ component('user_inline', {user: notification.message.sender}) }} {{ 'wrote_message'|trans|lower }}
+ {{ component('user_inline', {user: notification.message.sender}) }} ✉ {{ 'wrote_message'|trans|lower }} {{ notification.message.title }} {% endblock message_notification %} {% block magazine_ban_notification %} + >
{{ component('user_inline', {user: notification.ban.bannedBy}) }} {{ 'banned'|trans|lower }}. {{ 'ban_expired'|trans }} {{ component('date', {date: notification.ban.expiredAt}) }}. {{ notification.ban.reason }} {% endblock magazine_ban_notification %} {% block reportlink %} + >
{% if notification.report.entry is defined and notification.report.entry is not same as null %} {% set entry = notification.report.entry %} @@ -125,6 +171,7 @@ {% endblock %} {% block report_created_notification %} + >
{{ component('user_inline', {user: notification.report.reporting}) }} {{ 'reported'|trans|lower }} {{ component('user_inline', {user: notification.report.reported}) }}
{{ 'report_subject'|trans }}: {{ block('reportlink') }}
{% if app.user.admin or app.user.moderator or notification.report.magazine.userIsModerator(app.user) %} @@ -133,6 +180,7 @@ {% endblock report_created_notification %} {% block report_rejected_notification %} + >
{{ 'own_report_rejected'|trans }}
{{ 'reported_user'|trans }}: {{ component('user_inline', {user: notification.report.reported}) }}
{{ 'report_subject'|trans }}: {{ block('reportlink') }}
@@ -142,6 +190,7 @@ {% endblock report_rejected_notification %} {% block report_approved_notification %} + >
{% if notification.report.reporting.id is same as app.user.id %} {{ 'own_report_accepted'|trans }}
{% elseif notification.report.reported.id is same as app.user.id %} diff --git a/templates/notifications/front.html.twig b/templates/notifications/front.html.twig index 6612eee1a..36200c730 100644 --- a/templates/notifications/front.html.twig +++ b/templates/notifications/front.html.twig @@ -42,20 +42,18 @@
-
{% for notification in notifications %} -
-
- {%- with { - notification: notification, - showMagazine: false, - } only -%} - {{ block(notification.type) }} - {%- endwith -%} -
- {{ component('date', {date: notification.createdAt}) }} +
+ {{ component('date', {date: notification.createdAt}) }}
{% endfor %} {% if(notifications.haveToPaginate is defined and notifications.haveToPaginate) %}