aboutsummaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
authorubq323 <ubq323>2021-06-14 14:54:39 +0000
committerubq323 <ubq323>2021-06-14 14:54:39 +0000
commit967da4c39e4768aa3d0c6dca11046f032bcabd9c (patch)
tree1a45e405f95fdd91f9abd579bf0fd34baf328644
parent955cb51e97dbd4f5a68e42ca565f2105e3da6687 (diff)
remove create thread button when not logged in
-rw-r--r--apioforum/templates/view_forum.html7
1 files changed, 5 insertions, 2 deletions
diff --git a/apioforum/templates/view_forum.html b/apioforum/templates/view_forum.html
index 30fcb64..3aee2ed 100644
--- a/apioforum/templates/view_forum.html
+++ b/apioforum/templates/view_forum.html
@@ -4,8 +4,11 @@
{%block content%}
<p>welcome to the apioforum</p>
<p>forum rules: do not be a bad person. do not do bad things.</p>
-<a class="actionbutton" href="{{url_for('forum.create_thread')}}">create new thread</a>
-<br><br>
+{% if g.user %}
+<p><a class="actionbutton" href="{{url_for('forum.create_thread')}}">create new thread</a></p>
+{% else %}
+<p>please log in to create a new thread</p>
+{% endif %}
<div class="threadlistings">
<div class="threadlisting">
<div class="threadlisting-part threadlisting-part-title threadlisting-header">