diff options
author | citrons <citrons@mondecitronne.com> | 2025-06-16 21:25:17 -0500 |
---|---|---|
committer | ubq323 <ubq323@ubq323.website> | 2025-06-17 12:05:16 +0100 |
commit | d3cfe12fc80fc26101b45e7c7eae68c6f33a8977 (patch) | |
tree | e8f9357fb30ddde2390c21dd490f0e3208de9877 /apioforum/templates | |
parent | 314a0e4ed739776b7d3c4ee08d2ceeee8248a421 (diff) |
unify thread creation and modification
principally, allow tags to be added when creating a post.
this should increase usage of tags in general.
Diffstat (limited to 'apioforum/templates')
-rw-r--r-- | apioforum/templates/config_thread.html | 31 |
1 files changed, 25 insertions, 6 deletions
diff --git a/apioforum/templates/config_thread.html b/apioforum/templates/config_thread.html index 3f2939c..cfbd8ef 100644 --- a/apioforum/templates/config_thread.html +++ b/apioforum/templates/config_thread.html @@ -1,13 +1,27 @@ {% extends 'base.html' %} {% from 'common.html' import tag %} -{% block header %}<h1>{% block title %}configure thread '{{thread.title}}'{% endblock %}</h1>{% endblock %} +{% block header %} +<h1> + {% block title %} + {% if thread %}configure thread '{{thread.title}}' + {% else %}create new thread{% endif %} + {% endblock %} +</h1> +{% endblock %} + {% block content %} <h2>thread options</h2> <form method="post"> <fieldset> <legend>title</legend> <label for="title">thread title</label> -<input type="text" id="title" name="title" value="{{thread.title}}"> +<input type="text" id="title" name="title" {%if thread%}value="{{thread.title}}"{%endif%}> +{% if not thread %} + <br> + <label for="content">thread content</label> + <textarea name="content" id="content" class="new-post-box" placeholder="thread content here"></textarea> +{% endif %} + </fieldset> <fieldset> <legend>tags</legend> @@ -24,12 +38,17 @@ <p>there are no available tags.</p> {% endif %} </fieldset> -<p>confirm changes?</p> -<input type="submit" value="confirm"> -<a href="{{url_for('thread.view_thread',thread_id=thread.id)}}">cancel</a> +{% if thread %} + <p>confirm changes?</p> + <input type="submit" value="confirm"> + <a href="{{url_for('thread.view_thread',thread_id=thread.id)}}">cancel</a> +{% else %} + <input type="submit" value="create thread"> + <a href="{{url_for('forum.view_forum',forum_id=forum.id)}}">cancel</a> +{% endif %} </form> -{% if has_permission(thread.forum, g.user, "p_create_polls") %} +{% if thread and 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)}}"> |