From 4a2ce3327445c37913f3f905fc6078b38b391bd5 Mon Sep 17 00:00:00 2001 From: Deimos Date: Tue, 29 Jan 2019 00:12:15 -0700 Subject: [PATCH] User page: add a fake title for old deleted topics The script that cleans up old deleted data wipes out the title of deleted topics (along with most of the other data), but this breaks the little headers on a user page that say which topic a comment was in. This just adds a "" marker in place of the title. This should probably be generalized out to other locations eventually too, but this is probably the most prominent place it will be needed. --- tildes/tildes/templates/user.jinja2 | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/tildes/tildes/templates/user.jinja2 b/tildes/tildes/templates/user.jinja2 index 3f2bb9c..6af1afa 100644 --- a/tildes/tildes/templates/user.jinja2 +++ b/tildes/tildes/templates/user.jinja2 @@ -50,7 +50,13 @@ {% if post is topic %} {{ render_topic_for_listing(post, show_group=True) }} {% elif post is comment %} -

Comment on {{ post.topic.title }} in {{ group_linked(post.topic.group.path) }}

+

Comment on + {% if post.topic.is_deleted and not post.topic.title %} + <deleted topic> + {% else %} + {{ post.topic.title }} + {% endif %} + in {{ group_linked(post.topic.group.path) }}

{{ render_single_comment(post) }} {% endif %}