aboutsummaryrefslogtreecommitdiff
path: root/app/templates/macros/topictable.html
blob: 8a6b31c4e1480fd779c28106cee719b5fe656de5 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
{% macro render_topictable(topics, show_author=True) -%}
<table>
	<tr>
		<th>Id</th>
		<th></th>
		<th>Title</th>
		{% if show_author %}<th>Author</th>{% endif %}
		<th>Name</th>
		<th>Link</th>
		<th>Actions</th>
	</tr>
	{% for topic in topics %}
		<tr{% if topic.wip %} class="wiptopic"{% endif %}>
			<td>{{ topic.topic_id }}</td>
			<td>
				[{{ topic.type.value }}]
			</td>
			<td>
				<a href="https://forum.minetest.net/viewtopic.php?t={{ topic.topic_id}}">{{ topic.title }}</a>
				{% if topic.wip %}[WIP]{% endif %}
			</td>
			{% if show_author %}
				<td><a href="{{ url_for('user_profile_page', username=topic.author.username) }}">{{ topic.author.display_name}}</a></td>
			{% endif %}
			<td>{{ topic.name or ""}}</td>
			<td>{% if topic.link %}<a href="{{ topic.link }}">{{ topic.link | domain }}</a>{% endif %}</td>
			<td>
				<a href="{{ url_for('create_edit_package_page', author=topic.author.username, repo=topic.getRepoURL(), forums=topic.topic_id, title=topic.title, bname=topic.name) }}">Create</a>
			</td>
		</tr>
	{% endfor %}
</table>
{% endmacro %}