users can disable notifications
This commit is contained in:
parent
4a61d463bd
commit
f420dd98ac
9 changed files with 82 additions and 22 deletions
|
@ -20,7 +20,7 @@
|
|||
{% endcomment %}
|
||||
|
||||
{% if request.user.is_authenticated %}
|
||||
{% if request.user.email and request.user in project.subscribers.all %}
|
||||
{% if request.user.email and request.user.notifications and request.user in project.subscribers.all %}
|
||||
<li><a href="{% url 'unsubscribe-project' project.name %}?next={{ request.get_full_path }}"><span class="glyphicon glyphicon-eye-close"></span> Unwatch</a></li>
|
||||
{% else %}
|
||||
<li><a href="{% url 'subscribe-project' project.name %}?next={{ request.get_full_path }}"><span class="glyphicon glyphicon-eye-open"></span> Watch</a></li>
|
||||
|
|
|
@ -193,15 +193,13 @@
|
|||
</h5>
|
||||
<div class="row">
|
||||
<span style="display: inline-block; margin-left: 14px;"></span>
|
||||
{% if request.user.email and request.user in project.subscribers.all %}
|
||||
{% if request.user.email and request.user.notifications and request.user in project.subscribers.all %}
|
||||
Subscribed to the project
|
||||
{% else %}
|
||||
{% if request.user in issue.subscribers.all %}
|
||||
{% elif request.user.notifications and request.user in issue.subscribers.all %}
|
||||
<a href="{% url 'unsubscribe-issue' project.name issue.id %}" class="btn btn-default"><span class="glyphicon glyphicon-eye-close"></span> Unsubscribe</a>
|
||||
{% else %}
|
||||
<a href="{% url 'subscribe-issue' project.name issue.id %}" class="btn btn-default"><span class="glyphicon glyphicon-eye-open"></span> Subscribe</a>
|
||||
{% endif %}
|
||||
{% endif %}
|
||||
</div>
|
||||
{% endif %}
|
||||
</div>
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue