Fix admin buttons in templates

This commit is contained in:
Thomas Sileo 2022-07-30 08:31:27 +02:00
parent fe9e4eebf4
commit 7469188aaf

View file

@ -458,33 +458,35 @@
{{ admin_reply_button(object.ap_id) }} {{ admin_reply_button(object.ap_id) }}
</li> </li>
<li> {% if object.is_from_inbox %}
{% if object.liked_via_outbox_object_ap_id %} <li>
{{ admin_undo_button(object.liked_via_outbox_object_ap_id, "unlike", object.permalink_id) }} {% if object.liked_via_outbox_object_ap_id %}
{% else %} {{ admin_undo_button(object.liked_via_outbox_object_ap_id, "unlike", object.permalink_id) }}
{{ admin_like_button(object.ap_id, object.permalink_id) }} {% else %}
{% endif %} {{ admin_like_button(object.ap_id, object.permalink_id) }}
</li> {% endif %}
</li>
<li> <li>
{% if object.is_bookmarked %} {% if object.is_bookmarked %}
{{ admin_unbookmark_button(object.ap_id, object.permalink_id) }} {{ admin_unbookmark_button(object.ap_id, object.permalink_id) }}
{% else %} {% else %}
{{ admin_bookmark_button(object.ap_id, object.permalink_id) }} {{ admin_bookmark_button(object.ap_id, object.permalink_id) }}
{% endif %} {% endif %}
</li> </li>
<li> <li>
{% if object.announced_via_outbox_object_ap_id %} {% if object.announced_via_outbox_object_ap_id %}
{{ admin_undo_button(object.liked_via_outbox_object_ap_id, "unshare") }} {{ admin_undo_button(object.liked_via_outbox_object_ap_id, "unshare") }}
{% else %} {% else %}
{{ admin_announce_button(object.ap_id, disabled=object.visibility not in [visibility_enum.PUBLIC, visibility_enum.UNLISTED], permalink_id=object.permalink_id) }} {{ admin_announce_button(object.ap_id, disabled=object.visibility not in [visibility_enum.PUBLIC, visibility_enum.UNLISTED], permalink_id=object.permalink_id) }}
{% endif %} {% endif %}
</li> </li>
<li> <li>
{{ admin_profile_button(object.actor.ap_id) }} {{ admin_profile_button(object.actor.ap_id) }}
</li> </li>
{% endif %}
<li> <li>
{{ admin_expand_button(object.ap_id) }} {{ admin_expand_button(object.ap_id) }}
</li> </li>