{% from 'common/macros.html' import subheader %} {% from 'common/macros.html' import full_post with context %} {%- extends 'base.html' -%} {%- block title -%}inbox{%- endblock -%} {%- block content -%} {%- set topline -%} {%- if unread_count -%} You have {{unread_count}} unread posts across {{subscriptions | length}} threads. {%- elif subscriptions | length > 0 -%} You have no unread posts. {%- else -%} You do not have any subscriptions. {%- endif -%} {%- endset -%} {{ subheader('Your inbox', topline) }} {%- if subscriptions | length > 0 -%}
{%- for sub in subscriptions -%}
{%- set thread = sub.get_thread() -%} {{thread.title}} ({{sub.get_unread_count()}} unread)
Go to thread
{%- set posts = sub.get_full_posts_view() -%} {%- for post in posts -%}
{{full_post(post, show_toolbar=false, show_reactions=false)}}
{%- endfor -%}
{%- endfor -%}
{%- endif -%} {%- endblock -%}