~tsileo/microblog.pub

7c4e6732c97cd1d6a741939776419aea49564103 — Thomas Sileo 8 months ago e611d61
Tweak/fix the list template in the admin UI
2 files changed, 10 insertions(+), 2 deletions(-)

M blueprints/admin.py
M templates/stream.html
M blueprints/admin.py => blueprints/admin.py +5 -1
@@ 581,7 581,11 @@ def admin_list(name: str) -> _Response:

    return htmlify(
        render_template(
            tpl, inbox_data=inbox_data, older_than=older_than, newer_than=newer_than
            tpl,
            inbox_data=inbox_data,
            older_than=older_than,
            newer_than=newer_than,
            list_name=name,
        )
    )


M templates/stream.html => templates/stream.html +5 -1
@@ 1,10 1,14 @@
{% extends "layout.html" %}
{% import 'utils.html' as utils %}
{% block title %}{% if request.path == url_for('admin.admin_stream') %}Stream{% elif actor_id %}Profile {{ actor.name }}{% else %}Notifications{% endif %} - {{ config.NAME }}{% endblock %}
{% block title %}{% if request.path == url_for('admin.admin_stream') %}Stream{% elif actor_id %}Profile {{ actor.name }}{% elif list_name %}List {{ list_name }}{% else %}Notifications{% endif %} - {{ config.NAME }}{% endblock %}
{% block content %}
<div class="h-feed" id="container">
<div id="admin">

{% if list_name %}
<h3>{{ list_name }}</h3>
{% endif %}

{% if request.path == url_for('admin.admin_notifications') and unread_notifications_count %}
<div style="clear:both;padding-bottom:60px;">
<form action="/api/mark_notifications_as_read" method="POST">