Add thread creation & deletion
This commit is contained in:
11
templates/confirm_delete_thread.html
Normal file
11
templates/confirm_delete_thread.html
Normal file
@@ -0,0 +1,11 @@
|
||||
{% extends 'base.html' %}
|
||||
|
||||
{% block content %}
|
||||
<p>Are you sure you want to delete "{{ thread_title }}"?</p>
|
||||
<form method="post" action="../delete">
|
||||
<input type="submit" value="Yes">
|
||||
</form>
|
||||
<form method="get" action="..">
|
||||
<input type="submit" value="No">
|
||||
</form>
|
||||
{% endblock %}
|
||||
9
templates/new_thread.html
Normal file
9
templates/new_thread.html
Normal file
@@ -0,0 +1,9 @@
|
||||
{% extends 'base.html' %}
|
||||
|
||||
{% block content %}
|
||||
<form method="post">
|
||||
<input type="text" name="title">
|
||||
<textarea name="text"></textarea>
|
||||
<input type="submit" value="Post">
|
||||
</form>
|
||||
{% endblock %}
|
||||
@@ -2,6 +2,7 @@
|
||||
|
||||
{% block content %}
|
||||
<p>{{ description }}</p>
|
||||
<a href="{{ url_for('new_thread', forum_id = forum_id) }}">Create thread</a>
|
||||
<ul>
|
||||
{% for id, title in threads %}
|
||||
<li><a href="{{ url_for('thread', thread_id = id) }}">{{ title }}</a></li>
|
||||
|
||||
@@ -11,6 +11,13 @@
|
||||
{% endmacro %}
|
||||
|
||||
{% block content %}
|
||||
{% if manage %}
|
||||
<div>
|
||||
<form method="get" action="confirm_delete/">
|
||||
<input type="submit" value="Delete">
|
||||
</form>
|
||||
</div>
|
||||
{% endif %}
|
||||
<p>{{ author }} - rjgoire</p>
|
||||
<p>{{ text }}</p>
|
||||
{% for c in comments %}
|
||||
|
||||
Reference in New Issue
Block a user