From 7c4e6732c97cd1d6a741939776419aea49564103 Mon Sep 17 00:00:00 2001 From: Thomas Sileo Date: Mon, 28 Oct 2019 22:38:29 +0100 Subject: [PATCH] Tweak/fix the list template in the admin UI --- blueprints/admin.py | 6 +++++- templates/stream.html | 6 +++++- 2 files changed, 10 insertions(+), 2 deletions(-) diff --git a/blueprints/admin.py b/blueprints/admin.py index cb5a006..f4290c9 100644 --- a/blueprints/admin.py +++ b/blueprints/admin.py @@ -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, ) ) diff --git a/templates/stream.html b/templates/stream.html index 3e74b1b..4c10761 100644 --- a/templates/stream.html +++ b/templates/stream.html @@ -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 %}
+{% if list_name %} +

{{ list_name }}

+{% endif %} + {% if request.path == url_for('admin.admin_notifications') and unread_notifications_count %}