connector: support additional_components
This commit is contained in:
parent
3a3f609c41
commit
f3b50928dc
16
src/wireviz/templates/additional_components.html
generated
Normal file
16
src/wireviz/templates/additional_components.html
generated
Normal 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>
|
||||||
7
src/wireviz/templates/connector.html
generated
7
src/wireviz/templates/connector.html
generated
@ -69,6 +69,13 @@
|
|||||||
</tr>
|
</tr>
|
||||||
{% endif %}
|
{% endif %}
|
||||||
<!-- Additional Components !-->
|
<!-- Additional Components !-->
|
||||||
|
{% if additional_components %}
|
||||||
|
<tr>
|
||||||
|
<td>
|
||||||
|
{% include "additional_components.html" %}
|
||||||
|
</td>
|
||||||
|
</tr>
|
||||||
|
{% endif %}
|
||||||
<!-- Notes !-->
|
<!-- Notes !-->
|
||||||
{% if line_notes %}
|
{% if line_notes %}
|
||||||
<tr>
|
<tr>
|
||||||
|
|||||||
@ -111,6 +111,7 @@ def gv_node_connector(connector: Connector) -> Table:
|
|||||||
'color_len': len(connector.color),
|
'color_len': len(connector.color),
|
||||||
'image': connector.image,
|
'image': connector.image,
|
||||||
'line_notes': html_line_breaks(connector.notes),
|
'line_notes': html_line_breaks(connector.notes),
|
||||||
|
'additional_components': connector.additional_components,
|
||||||
}
|
}
|
||||||
# TODO: extend connector style support
|
# TODO: extend connector style support
|
||||||
is_simple_connector = connector.style == 'simple'
|
is_simple_connector = connector.style == 'simple'
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user