diff --git a/bookwyrm/templates/notifications/add.html b/bookwyrm/templates/notifications/add.html new file mode 100644 index 000000000..6ccabf41e --- /dev/null +++ b/bookwyrm/templates/notifications/add.html @@ -0,0 +1,35 @@ +{% extends 'notifications/item_layout.html' %} + +{% load i18n %} +{% load utilities %} + +{% block icon %} + +{% endblock %} + +{% block description %} +{% with book_path=notification.related_list_item.book.local_path %} +{% with book_title=notification.related_list_item.book|book_title %} +{% with list_path=notification.related_list_item.book_list.local_path %} +{% with list_name=notification.related_list_item.book_list.name %} + + {% if notification.related_list_item.approved %} + {% blocktrans trimmed %} + + added {{ book_title }} to your list "{{ list_name }}" + + {% endblocktrans %} + {% else %} + {% blocktrans trimmed %} + + suggested adding {{ book_title }} to your list "{{ list_name }}" + + {% endblocktrans %} + {% endif %} + +{% endwith %} +{% endwith %} +{% endwith %} +{% endwith %} +{% endblock %} + diff --git a/bookwyrm/templates/notifications/boost.html b/bookwyrm/templates/notifications/boost.html new file mode 100644 index 000000000..0653e8ee9 --- /dev/null +++ b/bookwyrm/templates/notifications/boost.html @@ -0,0 +1,57 @@ +{% extends 'notifications/item_layout.html' %} + +{% load i18n %} +{% load utilities %} + +{% block icon %} + +{% endblock %} + +{% block description %} + {% with related_status.book|book_title as book_title %} + {% with related_status.local_path as related_path %} + + {% if related_status.status_type == 'Review' %} + {% blocktrans trimmed %} + + boosted your review of {{ book_title }} + + {% endblocktrans %} + {% elif related_status.status_type == 'Comment' %} + {% blocktrans trimmed %} + + boosted your comment on{{ book_title }} + + {% endblocktrans %} + {% elif related_status.status_type == 'Quotation' %} + {% blocktrans trimmed %} + + boosted your quote from {{ book_title }} + + {% endblocktrans %} + {% else %} + {% blocktrans trimmed %} + + boosted your status + + {% endblocktrans %} + {% endif %} + + {% endwith %} + {% endwith %} +{% endblock %} + + +{% block preview %} +
+
+
+ {% include 'snippets/status_preview.html' with status=related_status %} +
+
+ {{ related_status.published_date|timesince }} + {% include 'snippets/privacy-icons.html' with item=related_status %} +
+
+
+{% endblock %} diff --git a/bookwyrm/templates/notifications/fav.html b/bookwyrm/templates/notifications/fav.html new file mode 100644 index 000000000..c95070674 --- /dev/null +++ b/bookwyrm/templates/notifications/fav.html @@ -0,0 +1,57 @@ +{% extends 'notifications/item_layout.html' %} + +{% load i18n %} +{% load utilities %} + +{% block icon %} + +{% endblock %} + +{% block description %} + {% with related_status.book|book_title as book_title %} + {% with related_status.local_path as related_path %} + + {% if related_status.status_type == 'Review' %} + {% blocktrans trimmed %} + + favorited your review of {{ book_title }} + + {% endblocktrans %} + {% elif related_status.status_type == 'Comment' %} + {% blocktrans trimmed %} + + favorited your comment on{{ book_title }} + + {% endblocktrans %} + {% elif related_status.status_type == 'Quotation' %} + {% blocktrans trimmed %} + + favorited your quote from {{ book_title }} + + {% endblocktrans %} + {% else %} + {% blocktrans trimmed %} + + favorited your status + + {% endblocktrans %} + {% endif %} + + {% endwith %} + {% endwith %} +{% endblock %} + + +{% block preview %} +
+
+
+ {% include 'snippets/status_preview.html' with status=related_status %} +
+
+ {{ related_status.published_date|timesince }} + {% include 'snippets/privacy-icons.html' with item=related_status %} +
+
+
+{% endblock %} diff --git a/bookwyrm/templates/notifications/follow.html b/bookwyrm/templates/notifications/follow.html new file mode 100644 index 000000000..8ae0caa78 --- /dev/null +++ b/bookwyrm/templates/notifications/follow.html @@ -0,0 +1,13 @@ +{% extends 'notifications/item_layout.html' %} + +{% load i18n %} +{% load utilities %} + +{% block icon %} + +{% endblock %} + +{% block description %} + {% trans "followed you" %} + {% include 'snippets/follow_button.html' with user=notification.related_user %} +{% endblock %} diff --git a/bookwyrm/templates/notifications/follow_request.html b/bookwyrm/templates/notifications/follow_request.html new file mode 100644 index 000000000..33c0bd1f0 --- /dev/null +++ b/bookwyrm/templates/notifications/follow_request.html @@ -0,0 +1,15 @@ +{% extends 'notifications/item_layout.html' %} + +{% load i18n %} +{% load utilities %} + +{% block icon %} + +{% endblock %} + +{% block description %} + {% trans "sent you a follow request" %} +
+ {% include 'snippets/follow_request_buttons.html' with user=notification.related_user %} +
+{% endblock %} diff --git a/bookwyrm/templates/notifications/import.html b/bookwyrm/templates/notifications/import.html new file mode 100644 index 000000000..1d3111956 --- /dev/null +++ b/bookwyrm/templates/notifications/import.html @@ -0,0 +1,12 @@ +{% extends 'notifications/item_layout.html' %} + +{% load i18n %} + +{% block icon %} + +{% endblock %} + +{% block description %} + {% url 'import-status' notification.related_import.id as url %} + {% blocktrans %}Your import completed.{% endblocktrans %} +{% endblock %} diff --git a/bookwyrm/templates/notifications/item.html b/bookwyrm/templates/notifications/item.html index 29aaf7095..6c2ab7fe3 100644 --- a/bookwyrm/templates/notifications/item.html +++ b/bookwyrm/templates/notifications/item.html @@ -1,2 +1,20 @@ {# load the right template #} -{% include 'notifications/mention.html' %} +{% if notification.notification_type == 'MENTION' %} + {% include 'notifications/mention.html' %} +{% elif notification.notification_type == 'REPLY' %} + {% include 'notifications/reply.html' %} +{% elif notification.notification_type == 'BOOST' %} + {% include 'notifications/boost.html' %} +{% elif notification.notification_type == 'FAVORITE' %} + {% include 'notifications/fav.html' %} +{% elif notification.notification_type == 'FOLLOW' %} + {% include 'notifications/follow.html' %} +{% elif notification.notification_type == 'FOLLOW_REQUEST' %} + {% include 'notifications/follow_request.html' %} +{% elif notification.notification_type == 'IMPORT' %} + {% include 'notifications/import.html' %} +{% elif notification.notification_type == 'ADD' %} + {% include 'notifications/add.html' %} +{% elif notification.notification_type == 'REPORT' %} + {% include 'notifications/report.html' %} +{% endif %} diff --git a/bookwyrm/templates/notifications/mention.html b/bookwyrm/templates/notifications/mention.html index 58872ef80..c456afdb8 100644 --- a/bookwyrm/templates/notifications/mention.html +++ b/bookwyrm/templates/notifications/mention.html @@ -44,14 +44,13 @@ {% endblock %} - {% block preview %}
{% include 'snippets/status_preview.html' with status=related_status %}
-
+
{{ related_status.published_date|timesince }} {% include 'snippets/privacy-icons.html' with item=related_status %}
diff --git a/bookwyrm/templates/notifications/reply.html b/bookwyrm/templates/notifications/reply.html new file mode 100644 index 000000000..d34a267bc --- /dev/null +++ b/bookwyrm/templates/notifications/reply.html @@ -0,0 +1,62 @@ +{% extends 'notifications/item_layout.html' %} + +{% load i18n %} +{% load utilities %} + + +{% block icon %} + +{% endblock %} + + +{% block description %} + {% with related_status.reply_parent.book|book_title as book_title %} + {% with related_status.local_path as related_path %} + {% with related_status.reply_parent.local_path as parent_path %} + + {% if related_status.reply_parent.status_type == 'Review' %} + {% blocktrans trimmed %} + + replied to your review of {{ book_title }} + + {% endblocktrans %} + {% elif related_status.reply_parent.status_type == 'Comment' %} + {% blocktrans trimmed %} + + replied to your comment on {{ book_title }} + + {% endblocktrans %} + {% elif related_status.reply_parent.status_type == 'Quotation' %} + {% blocktrans trimmed %} + + replied to your quote from {{ book_title }} + + {% endblocktrans %} + {% else %} + {% blocktrans trimmed %} + + replied to your status + + {% endblocktrans %} + {% endif %} + + {% endwith %} + {% endwith %} + {% endwith %} +{% endblock %} + + + +{% block preview %} +
+
+
+ {% include 'snippets/status_preview.html' with status=related_status %} +
+
+ {{ related_status.published_date|timesince }} + {% include 'snippets/privacy-icons.html' with item=related_status %} +
+
+
+{% endblock %} diff --git a/bookwyrm/templates/notifications/report.html b/bookwyrm/templates/notifications/report.html new file mode 100644 index 000000000..ca0c877d1 --- /dev/null +++ b/bookwyrm/templates/notifications/report.html @@ -0,0 +1,12 @@ +{% extends 'notifications/item_layout.html' %} + +{% load i18n %} + +{% block icon %} + +{% endblock %} + +{% block description %} + {% url 'settings-report' notification.related_report.id as path %} + {% blocktrans %}A new report needs moderation.{% endblocktrans %} +{% endblock %}