connector: support additional_components

This commit is contained in:
Laurier Loiselle 2023-04-20 17:33:08 -04:00
parent 3a3f609c41
commit f3b50928dc
No known key found for this signature in database
GPG Key ID: 345920CC72089A3F
3 changed files with 24 additions and 0 deletions

View File

@ -0,0 +1,16 @@
<table border="0" cellborder="0" cellpadding="3" cellspacing="0" >
{% for subitem in additional_components %}
<tr>
{% if subitem.bom_entry.id %}
<td align="right" > {{ subitem.bom_entry.id }} </td>
{% endif %}
<td align="right" > {{ subitem.bom_entry.qty.number }} </td>
{% if subitem.bom_entry.qty.unit %}
<td align="left" > {{ subitem.bom_entry.qty.unit }} </td>
{% else %}
<td align="left" > </td>
{% endif %}
<td align="left" > {{ subitem.bom_entry.description }} </td>
</tr>
{% endfor %}
</table>

View File

@ -69,6 +69,13 @@
</tr>
{% endif %}
<!-- Additional Components !-->
{% if additional_components %}
<tr>
<td>
{% include "additional_components.html" %}
</td>
</tr>
{% endif %}
<!-- Notes !-->
{% if line_notes %}
<tr>

View File

@ -111,6 +111,7 @@ def gv_node_connector(connector: Connector) -> Table:
'color_len': len(connector.color),
'image': connector.image,
'line_notes': html_line_breaks(connector.notes),
'additional_components': connector.additional_components,
}
# TODO: extend connector style support
is_simple_connector = connector.style == 'simple'