{% macro render_topics_table(topics, show_author=True, current_user=current_user, class_=None) -%} {% if show_author %}{% endif %} {% for topic in topics %} {% if show_author %} {% endif %} {% endfor %}
{{ _("Title") }}{{ _("Author") }}{{ _("Name") }} {{ _("Date") }} {{ _("Actions") }}
[{{ topic.type.text }}] {{ 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.check_perm(current_user, "CHANGE_AUTHOR") %} {{ _("Create") }} {% endif %} {% if topic.link %} {{ topic.link | domain | truncate(18) }} {% endif %}
{% endmacro %} {% macro render_topics(topics, current_user) -%}
{% for topic in topics %} {{ topic.created_at | date }} {% set title %} {{ topic.title }} {% endset %} {{ _("%(title)s by %(author)s", title=title, author=topic.author.display_name) }} {% if topic.wip %}[{{ _("WIP") }}]{% endif %} {% if topic.name %}[{{ topic.name }}]{% endif %} {% endfor %}
{% endmacro %}