Added a subprojects tab to project info

This commit is contained in:
Jan Böhmer 2022-12-31 14:34:30 +01:00
parent 742b2d3d48
commit 2b1b86eb7e
3 changed files with 51 additions and 1 deletions

View file

@ -0,0 +1,28 @@
<table class="table table-striped table-hover">
<thead>
<tr>
<th>{% trans %}name.label{% endtrans %}</th>
<th>{% trans %}description.label{% endtrans %}</th>
<th># {% trans %}project.info.bom_entries_count{% endtrans %}</th>
<th># {% trans %}project.info.sub_projects_count{% endtrans %}</th>
</tr>
</thead>
<tbody>
{% for subproject in project.children %}
<tr>
<td> {# Name #}
<a href="{{ entity_url(subproject, 'info') }}">{{ subproject.name }}</a>
</td>
<td> {# Description #}
{{ subproject.description | format_markdown }}
</td>
<td>
{{ subproject.bomEntries | length }}
</td>
<td>
{{ subproject.children | length }}
</td>
</tr>
{% endfor %}
</tbody>
</table>