Notifications: unsubscribe from extension approval activity (#177) #207

Merged
Oleg-Komarov merged 5 commits from approval-follow into main 2024-07-30 12:11:05 +02:00
Showing only changes of commit e37f67c6ef - Show all commits

View File

@ -79,21 +79,27 @@
{% block extension_activity %} {% block extension_activity %}
<section id="activity" class="mt-4"> <section id="activity" class="mt-4">
<hr class="my-4"> <hr class="my-4">
<h2>Activity</h2> <div class="align-items-center d-flex w-100">
{% if request.user.is_authenticated and not is_maintainer %} <h2>Activity</h2>
<form method="post" action="{% url 'reviewers:approval-follow' extension.slug %}"> {% if request.user.is_authenticated and not is_maintainer %}
{% csrf_token %} <form class="d-flex flex-column flex-grow-1" method="post" action="{% url 'reviewers:approval-follow' extension.slug %}">
<button type="submit" class="btn"> {% csrf_token %}
{% if user_is_following %} {% if user_is_following %}
<i class="i-bell-off"></i> Unsubscribe <button class="btn ms-auto" type="submit">
<input type="hidden" name="follow" value="" /> <i class="i-bell-off"></i> Unsubscribe
{% else %} <input type="hidden" name="follow" value="" />
<i class="i-bell"></i> Subscribe </button>
<input type="hidden" name="follow" value="True" /> <small class="text-muted text-end">{% trans "You're receiving notifications because you're subscribed to this thread." %}</small>
{% endif %} {% else %}
</button> <button class="btn ms-auto" type="submit">
</form> <i class="i-bell"></i> Subscribe
{% endif %} <input type="hidden" name="follow" value="True" />
</button>
<small class="text-muted text-end">{% trans "You're not receiving notifications from this thread." %}</small>
{% endif %}
</form>
{% endif %}
</div>
{% if review_activity %} {% if review_activity %}
<ul class="activity-list"> <ul class="activity-list">