Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update front.html.twig Add border to non federated notifications for admins and moderators #1297

Open
wants to merge 3 commits into
base: main
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
17 changes: 15 additions & 2 deletions templates/notifications/front.html.twig
Original file line number Diff line number Diff line change
Expand Up @@ -42,11 +42,24 @@
</button>
</div>
</div>

</div>

{% for notification in notifications %}
<div class="{{ html_classes('section section--small notification', {'opacity-50': notification.status is not same as 'new' }) }}">
<div class="{{ html_classes('section section--small notification', {'opacity-50': notification.status is not same as 'new' }) }}"
{% if not notification.entry.magazine.apId and not notification.post.magazine.apId and (app.user.admin or app.user.moderator) %}
style="border-color:var(--kbin-upvoted-color);"
{% set titleString = 'notification_created_on_this_instance'|trans %}
{% if notification.comment.user is not same as null %}
{% set titleString = titleString ~ notification.comment.user.username %}
{% elseif notification.entry.user is not same as null %}
{% set titleString = titleString ~ notification.entry.user.username %}
{% elseif notification.post.user is not same as null %}
{% set titleString = titleString ~ notification.post.user.username %}
{% elseif notification.message.sender is not same as null %}
{% set titleString = titleString ~ notification.message.sender.username %}
{% endif %}
title="{{ titleString }}"
{% endif %}>
<div>
{%- with {
notification: notification,
Expand Down
Loading