add edit thread routes

This commit is contained in:
2026-04-29 21:42:22 +03:00
parent 648b310e13
commit d74dd6c5f3
3 changed files with 31 additions and 10 deletions

View File

@@ -22,7 +22,7 @@
<legend>Actions</legend>
{%- if is_logged_in() -%}
{%- if thread.user_id == get_active_user().id -%}
<a class="linkbutton" href="{{url_for('threads.edit', thread_id=thread.id)}}">Edit</a>
<a class="linkbutton" href="{{url_for('threads.edit', thread_id=thread.id)}}">Rename</a>
{%- endif -%}
<form action="{{url_for('threads.subscribe' if not get_active_user().is_subscribed(thread.id) else 'threads.unsubscribe', thread_id=thread.id)}}" method="POST">
<input type="hidden" name="last_post_timestamp" value="{{last_post.created_at}}">
@@ -37,7 +37,7 @@
<fieldset class="plank even no-shadow minimal thread-actions">
<legend>Moderation actions</legend>
{%- if thread.user_id != get_active_user().id -%}
<a class="linkbutton warn" href="{{url_for('threads.edit', thread_id=thread.id)}}">Edit</a>
<a class="linkbutton warn" href="{{url_for('threads.edit', thread_id=thread.id)}}">Rename</a>
{%- endif -%}
<form method="POST">
<input type="hidden" name="lock" value="{{(not thread.locked()) | int}}">