From 7469188aaf122f35128944276bcbcf87dcd42a7a Mon Sep 17 00:00:00 2001 From: Thomas Sileo Date: Sat, 30 Jul 2022 08:31:27 +0200 Subject: [PATCH] Fix admin buttons in templates --- app/templates/utils.html | 50 +++++++++++++++++++++------------------- 1 file changed, 26 insertions(+), 24 deletions(-) diff --git a/app/templates/utils.html b/app/templates/utils.html index 2bc5b4a..5c1726c 100644 --- a/app/templates/utils.html +++ b/app/templates/utils.html @@ -458,33 +458,35 @@ {{ admin_reply_button(object.ap_id) }} -
  • - {% if object.liked_via_outbox_object_ap_id %} - {{ admin_undo_button(object.liked_via_outbox_object_ap_id, "unlike", object.permalink_id) }} - {% else %} - {{ admin_like_button(object.ap_id, object.permalink_id) }} - {% endif %} -
  • + {% if object.is_from_inbox %} +
  • + {% if object.liked_via_outbox_object_ap_id %} + {{ admin_undo_button(object.liked_via_outbox_object_ap_id, "unlike", object.permalink_id) }} + {% else %} + {{ admin_like_button(object.ap_id, object.permalink_id) }} + {% endif %} +
  • -
  • - {% if object.is_bookmarked %} - {{ admin_unbookmark_button(object.ap_id, object.permalink_id) }} - {% else %} - {{ admin_bookmark_button(object.ap_id, object.permalink_id) }} - {% endif %} -
  • +
  • + {% if object.is_bookmarked %} + {{ admin_unbookmark_button(object.ap_id, object.permalink_id) }} + {% else %} + {{ admin_bookmark_button(object.ap_id, object.permalink_id) }} + {% endif %} +
  • -
  • - {% if object.announced_via_outbox_object_ap_id %} - {{ admin_undo_button(object.liked_via_outbox_object_ap_id, "unshare") }} - {% else %} - {{ admin_announce_button(object.ap_id, disabled=object.visibility not in [visibility_enum.PUBLIC, visibility_enum.UNLISTED], permalink_id=object.permalink_id) }} - {% endif %} -
  • +
  • + {% if object.announced_via_outbox_object_ap_id %} + {{ admin_undo_button(object.liked_via_outbox_object_ap_id, "unshare") }} + {% else %} + {{ admin_announce_button(object.ap_id, disabled=object.visibility not in [visibility_enum.PUBLIC, visibility_enum.UNLISTED], permalink_id=object.permalink_id) }} + {% endif %} +
  • -
  • - {{ admin_profile_button(object.actor.ap_id) }} -
  • +
  • + {{ admin_profile_button(object.actor.ap_id) }} +
  • + {% endif %}
  • {{ admin_expand_button(object.ap_id) }}