Basic subscribe functionality.

This commit is contained in:
Matthew Crossman 2021-01-30 18:00:00 +11:00
parent 75bbcefbec
commit 345308a9ac
No known key found for this signature in database
GPG key ID: C6B942B019794CC2
5 changed files with 53 additions and 11 deletions

View file

@ -125,13 +125,15 @@
<div>{{ sub.members }}</div>
<div>{{ sub.active }}</div>
</div>
<div id="sub_subscription">
{% if prefs.subs.contains(sub.name) %}
<a class="subscribe remove">Unsubscribe</a>
{% else %}
<a class="subscribe add">Subscribe</a>
{% endif %}
</div>
{% if prefs.subs.contains(sub.name) %}
<form id="sub_subscription" action="/r/{{ sub.name }}/unsubscribe" method="POST">
<input class="subscribe remove" type="submit" value="Unsubscribe">
</form>
{% else %}
<form id="sub_subscription" action="/r/{{ sub.name }}/subscribe" method="POST">
<input class="subscribe add" type="submit" value="Subscribe">
</form>
{% endif %}
</div>
</div>
<details class="panel" id="sidebar">