diff --git a/bookwyrm/templates/notifications/item.html b/bookwyrm/templates/notifications/item.html new file mode 100644 index 00000000..29aaf709 --- /dev/null +++ b/bookwyrm/templates/notifications/item.html @@ -0,0 +1,2 @@ +{# load the right template #} +{% include 'notifications/mention.html' %} diff --git a/bookwyrm/templates/notifications/item_layout.html b/bookwyrm/templates/notifications/item_layout.html new file mode 100644 index 00000000..19b6d13d --- /dev/null +++ b/bookwyrm/templates/notifications/item_layout.html @@ -0,0 +1,29 @@ +{% load humanize %} +{% load bookwyrm_tags %} +{% related_status notification as related_status %} +
+ {% if notification.related_user %} + + {% include 'snippets/avatar.html' with user=notification.related_user %} + {{ notification.related_user.display_name }} + + {% endif %} + {% block description %}{% endblock %} +
+- {# DESCRIPTION #} - {% if notification.related_user %} - - {% include 'snippets/avatar.html' with user=notification.related_user %} - {{ notification.related_user.display_name }} - - {% if notification.notification_type == 'FAVORITE' %} - {% if related_status.status_type == 'Review' %} - {% blocktrans with book_title=related_status.book.title related_path=related_status.local_path %}favorited your review of {{ book_title }}{% endblocktrans %} - {% elif related_status.status_type == 'Comment' %} - {% blocktrans with book_title=related_status.book.title related_path=related_status.local_path %}favorited your comment on {{ book_title }}{% endblocktrans %} - {% elif related_status.status_type == 'Quotation' %} - {% blocktrans with book_title=related_status.book.title related_path=related_status.local_path %}favorited your quote from {{ book_title }}{% endblocktrans %} - {% else %} - {% blocktrans with related_path=related_status.local_path %}favorited your status{% endblocktrans %} - {% endif %} - - {% elif notification.notification_type == 'MENTION' %} - {% if related_status.status_type == 'Review' %} - {% blocktrans with related_path=related_status.local_path book_title=related_status.book.title %}mentioned you in a review of {{ book_title }}{% endblocktrans %} - {% elif related_status.status_type == 'Comment' %} - {% blocktrans with related_path=related_status.local_path book_title=related_status.book.title %}mentioned you in a comment on {{ book_title }}{% endblocktrans %} - {% elif related_status.status_type == 'Quotation' %} - {% blocktrans with related_path=related_status.local_path book_title=related_status.book.title %}mentioned you in a quote from {{ book_title }}{% endblocktrans %} - {% else %} - {% blocktrans with related_path=related_status.local_path %}mentioned you in a status{% endblocktrans %} - {% endif %} - - {% elif notification.notification_type == 'REPLY' %} - {% if related_status.status_type == 'Review' %} - {% blocktrans with related_path=related_status.local_path parent_path=related_status.reply_parent.local_path book_title=related_status.reply_parent.book.title %}replied to your review of {{ book_title }}{% endblocktrans %} - {% elif related_status.status_type == 'Comment' %} - {% blocktrans with related_path=related_status.local_path parent_path=related_status.reply_parent.local_path book_title=related_status.reply_parent.book.title %}replied to your comment on {{ book_title }}{% endblocktrans %} - {% elif related_status.status_type == 'Quotation' %} - {% blocktrans with related_path=related_status.local_path parent_path=related_status.reply_parent.local_path book_title=related_status.reply_parent.book.title %}replied to your quote from {{ book_title }}{% endblocktrans %} - {% else %} - {% blocktrans with related_path=related_status.local_path parent_path=related_status.reply_parent.local_path %}replied to your status{% endblocktrans %} - {% endif %} - - {% elif notification.notification_type == 'FOLLOW' %} - {% trans "followed you" %} - {% include 'snippets/follow_button.html' with user=notification.related_user %} - {% elif notification.notification_type == 'FOLLOW_REQUEST' %} - {% trans "sent you a follow request" %} -