aboutsummaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
-rw-r--r--apioforum/templates/config_thread.html5
-rw-r--r--apioforum/templates/view_forum.html2
2 files changed, 4 insertions, 3 deletions
diff --git a/apioforum/templates/config_thread.html b/apioforum/templates/config_thread.html
index 383cc9c..0795ccc 100644
--- a/apioforum/templates/config_thread.html
+++ b/apioforum/templates/config_thread.html
@@ -29,7 +29,8 @@
<a href="{{url_for('thread.view_thread',thread_id=thread.id)}}">cancel</a>
</form>
-{% if thread.poll is none and has_permission(thread.forum, g.user, "p_create_polls") %}
+{% if has_permission(thread.forum, g.user, "p_create_polls") %}
+{% if thread.poll is none %}
<h2>create poll</h2>
<form method="post" action="{{url_for('thread.create_poll',thread_id=thread.id)}}">
<fieldset>
@@ -49,7 +50,7 @@
<form action="{{url_for('thread.delete_poll',thread_id=thread.id)}}" method="post">
<input type="submit" value="confirm: delete poll">
</form>
-
+{% endif %}
{% endif %}
{% endblock %}
diff --git a/apioforum/templates/view_forum.html b/apioforum/templates/view_forum.html
index 0994752..c42b7b8 100644
--- a/apioforum/templates/view_forum.html
+++ b/apioforum/templates/view_forum.html
@@ -72,7 +72,7 @@
<p>
{% if has_permission(forum.id, g.user, "p_create_threads") %}
<a class="actionbutton" href="{{url_for('forum.create_thread',forum_id=forum.id)}}">create new thread</a>
-{% elif has_permission(forum.id, g.user "p_create_threads", login_required=False) %}
+{% elif has_permission(forum.id, g.user, "p_create_threads", login_required=False) %}
please log in to create a new thread
{% else %}
you do not have permission to create threads in this forum