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' %}
|
||||
{% include 'snippets/username.html' with user=notification.related_user %}
|
||||
sent you a follow request
|
||||
{% include 'snippets/follow_request_buttons.html' with user=notification.related_user %}
|
||||
{% endif %}
|
||||
<small>{{ notification.created_date | naturaltime }}</small>
|
||||
</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 %}
|
||||
<div>
|
||||
{% include 'snippets/username.html' with user=requester show_full=True %}
|
||||
<form action="/accept_follow_request/" method="POST">
|
||||
{% 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>
|
||||
{% include 'snippets/follow_request_buttons.html' with user=requester %}
|
||||
</div>
|
||||
{% endfor %}
|
||||
</div>
|
||||
|
|
Loading…
Reference in a new issue