2022-01-18 20:28:59 +00:00
|
|
|
{% load notification_page_tags %}
|
2022-07-05 19:49:02 +00:00
|
|
|
{% load humanize %}
|
2021-10-02 14:58:20 +00:00
|
|
|
{% related_status notification as related_status %}
|
2022-07-05 04:32:53 +00:00
|
|
|
|
2022-07-12 17:32:56 +00:00
|
|
|
{% get_related_users notification as related_users %}
|
2022-07-05 21:25:42 +00:00
|
|
|
{% with related_user_count=notification.related_users.count %}
|
2022-01-11 19:04:56 +00:00
|
|
|
<div class="notification {% if notification.id in unread %}has-background-primary{% endif %}">
|
2022-04-09 07:06:10 +00:00
|
|
|
<div class="columns is-mobile {% if notification.id in unread %}has-text-white{% else %}has-text-more-muted{% endif %}">
|
2022-01-11 19:04:56 +00:00
|
|
|
<div class="column is-narrow is-size-3">
|
|
|
|
<a class="icon" href="{% block primary_link %}{% endblock %}">
|
2021-12-31 03:48:47 +00:00
|
|
|
{% block icon %}{% endblock %}
|
|
|
|
</a>
|
2021-10-02 14:58:20 +00:00
|
|
|
</div>
|
2021-12-31 03:48:47 +00:00
|
|
|
|
2021-10-02 14:58:20 +00:00
|
|
|
<div class="column is-clipped">
|
2022-07-05 21:25:42 +00:00
|
|
|
{% if related_user_count > 1 %}
|
2022-07-05 04:32:53 +00:00
|
|
|
<div class="block">
|
|
|
|
<ul class="is-flex">
|
2022-07-12 17:32:56 +00:00
|
|
|
{% for user in related_users %}
|
2022-07-05 04:32:53 +00:00
|
|
|
<li class="mr-2">
|
|
|
|
<a href="{{ user.local_path }}">
|
|
|
|
{% include 'snippets/avatar.html' with user=user %}
|
|
|
|
</a>
|
|
|
|
</li>
|
|
|
|
{% endfor %}
|
|
|
|
</ul>
|
|
|
|
</div>
|
|
|
|
{% endif %}
|
2021-12-31 03:48:47 +00:00
|
|
|
<div class="block content">
|
2022-07-07 02:16:14 +00:00
|
|
|
{% if related_user_count == 1 %}
|
2022-07-12 17:32:56 +00:00
|
|
|
{% with user=related_users.0 %}
|
2022-07-07 02:16:14 +00:00
|
|
|
{% spaceless %}
|
|
|
|
<a href="{{ user.local_path }}" class="mr-2">
|
|
|
|
{% include 'snippets/avatar.html' with user=user %}
|
|
|
|
</a>
|
|
|
|
{% endspaceless %}
|
2022-07-05 21:25:42 +00:00
|
|
|
{% endwith %}
|
2022-07-07 02:16:14 +00:00
|
|
|
{% endif %}
|
|
|
|
|
2022-07-12 17:32:56 +00:00
|
|
|
{% with related_user=related_users.0.display_name %}
|
|
|
|
{% with related_user_link=related_users.0.local_path %}
|
2023-09-18 11:21:04 +00:00
|
|
|
{% with related_user_moved_to=related_users.0.moved_to %}
|
|
|
|
{% with related_user_username=related_users.0.username %}
|
2022-07-07 02:16:14 +00:00
|
|
|
{% with second_user=related_users.1.display_name %}
|
|
|
|
{% with second_user_link=related_users.1.local_path %}
|
|
|
|
{% with other_user_count=related_user_count|add:"-1" %}
|
|
|
|
{% with other_user_display_count=other_user_count|intcomma %}
|
|
|
|
{% block description %}{% endblock %}
|
|
|
|
{% endwith %}
|
|
|
|
{% endwith %}
|
|
|
|
{% endwith %}
|
|
|
|
{% endwith %}
|
|
|
|
{% endwith %}
|
|
|
|
{% endwith %}
|
2023-09-18 11:21:04 +00:00
|
|
|
{% endwith %}
|
|
|
|
{% endwith %}
|
2021-10-02 14:58:20 +00:00
|
|
|
</div>
|
2021-12-31 03:48:47 +00:00
|
|
|
|
2021-10-02 14:58:20 +00:00
|
|
|
{% if related_status %}
|
|
|
|
<div class="block">
|
|
|
|
{% block preview %}{% endblock %}
|
|
|
|
</div>
|
|
|
|
{% endif %}
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
</div>
|
2022-07-05 04:32:53 +00:00
|
|
|
{% endwith %}
|