From dfbcbbbb476cbbd467cabb1e36ea56ee84c99b43 Mon Sep 17 00:00:00 2001 From: rubenwardy Date: Sat, 11 Jul 2020 03:52:56 +0100 Subject: Add ability to edit comments --- app/templates/macros/threads.html | 14 +++++++++++++- app/templates/threads/edit_reply.html | 17 +++++++++++++++++ 2 files changed, 30 insertions(+), 1 deletion(-) create mode 100644 app/templates/threads/edit_reply.html (limited to 'app/templates') diff --git a/app/templates/macros/threads.html b/app/templates/macros/threads.html index e94cded..21283d7 100644 --- a/app/templates/macros/threads.html +++ b/app/templates/macros/threads.html @@ -22,8 +22,20 @@
+ {% if current_user == thread.author and thread.review and thread.replies[0] == r %} + + + + {% elif r.checkPerm(current_user, "EDIT_REPLY") %} + + + + {% endif %} + {% if r.checkPerm(current_user, "DELETE_REPLY") %} - diff --git a/app/templates/threads/edit_reply.html b/app/templates/threads/edit_reply.html new file mode 100644 index 0000000..9e92375 --- /dev/null +++ b/app/templates/threads/edit_reply.html @@ -0,0 +1,17 @@ +{% extends "base.html" %} + +{% block title %} + {{ _("Edit reply") }} - {{ thread.title }} +{% endblock %} + +{% block content %} +

{{ _("Edit reply") }}

+ + {% from "macros/forms.html" import render_field, render_submit_field %} +
+ {{ form.hidden_tag() }} + + {{ render_field(form.comment, label="", class_="m-0", fieldclass="form-control markdown") }}
+ {{ render_submit_field(form.submit) }} +
+{% endblock %} -- cgit v1.2.3