{% from "common/macros.html" import timestamp, full_post, accordion %} {% extends "base.html" %} {% block title %}inbox{% endblock %} {% block content %}
{% set has_subscriptions = all_subscriptions is not none %} {% call(section) accordion(disabled=not has_subscriptions) %} {% if section == "header" %} {% if not has_subscriptions %} (You have no subscriptions) {% else %} Your subscriptions {% endif %} {% elif section == "content" and has_subscriptions %} {% for sub in all_subscriptions %} {% endfor %}
Thread Unsubscribe
{{ sub.thread_title }}
{% endif %} {% endcall %} {% if has_subscriptions %} {% if not new_posts %} You have no unread posts. {% else %} You have {{ total_unreads_count }} total unread {{("post" | pluralize(num=total_unreads_count))}}: {% for thread in new_posts %} {% call(section) accordion() %} {% if section == "header" %} {% set latest_post_id = thread.posts[-1].id %} {% set unread_posts_text = " (" + (thread.unread_count | string) + (" unread post" | pluralize(num=thread.unread_count)) %} {{thread.thread_title + unread_posts_text}}, latest at {{ timestamp(thread.newest_post_time) }})
{% elif section == "content" %} {% for post in thread.posts %} {{ full_post(post, no_reply = true) }} {% endfor %} {% endif %} {% endcall %} {% endfor %} {% endif %} {% endif %}
{% endblock %}