22
app/templates/threads/delete_thread.html
Normal file
22
app/templates/threads/delete_thread.html
Normal file
@@ -0,0 +1,22 @@
|
||||
{% extends "base.html" %}
|
||||
|
||||
{% block title %}
|
||||
Delete thread in {{ thread.title }}
|
||||
{% endblock %}
|
||||
|
||||
{% block content %}
|
||||
<form method="POST" action="" class="card box_grey">
|
||||
<input type="hidden" name="csrf_token" value="{{ csrf_token() }}" />
|
||||
|
||||
<h3 class="card-header">Delete {{ thread.title }} by {{ thread.author.display_name }}</h3>
|
||||
<div class="card-body">
|
||||
{{ thread.replies[0].comment | markdown }}
|
||||
</div>
|
||||
<div class="card-body">
|
||||
<p>Deleting is permanent</p>
|
||||
|
||||
<a class="btn btn-secondary mr-3" href="{{ thread.getViewURL() }}">Cancel</a>
|
||||
<input type="submit" value="Delete" class="btn btn-danger" />
|
||||
</div>
|
||||
</form>
|
||||
{% endblock %}
|
||||
@@ -17,16 +17,19 @@
|
||||
<input type="submit" class="btn btn-primary" value="Subscribe" />
|
||||
</form>
|
||||
{% endif %}
|
||||
{% if thread and thread.checkPerm(current_user, "DELETE_THREAD") %}
|
||||
<a href="{{ url_for('threads.delete_thread', id=thread.id) }}" class="float-right mr-2 btn btn-danger">{{ _('Delete') }}</a>
|
||||
{% endif %}
|
||||
{% if thread and thread.checkPerm(current_user, "LOCK_THREAD") %}
|
||||
{% if thread.locked %}
|
||||
<form method="post" action="{{ url_for('threads.set_lock', id=thread.id, lock=0) }}" class="float-right mr-2">
|
||||
<input type="hidden" name="csrf_token" value="{{ csrf_token() }}" />
|
||||
<input type="submit" class="btn btn-secondary" value="{{ _('Unlock Thread') }}" />
|
||||
<input type="submit" class="btn btn-secondary" value="{{ _('Unlock') }}" />
|
||||
</form>
|
||||
{% else %}
|
||||
<form method="post" action="{{ url_for('threads.set_lock', id=thread.id, lock=1) }}" class="float-right mr-2">
|
||||
<input type="hidden" name="csrf_token" value="{{ csrf_token() }}" />
|
||||
<input type="submit" class="btn btn-secondary" value="{{ _('Lock Thread') }}" />
|
||||
<input type="submit" class="btn btn-secondary" value="{{ _('Lock') }}" />
|
||||
</form>
|
||||
{% endif %}
|
||||
{% endif %}
|
||||
|
||||
Reference in New Issue
Block a user