From 6c7ddedd342553b53dd98c8de9cbe9e8e2e8cd7c Mon Sep 17 00:00:00 2001 From: Michael Manfre Date: Sun, 27 Nov 2022 13:09:46 -0500 Subject: Post editing --- templates/activities/_post.html | 23 ++++++++++++++++------- templates/activities/compose.html | 3 ++- 2 files changed, 18 insertions(+), 8 deletions(-) (limited to 'templates/activities') diff --git a/templates/activities/_post.html b/templates/activities/_post.html index ebe5696..e294698 100644 --- a/templates/activities/_post.html +++ b/templates/activities/_post.html @@ -18,13 +18,11 @@ {% elif post.visibility == 4 %} {% endif %} - - {% if post.published %} - {{ post.published | timedeltashort }} - {% else %} - {{ post.created | timedeltashort }} - {% endif %} - + {% if post.published %} + {{ post.published | timedeltashort }} + {% else %} + {{ post.created | timedeltashort }} + {% endif %} {% if request.identity %} @@ -32,14 +30,19 @@ {% include "activities/_reply.html" %} {% include "activities/_like.html" %} {% include "activities/_boost.html" %} + {% if post.author == request.identity %} + + Edit + Delete + {% endif %} {% endif %} @@ -57,6 +60,12 @@ {{ post.safe_content_local }} + {% if post.edited %} +
+ Edited {{ post.edited | timedeltashort }} ago +
+ {% endif %} + {% if post.attachments.exists %}
{% for attachment in post.attachments.all %} diff --git a/templates/activities/compose.html b/templates/activities/compose.html index 1a02227..e705f97 100644 --- a/templates/activities/compose.html +++ b/templates/activities/compose.html @@ -12,12 +12,13 @@ {% include "activities/_mini_post.html" with post=reply_to %} {% endif %} {{ form.reply_to }} + {{ form.id }} {% include "forms/_field.html" with field=form.text %} {% include "forms/_field.html" with field=form.content_warning %} {% include "forms/_field.html" with field=form.visibility %}
- +
{% endblock %} -- cgit v1.2.3