Add delete support for the outbox
This commit is contained in:
@@ -16,6 +16,7 @@
|
||||
<div class="actor-action">You followed</div>
|
||||
{{ utils.display_actor(outbox_object.relates_to_actor, actors_metadata) }}
|
||||
{% elif outbox_object.ap_type in ["Article", "Note", "Video"] %}
|
||||
{% if outbox_object.is_deleted %}Deleted{% endif %}
|
||||
{{ utils.display_object(outbox_object) }}
|
||||
{% else %}
|
||||
Implement {{ outbox_object.ap_type }}
|
||||
|
@@ -60,6 +60,15 @@
|
||||
</form>
|
||||
{% endmacro %}
|
||||
|
||||
{% macro admin_delete_button(ap_object_id) %}
|
||||
<form action="{{ request.url_for("admin_actions_delete") }}" method="POST" onsubmit="return confirm('Do you really want to delete this object?');">
|
||||
{{ embed_csrf_token() }}
|
||||
{{ embed_redirect_url() }}
|
||||
<input type="hidden" name="ap_object_id" value="{{ ap_object_id }}">
|
||||
<input type="submit" value="Delete">
|
||||
</form>
|
||||
{% endmacro %}
|
||||
|
||||
{% macro admin_announce_button(ap_object_id, disabled=False) %}
|
||||
<form action="{{ request.url_for("admin_actions_announce") }}" method="POST">
|
||||
{{ embed_csrf_token() }}
|
||||
@@ -320,6 +329,9 @@
|
||||
</div>
|
||||
|
||||
{% if is_admin %}
|
||||
<div class="bar-item">
|
||||
{{ admin_delete_button(object.ap_id) }}
|
||||
</div>
|
||||
<div class="bar-item">
|
||||
{{ admin_reply_button(object.ap_id) }}
|
||||
</div>
|
||||
|
Reference in New Issue
Block a user