Move decoder interface def into rolling stock

This commit is contained in:
2022-11-01 00:05:47 +01:00
parent 90ffadb2ab
commit 242fe6814d
8 changed files with 80 additions and 12 deletions

View File

@@ -102,7 +102,7 @@
</tr>
</tbody>
</table>
{% if rolling_stock.decoder %}
{% if rolling_stock.decoder or rolling_stock.decoder_interface %}
<table class="table table-striped">
<thead>
<tr>
@@ -111,13 +111,19 @@
</thead>
<tbody>
<tr>
<th width="35%" scope="row">Decoder</th>
<th width="35%" scope="row">Interface</th>
<td>{{ rolling_stock.get_decoder_interface_display }}</td>
</tr>
{% if rolling_stock.decoder %}
<tr>
<th scope="row">Decoder</th>
<td>{{ rolling_stock.decoder }}</td>
</tr>
<tr>
<th scope="row">Address</th>
<td>{{ rolling_stock.address }}</td>
</tr>
{% endif %}
</tbody>
</table>
{% endif %}
@@ -230,6 +236,10 @@
</tr>
</thead>
<tbody>
<tr>
<th scope="row">Interface</th>
<td>{{ rolling_stock.get_decoder_interface_display }}</td>
</tr>
<tr>
<th width="35%" scope="row">Address</th>
<td>{{ rolling_stock.address }}</td>
@@ -246,10 +256,6 @@
<th scope="row">Version</th>
<td>{{ rolling_stock.decoder.version }}</td>
</tr>
<tr>
<th scope="row">Interface</th>
<td>{{ rolling_stock.decoder.get_interface_display }}</td>
</tr>
<tr>
<th scope="row">Sound</th>
<td>{{ rolling_stock.decoder.sound | yesno:"Yes,No" }}</td>