From 6942f47747f8655cf0702422f457f0476ab29c41 Mon Sep 17 00:00:00 2001 From: bryan newbold Date: Sat, 4 Mar 2023 19:30:05 -0800 Subject: pds: updates for Thread schema hacks (for CLI) --- adenosine-pds/templates/thread.html | 19 ++++++++++++++++--- 1 file changed, 16 insertions(+), 3 deletions(-) (limited to 'adenosine-pds/templates') diff --git a/adenosine-pds/templates/thread.html b/adenosine-pds/templates/thread.html index c0a8684..9a3f935 100644 --- a/adenosine-pds/templates/thread.html +++ b/adenosine-pds/templates/thread.html @@ -4,16 +4,29 @@ {% block main %} {% if post.parent.is_some() %} - {% call macro::feed_item(post.parent.as_ref().unwrap().post) %} + {% let parent = post.parent.as_ref().unwrap() %} + {% if parent.post.is_some() %} + {% call macro::feed_item(parent.post.as_ref().unwrap()) %} + {% else %} +

Post not found! + {% endif %}

---
{% endif %} -{% call macro::feed_item(post.post) %} +{% if post.post.is_some() %} + {% call macro::feed_item(post.post.as_ref().unwrap()) %} +{% else %} +

Post not found! +{% endif %} {% if post.replies.is_some() && post.replies.as_ref().unwrap().len() > 0 %}

--- replies ---
{% for item in post.replies.as_ref().unwrap() %} - {% call macro::feed_item(item.post) %} + {% if item.post.is_some() %} + {% call macro::feed_item(item.post.as_ref().unwrap()) %} + {% else %} +

Post not found! + {% endif %} {% endfor %} {% endif %} -- cgit v1.2.3