creating threads
This commit is contained in:
@ -6,13 +6,18 @@
|
||||
<h1 class="thread-title">All threads in "{{topic['name']}}"</h1>
|
||||
<span>{{topic['description']}}</span>
|
||||
<div>
|
||||
{% if active_user and active_user.is_mod() %}
|
||||
<a class="linkbutton" href="{{url_for("topics.edit", slug=topic['slug'])}}">Edit topic</a>
|
||||
<form class="modform" method="post" action="{{url_for("topics.edit", slug=topic['slug']) }}">
|
||||
<input type="hidden" name="is_locked" value="{{ (not topic.is_locked) | int }}">
|
||||
<input class="warn" type="submit" id="lock" value="{{"Unlock topic" if topic['is_locked'] else "Lock topic"}}">
|
||||
</form>
|
||||
<button type="button" class="critical" id="topic-delete-dialog-open">Delete</button>
|
||||
{% if active_user %}
|
||||
{% if not (topic['is_locked']) | int or active_user.is_mod() %}
|
||||
<a class="linkbutton" href="{{ url_for("threads.create", topic_id=topic['id']) }}">New thread</a>
|
||||
{% endif %}
|
||||
{% if active_user.is_mod() %}
|
||||
<a class="linkbutton" href="{{url_for("topics.edit", slug=topic['slug'])}}">Edit topic</a>
|
||||
<form class="modform" method="post" action="{{url_for("topics.edit", slug=topic['slug']) }}">
|
||||
<input type="hidden" name="is_locked" value="{{ (not topic.is_locked) | int }}">
|
||||
<input class="warn" type="submit" id="lock" value="{{"Unlock topic" if topic['is_locked'] else "Lock topic"}}">
|
||||
</form>
|
||||
<button type="button" class="critical" id="topic-delete-dialog-open">Delete</button>
|
||||
{% endif %}
|
||||
{% endif %}
|
||||
</div>
|
||||
</nav>
|
||||
|
Reference in New Issue
Block a user