Add thread creation & deletion

This commit is contained in:
David Hoppenbrouwers
2022-10-07 15:20:17 +02:00
parent 6f3b4de047
commit b96db0b905
8 changed files with 129 additions and 17 deletions

View 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 %}

View 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 %}

View File

@@ -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>

View File

@@ -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 %}