2020-03-07 22:50:29 +00:00
|
|
|
{% extends 'layout.html' %}
|
|
|
|
{% load humanize %}l
|
|
|
|
{% block content %}
|
2020-09-29 21:45:04 +00:00
|
|
|
<div class="block">
|
|
|
|
<h2 class="title">Notifications</h2>
|
2020-03-07 22:50:29 +00:00
|
|
|
|
2020-03-17 01:05:49 +00:00
|
|
|
<form name="clear" action="/clear-notifications" method="POST">
|
|
|
|
{% csrf_token %}
|
2020-09-29 21:45:04 +00:00
|
|
|
<button class="button is-danger" type="submit" class="secondary">Delete notifications</button>
|
2020-03-17 01:05:49 +00:00
|
|
|
</form>
|
|
|
|
</div>
|
|
|
|
|
2020-09-29 21:45:04 +00:00
|
|
|
<div class="block">
|
2020-03-17 01:05:49 +00:00
|
|
|
{% for notification in notifications %}
|
2020-09-29 21:45:04 +00:00
|
|
|
<div class="notification level{% if notification.id in unread %} is-primary{% endif %}">
|
|
|
|
<div class="level-left">
|
|
|
|
<p>
|
|
|
|
{% if notification.related_user %}
|
|
|
|
{% include 'snippets/avatar.html' with user=notification.related_user %}
|
|
|
|
{% include 'snippets/username.html' with user=notification.related_user %}
|
|
|
|
{% if notification.notification_type == 'FAVORITE' %}
|
|
|
|
favorited your
|
|
|
|
<a href="{{ notification.related_status.remote_id}}">status</a>
|
|
|
|
|
2020-11-01 18:15:56 +00:00
|
|
|
{% elif notification.notification_type == 'MENTION' %}
|
|
|
|
mentioned you in a
|
|
|
|
<a href="{{ notification.related_status.remote_id}}">status</a>
|
|
|
|
|
2020-09-29 21:45:04 +00:00
|
|
|
{% elif notification.notification_type == 'REPLY' %}
|
|
|
|
<a href="{{ notification.related_status.remote_id}}">replied</a>
|
|
|
|
to your
|
|
|
|
<a href="{{ notification.related_status.reply_parent.remote_id}}">status</a>
|
|
|
|
|
|
|
|
{% elif notification.notification_type == 'FOLLOW' %}
|
|
|
|
followed you
|
|
|
|
|
|
|
|
{% elif notification.notification_type == 'FOLLOW_REQUEST' %}
|
|
|
|
sent you a follow request
|
|
|
|
<div class="row shrink">
|
|
|
|
{% include 'snippets/follow_request_buttons.html' with user=notification.related_user %}
|
|
|
|
</div>
|
|
|
|
|
|
|
|
{% elif notification.notification_type == 'BOOST' %}
|
|
|
|
boosted your <a href="{{ notification.related_status.remote_id}}">status</a>
|
|
|
|
{% endif %}
|
|
|
|
{% else %}
|
|
|
|
your <a href="/import_status/{{ notification.related_import.id }}">import</a> completed.
|
|
|
|
|
|
|
|
{% endif %}
|
|
|
|
</p>
|
|
|
|
</div>
|
|
|
|
|
|
|
|
<p class="level-right">{{ notification.created_date | naturaltime }}</p>
|
2020-03-07 22:50:29 +00:00
|
|
|
</div>
|
2020-03-17 01:05:49 +00:00
|
|
|
{% endfor %}
|
|
|
|
{% if not notifications %}
|
|
|
|
<p>You're all caught up!</p>
|
|
|
|
{% endif %}
|
2020-03-07 22:50:29 +00:00
|
|
|
</div>
|
|
|
|
|
|
|
|
{% endblock %}
|