{% macro render_topics_table(topics, show_author=True, show_discard=False, current_user=current_user) -%} {% if show_author %}{% endif %} {% for topic in topics %} {% if show_author %} {% endif %} {% endfor %}
TitleAuthorName Date Actions
[{{ topic.type.value }}] {{ topic.title }} {% if topic.wip %}[WIP]{% endif %} {{ topic.author.display_name}}{{ topic.name or ""}} {{ topic.created_at | date }} {% if current_user == topic.author or topic.author.checkPerm(current_user, "CHANGE_AUTHOR") %} Create {% endif %} {% if show_discard and current_user.is_authenticated and topic.checkPerm(current_user, "TOPIC_DISCARD") %} {% if topic.discarded %} Show {% else %} Discard {% endif %} {% endif %} {% if topic.link %} {{ topic.link | domain | truncate(18) }} {% endif %}
{% endmacro %} {% macro render_topics(topics, current_user, show_author=True) -%} {% endmacro %}