diff --git a/bookwyrm/templates/compose.html b/bookwyrm/templates/compose.html index 7c5d89338..9b0549ed7 100644 --- a/bookwyrm/templates/compose.html +++ b/bookwyrm/templates/compose.html @@ -19,6 +19,10 @@ {% endif %}
+ {% if draft.reply_parent %} + {% include 'snippets/status/status.html' with status=draft.reply_parent no_interact=True %} + {% endif %} + {% if not draft %} {% include 'snippets/create_status.html' %} {% else %} @@ -26,6 +30,5 @@ {% endif %}
-{{ form.ap_p }} {% endwith %} {% endblock %} diff --git a/bookwyrm/templates/snippets/status/status_body.html b/bookwyrm/templates/snippets/status/status_body.html index a7e8e8843..4bbb4afa6 100644 --- a/bookwyrm/templates/snippets/status/status_body.html +++ b/bookwyrm/templates/snippets/status/status_body.html @@ -27,7 +27,8 @@ {% trans "Delete status" %} - + {% elif no_interact %} + {# nothing here #} {% elif request.user.is_authenticated %}
diff --git a/bookwyrm/views/status.py b/bookwyrm/views/status.py index 7ab88f283..d8a3605d1 100644 --- a/bookwyrm/views/status.py +++ b/bookwyrm/views/status.py @@ -104,16 +104,20 @@ class DeleteAndRedraft(View): status = get_object_or_404( models.Status.objects.select_subclasses(), id=status_id ) - if isinstance(status, (models.GeneratedNote, models.Rating)): + if isinstance(status, (models.GeneratedNote, models.ReviewRating)): return HttpResponseBadRequest() # don't let people redraft other people's statuses if status.user != request.user: return HttpResponseBadRequest() + status_type = status.status_type.lower() + if status.reply_parent: + status_type = 'reply' + data = { "draft": status, - "type": status.status_type.lower(), + "type": status_type, } if hasattr(status, "book"): data["book"] = status.book