aboutsummaryrefslogtreecommitdiff
path: root/app/templates/threads/view.html
diff options
context:
space:
mode:
Diffstat (limited to 'app/templates/threads/view.html')
-rw-r--r--app/templates/threads/view.html21
1 files changed, 17 insertions, 4 deletions
diff --git a/app/templates/threads/view.html b/app/templates/threads/view.html
index 397fba3..71580de 100644
--- a/app/templates/threads/view.html
+++ b/app/templates/threads/view.html
@@ -6,11 +6,24 @@ Threads
{% block content %}
<h1>{% if thread.private %}&#x1f512; {% endif %}{{ thread.title }}</h1>
+ {% if thread.package or current_user.is_authenticated %}
+ {% if thread.package %}
+ <p>Package: <a href="{{ thread.package.getDetailsURL() }}">{{ thread.package.title }}</a></p>
+ {% endif %}
- {% if thread.package %}
- <p>
- Package: <a href="{{ thread.package.getDetailsURL() }}">{{ thread.package.title }}</a>
- </p>
+ {% if current_user.is_authenticated %}
+ {% if current_user in thread.watchers %}
+ <form method="post" action="{{ thread.getUnsubscribeURL() }}">
+ <input type="hidden" name="csrf_token" value="{{ csrf_token() }}" />
+ <input type="submit" value="Unsubscribe" />
+ </form>
+ {% else %}
+ <form method="post" action="{{ thread.getSubscribeURL() }}">
+ <input type="hidden" name="csrf_token" value="{{ csrf_token() }}" />
+ <input type="submit" value="Subscribe" />
+ </form>
+ {% endif %}
+ {% endif %}
{% endif %}
{% if thread.private %}