{% extends 'layout.html' %} {% load humanize %} {% load bookwyrm_tags %} {% block content %}

Notifications

{% csrf_token %}
{% for notification in notifications %} {% related_status notification as related_status %}
{% if notification.notification_type == 'MENTION' %} {% elif notification.notification_type == 'REPLY' %} {% elif notification.notification_type == 'FOLLOW' or notification.notification_type == 'FOLLOW_REQUEST' %} {% elif notification.notification_type == 'BOOST' %} {% elif notification.notification_type == 'FAVORITE' %} {% elif notification.notification_type == 'IMPORT' %} {% elif notification.notification_type == 'ADD' %} {% endif %}

{# DESCRIPTION #} {% 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 {{ related_status | status_preview_name|safe }} {% elif notification.notification_type == 'MENTION' %} mentioned you in a {{ related_status | status_preview_name|safe }} {% elif notification.notification_type == 'REPLY' %} replied to your {{ related_status | status_preview_name|safe }} {% elif notification.notification_type == 'FOLLOW' %} followed you {% include 'snippets/follow_button.html' with user=notification.related_user %} {% elif notification.notification_type == 'FOLLOW_REQUEST' %} sent you a follow request

{% include 'snippets/follow_request_buttons.html' with user=notification.related_user %}
{% elif notification.notification_type == 'BOOST' %} boosted your {{ related_status | status_preview_name|safe }} {% elif notification.notification_type == 'ADD' %} {% if notification.related_list_item.approved %}added{% else %}suggested adding{% endif %} {% include 'snippets/book_titleby.html' with book=notification.related_list_item.book %} to your list "{{ notification.related_list_item.book_list.name }}" {% endif %} {% elif notification.related_import %} your import completed. {% endif %}

{% if related_status %}
{# PREVIEW #}
{% if related_status.content %} {{ related_status.content | safe | truncatewords_html:10 }} {% elif related_status.quote %} {{ related_status.quote | safe | truncatewords_html:10 }} {% elif related_status.rating %} {% include 'snippets/stars.html' with rating=related_status.rating %} {% endif %}
{{ related_status.published_date | post_date }} {% include 'snippets/privacy-icons.html' with item=related_status %}
{% endif %}
{% endfor %} {% if not notifications %}

You're all caught up!

{% endif %}
{% endblock %}