diff --git a/bookwyrm/templates/notifications/item.html b/bookwyrm/templates/notifications/item.html index 348d8950..3ed43a96 100644 --- a/bookwyrm/templates/notifications/item.html +++ b/bookwyrm/templates/notifications/item.html @@ -17,4 +17,14 @@ {% include 'notifications/items/add.html' %} {% elif notification.notification_type == 'REPORT' %} {% include 'notifications/items/report.html' %} +{% elif notification.notification_type == 'INVITE' %} + {% include 'notifications/items/invite.html' %} +{% elif notification.notification_type == 'ACCEPT' %} + {% include 'notifications/items/accept.html' %} +{% elif notification.notification_type == 'JOIN' %} + {% include 'notifications/items/join.html' %} +{% elif notification.notification_type == 'LEAVE' %} + {% include 'notifications/items/leave.html' %} +{% elif notification.notification_type == 'REMOVE' %} + {% include 'notifications/items/remove.html' %} {% endif %} diff --git a/bookwyrm/templates/notifications/items/accept.html b/bookwyrm/templates/notifications/items/accept.html new file mode 100644 index 00000000..3ad67120 --- /dev/null +++ b/bookwyrm/templates/notifications/items/accept.html @@ -0,0 +1,20 @@ +{% extends 'notifications/items/item_layout.html' %} + +{% load i18n %} +{% load utilities %} + +{% block primary_link %}{% spaceless %} + {{ notification.related_group.local_path }} +{% endspaceless %}{% endblock %} + +{% block icon %} + +{% endblock %} + +{% block description %} + +{% blocktrans with group_name=notification.related_group.name group_path=notification.related_group.local_path %} +accepted your invitation to join group "{{ group_name }}" +{% endblocktrans %} + +{% endblock %} \ No newline at end of file diff --git a/bookwyrm/templates/notifications/items/invite.html b/bookwyrm/templates/notifications/items/invite.html new file mode 100644 index 00000000..c50dba06 --- /dev/null +++ b/bookwyrm/templates/notifications/items/invite.html @@ -0,0 +1,22 @@ +{% extends 'notifications/items/item_layout.html' %} + +{% load i18n %} +{% load utilities %} + +{% block primary_link %}{% spaceless %} + {{ notification.related_group.local_path }} +{% endspaceless %}{% endblock %} + +{% block icon %} + +{% endblock %} + +{% block description %} +{% blocktrans with group_name=notification.related_group.name group_path=notification.related_group.local_path %} +invited you to join the group {{ group_name }} +{% endblocktrans %} +
+ {% include 'snippets/join_invitation_buttons.html' with group=notification.related_group %} +
+{% endblock %} + diff --git a/bookwyrm/templates/notifications/items/join.html b/bookwyrm/templates/notifications/items/join.html new file mode 100644 index 00000000..3dbc8159 --- /dev/null +++ b/bookwyrm/templates/notifications/items/join.html @@ -0,0 +1,23 @@ +{% extends 'notifications/items/item_layout.html' %} + +{% load i18n %} +{% load utilities %} + +{% block primary_link %}{% spaceless %} + {{ notification.related_group.local_path }} +{% endspaceless %}{% endblock %} + +{% block icon %} + +{% endblock %} + +{% block description %} + +{% blocktrans with group_name=notification.related_group.name group_path=notification.related_group.local_path %} +has joined your group "{{ group_name }}" +{% endblocktrans %} + +{% endblock %} + + + diff --git a/bookwyrm/templates/notifications/items/leave.html b/bookwyrm/templates/notifications/items/leave.html new file mode 100644 index 00000000..a30241c5 --- /dev/null +++ b/bookwyrm/templates/notifications/items/leave.html @@ -0,0 +1,20 @@ +{% extends 'notifications/items/item_layout.html' %} + +{% load i18n %} +{% load utilities %} + +{% block primary_link %}{% spaceless %} + {{ notification.related_group.local_path }} +{% endspaceless %}{% endblock %} + +{% block icon %} + +{% endblock %} + +{% block description %} + +{% blocktrans with group_name=notification.related_group.name group_path=notification.related_group.local_path %} +has left your group "{{ group_name }}" +{% endblocktrans %} + +{% endblock %} \ No newline at end of file diff --git a/bookwyrm/templates/notifications/items/remove.html b/bookwyrm/templates/notifications/items/remove.html new file mode 100644 index 00000000..784c0d00 --- /dev/null +++ b/bookwyrm/templates/notifications/items/remove.html @@ -0,0 +1,29 @@ +{% extends 'notifications/items/item_layout.html' %} + +{% load i18n %} +{% load utilities %} + +{% block primary_link %}{% spaceless %} + {{ notification.related_group.local_path }} +{% endspaceless %}{% endblock %} + +{% block icon %} + +{% endblock %} + +{% block description %} +{% if notification.related_user %} + +{% blocktrans with group_name=notification.related_group.name group_path=notification.related_group.local_path %} +has been removed from your group "{{ group_name }}" +{% endblocktrans %} + +{% else %} + +{% blocktrans with group_name=notification.related_group.name group_path=notification.related_group.local_path %} +You have been removed from the "{{ group_name }} group" +{% endblocktrans %} + +{% endif %} +{% endblock %} +