1 {% macro render_thread(thread, current_user) -%}
3 {% for r in thread.replies %}
5 <a class="author {{ r.author.rank.name }}"
6 href="{{ url_for('user_profile_page', username=r.author.username) }}">{{ r.author.display_name }}</a>
14 {% if current_user.is_authenticated %}
15 <form method="post" action="{{ url_for('thread_page', id=thread.id)}}" class="comment_form">
16 <input type="hidden" name="csrf_token" value="{{ csrf_token() }}" />
17 <textarea required maxlength=500 name="comment"></textarea><br />
18 <input type="submit" value="Comment" />
23 {% macro render_threadlist(threads) -%}
25 {% for t in threads %}
26 <li><a href="{{ url_for('thread_page', id=t.id) }}">{{ t.title }}</a> by {{ t.author.display_name }}</li>