Improved replies support
This commit is contained in:
parent
7293160b6f
commit
baceb6be6c
11 changed files with 67 additions and 17 deletions
|
@ -2,10 +2,16 @@
|
|||
{% extends "layout.html" %}
|
||||
{% block content %}
|
||||
|
||||
In reply to:
|
||||
{% if in_reply_to_object %}
|
||||
{{ utils.display_object(in_reply_to_object) }}
|
||||
{% endif %}
|
||||
|
||||
<form action="{{ request.url_for("admin_actions_new") }}" enctype="multipart/form-data" method="POST">
|
||||
{{ utils.embed_csrf_token() }}
|
||||
{{ utils.embed_redirect_url() }}
|
||||
<textarea name="content" rows="10" cols="50" autofocus="autofocus" designMode="on" style="font-size:1.2em;width:95%;"></textarea>
|
||||
<input type="hidden" name="in_reply_to" value="{{ request.query_params.in_reply_to }}">
|
||||
<input name="files" type="file" multiple>
|
||||
<input type="submit" value="Publish">
|
||||
</form>
|
||||
|
|
|
@ -20,6 +20,7 @@
|
|||
|
||||
{{ utils.admin_announce_button(inbox_object.ap_id) }}
|
||||
{% endif %}
|
||||
{{ utils.admin_reply_button(inbox_object.ap_id) }}
|
||||
{% endfor %}
|
||||
|
||||
{% endblock %}
|
||||
|
|
|
@ -15,8 +15,8 @@
|
|||
{% if is_admin %}
|
||||
<div id="admin">
|
||||
{% macro admin_link(url, text) %}
|
||||
{% set url_for = request.url_for(url) %}
|
||||
<a href="{{ url_for }}" {% if request.url == url_for %}class="active"{% endif %}>{{ text }}</a>
|
||||
{% set url_for = request.app.router.url_path_for(url) %}
|
||||
<a href="{{ url_for }}" {% if request.url.path == url_for %}class="active"{% endif %}>{{ text }}</a>
|
||||
{% endmacro %}
|
||||
<div style="margin-bottom:30px;">
|
||||
<nav class="flexbox">
|
||||
|
|
|
@ -52,6 +52,13 @@
|
|||
</form>
|
||||
{% endmacro %}
|
||||
|
||||
{% macro admin_reply_button(ap_object_id) %}
|
||||
<form action="/admin/new" method="GET">
|
||||
<input type="hidden" name="in_reply_to" value="{{ ap_object_id }}">
|
||||
<button type="submit">Reply</button>
|
||||
</form>
|
||||
{% endmacro %}
|
||||
|
||||
{% macro display_actor(actor, actors_metadata) %}
|
||||
{{ actors_metadata }}
|
||||
{% set metadata = actors_metadata.get(actor.ap_id) %}
|
||||
|
@ -95,6 +102,7 @@
|
|||
<strong>{{ object.actor.name or object.actor.preferred_username }}</strong>
|
||||
<span>{{ object.actor.handle }}</span>
|
||||
<span class="activity-date" title="{{ object.ap_published_at.isoformat() }}">
|
||||
{{ object.visibility }}
|
||||
<a href="{{ object.url }}">{{ object.ap_published_at | timeago }}</a>
|
||||
</span>
|
||||
<div class="activity-main">
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue