2020-03-07 22:50:29 +00:00
|
|
|
{% extends 'layout.html' %}
|
|
|
|
{% load humanize %}l
|
|
|
|
{% block content %}
|
2020-03-17 01:05:49 +00:00
|
|
|
<div class="content-container">
|
|
|
|
<h2>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 %}
|
|
|
|
<button type="submit" class="secondary">Delete notifications</button>
|
|
|
|
</form>
|
|
|
|
</div>
|
|
|
|
|
|
|
|
<div class="content-container">
|
|
|
|
{% for notification in notifications %}
|
|
|
|
<div class="notification{% if notification.id in unread %} unread{% endif %}">
|
|
|
|
<small class="time-ago">{{ notification.created_date | naturaltime }}</small>
|
2020-04-20 16:10:19 +00:00
|
|
|
{% if notification.related_user %}
|
2020-03-17 01:05:49 +00:00
|
|
|
{% include 'snippets/username.html' with user=notification.related_user %}
|
|
|
|
{% if notification.notification_type == 'FAVORITE' %}
|
|
|
|
favorited your
|
2020-05-13 01:56:28 +00:00
|
|
|
<a href="{{ notification.related_status.remote_id}}">status</a>
|
2020-03-17 01:05:49 +00:00
|
|
|
|
|
|
|
{% elif notification.notification_type == 'REPLY' %}
|
2020-05-13 01:56:28 +00:00
|
|
|
<a href="{{ notification.related_status.remote_id}}">replied</a>
|
2020-03-17 01:05:49 +00:00
|
|
|
to your
|
2020-05-13 01:56:28 +00:00
|
|
|
<a href="{{ notification.related_status.reply_parent.remote_id}}">status</a>
|
2020-03-07 22:50:29 +00:00
|
|
|
|
2020-03-17 01:05:49 +00:00
|
|
|
{% elif notification.notification_type == 'FOLLOW' %}
|
|
|
|
followed you
|
2020-03-13 13:13:32 +00:00
|
|
|
|
2020-03-17 01:05:49 +00:00
|
|
|
{% elif notification.notification_type == 'FOLLOW_REQUEST' %}
|
|
|
|
sent you a follow request
|
|
|
|
<div class="row shrink">
|
2020-03-13 14:58:30 +00:00
|
|
|
{% include 'snippets/follow_request_buttons.html' with user=notification.related_user %}
|
2020-03-17 01:05:49 +00:00
|
|
|
</div>
|
2020-03-30 14:13:32 +00:00
|
|
|
|
|
|
|
{% elif notification.notification_type == 'BOOST' %}
|
2020-05-13 01:56:28 +00:00
|
|
|
boosted your <a href="{{ notification.related_status.remote_id}}">status</a>
|
2020-03-17 01:05:49 +00:00
|
|
|
{% endif %}
|
2020-04-20 16:10:19 +00:00
|
|
|
{% else %}
|
2020-05-13 01:56:28 +00:00
|
|
|
your <a href="/import_status/{{ notification.related_import.id }}">import</a> completed.
|
2020-04-20 16:10:19 +00:00
|
|
|
|
|
|
|
{% endif %}
|
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 %}
|
|
|
|
|