summaryrefslogtreecommitdiffstats
path: root/adenosine-pds/templates/thread.html
blob: 9a3f935fb2765c9349b6abc96d3af271258aead7 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
{% extends "base.html" %}
{% import "macro.html" as macro %}

{% block main %}

{% if post.parent.is_some() %}
  {% let parent = post.parent.as_ref().unwrap() %}
  {% if parent.post.is_some() %}
    {% call macro::feed_item(parent.post.as_ref().unwrap()) %}
  {% else %}
    <p>Post not found!
  {% endif %}
  <center><i>---</i></center>
{% endif %}

{% if post.post.is_some() %}
  {% call macro::feed_item(post.post.as_ref().unwrap()) %}
{% else %}
  <p>Post not found!
{% endif %}

{% if post.replies.is_some() && post.replies.as_ref().unwrap().len() > 0 %}
  <center><i>--- replies ---</i></center>
  {% for item in post.replies.as_ref().unwrap() %}
    {% if item.post.is_some() %}
      {% call macro::feed_item(item.post.as_ref().unwrap()) %}
    {% else %}
      <p>Post not found!
    {% endif %}
  {% endfor %}
{% endif %}

{% endblock %}