microblog/app/templates/admin_inbox.html

40 lines
1.4 KiB
HTML
Raw Normal View History

2022-06-25 06:23:28 +00:00
{%- import "utils.html" as utils with context -%}
{% extends "layout.html" %}
{% block content %}
2022-06-28 18:10:25 +00:00
{{ utils.display_box_filters("admin_inbox") }}
2022-07-03 20:01:47 +00:00
{% macro actor_action(inbox_object, text) %}
<div class="actor-action">
<a href="{{ url_for("admin_profile") }}?actor_id={{ inbox_object.actor.ap_id }}">{{ inbox_object.actor.display_name }}</a> {{ text }}
<span>{{ inbox_object.ap_published_at | timeago }}</span>
</div>
{% endmacro %}
2022-06-25 06:23:28 +00:00
{% for inbox_object in inbox %}
{% if inbox_object.ap_type == "Announce" %}
2022-07-05 06:33:39 +00:00
{{ actor_action(inbox_object, "shared") }}
2022-06-25 06:23:28 +00:00
{{ utils.display_object(inbox_object.relates_to_anybox_object) }}
{% elif inbox_object.ap_type in ["Article", "Note", "Video"] %}
{{ utils.display_object(inbox_object) }}
2022-06-25 08:20:07 +00:00
{% elif inbox_object.ap_type == "Follow" %}
2022-07-03 20:01:47 +00:00
{{ actor_action(inbox_object, "followed you") }}
2022-06-28 19:10:22 +00:00
{{ utils.display_actor(inbox_object.actor, actors_metadata) }}
2022-07-03 20:01:47 +00:00
{% elif inbox_object.ap_type == "Like" %}
{{ actor_action(inbox_object, "liked one of your post") }}
{{ utils.display_object(inbox_object.relates_to_anybox_object) }}
2022-06-25 06:23:28 +00:00
{% else %}
2022-06-30 07:25:13 +00:00
<p>
2022-06-25 06:23:28 +00:00
Implement {{ inbox_object.ap_type }}
2022-06-30 07:25:13 +00:00
{{ inbox_object.ap_object }}
</p>
2022-06-25 06:23:28 +00:00
{% endif %}
{% endfor %}
2022-06-28 18:10:25 +00:00
{% if next_cursor %}
<p><a href="{{ url_for("admin_inbox") }}?cursor={{ next_cursor }}{% if request.query_params.filter_by %}&filter_by={{ request.query_params.filter_by }}{% endif %}">See more</a></p>
{% endif %}
2022-06-25 06:23:28 +00:00
{% endblock %}