forked from mirrors/bookwyrm
Include accept/delete buttons in notifications list.
This commit is contained in:
parent
0e34c74647
commit
fa57d6cfc7
3 changed files with 12 additions and 10 deletions
|
@ -29,6 +29,7 @@
|
||||||
{% elif notification.notification_type == 'FOLLOW_REQUEST' %}
|
{% elif notification.notification_type == 'FOLLOW_REQUEST' %}
|
||||||
{% include 'snippets/username.html' with user=notification.related_user %}
|
{% include 'snippets/username.html' with user=notification.related_user %}
|
||||||
sent you a follow request
|
sent you a follow request
|
||||||
|
{% include 'snippets/follow_request_buttons.html' with user=notification.related_user %}
|
||||||
{% endif %}
|
{% endif %}
|
||||||
<small>{{ notification.created_date | naturaltime }}</small>
|
<small>{{ notification.created_date | naturaltime }}</small>
|
||||||
</p>
|
</p>
|
||||||
|
|
10
fedireads/templates/snippets/follow_request_buttons.html
Normal file
10
fedireads/templates/snippets/follow_request_buttons.html
Normal file
|
@ -0,0 +1,10 @@
|
||||||
|
<form action="/accept_follow_request/" method="POST">
|
||||||
|
{% csrf_token %}
|
||||||
|
<input type=hidden name="user" value="{{ user.username }}">
|
||||||
|
<input type=submit value="Accept">
|
||||||
|
</form>
|
||||||
|
<form action="/delete_follow_request/" method="POST">
|
||||||
|
{% csrf_token %}
|
||||||
|
<input type=hidden name="user" value="{{ user.username }}">
|
||||||
|
<input type=submit value="Delete">
|
||||||
|
</form>
|
|
@ -27,16 +27,7 @@
|
||||||
{% for requester in user.follower_requests.all %}
|
{% for requester in user.follower_requests.all %}
|
||||||
<div>
|
<div>
|
||||||
{% include 'snippets/username.html' with user=requester show_full=True %}
|
{% include 'snippets/username.html' with user=requester show_full=True %}
|
||||||
<form action="/accept_follow_request/" method="POST">
|
{% include 'snippets/follow_request_buttons.html' with user=requester %}
|
||||||
{% csrf_token %}
|
|
||||||
<input type=hidden name="user" value="{{ requester.username }}">
|
|
||||||
<input type=submit value="Accept">
|
|
||||||
</form>
|
|
||||||
<form action="/delete_follow_request/" method="POST">
|
|
||||||
{% csrf_token %}
|
|
||||||
<input type=hidden name="user" value="{{ requester.username }}">
|
|
||||||
<input type=submit value="Delete">
|
|
||||||
</form>
|
|
||||||
</div>
|
</div>
|
||||||
{% endfor %}
|
{% endfor %}
|
||||||
</div>
|
</div>
|
||||||
|
|
Loading…
Reference in a new issue