38 lines
1.5 KiB
HTML
38 lines
1.5 KiB
HTML
{% if ap.iso_thread %}
|
||
{% set conn_type = "ISO Thread" %}
|
||
{% set conn_label = "M" ~ ap.iso_thread.diameter_mm ~ "×" ~ ap.iso_thread.pitch_mm %}
|
||
{% elif ap.unc_thread %}
|
||
{% set conn_type = "UNC Thread" %}
|
||
{% set conn_label = ap.unc_thread.diameter_fraction ~ "-" ~ ap.unc_thread.tpi ~ " " ~ ap.unc_thread.series.value %}
|
||
{% elif ap.clamp_connection %}
|
||
{% set conn_type = "Clamp Connection" %}
|
||
{% if ap.clamp_connection.min_mm is not none %}
|
||
{% set conn_label = ap.clamp_connection.min_mm ~ "–" ~ ap.clamp_connection.max_mm ~ " mm" %}
|
||
{% else %}
|
||
{% set conn_label = ap.clamp_connection.min_in ~ "–" ~ ap.clamp_connection.max_in ~ " in" %}
|
||
{% endif %}
|
||
{% elif ap.static_connection %}
|
||
{% set conn_type = "Static Connection" %}
|
||
{% set conn_label = ap.static_connection.od_mm ~ " mm OD" %}
|
||
{% else %}
|
||
{% set conn_type = "—" %}
|
||
{% set conn_label = "—" %}
|
||
{% endif %}
|
||
<tr id="attachment-point-{{ ap.id }}">
|
||
<td>{{ ap.id }}</td>
|
||
<td>{{ ap.attachment_point_name.name }}</td>
|
||
<td>{{ conn_type }}</td>
|
||
<td><code>{{ conn_label }}</code></td>
|
||
<td class="row-actions">
|
||
<button class="btn btn-ghost"
|
||
hx-get="/admin/attachment-points/{{ ap.id }}/edit"
|
||
hx-target="#attachment-point-{{ ap.id }}"
|
||
hx-swap="outerHTML">Edit</button>
|
||
<button class="btn btn-danger"
|
||
hx-delete="/admin/attachment-points/{{ ap.id }}"
|
||
hx-target="#attachment-point-{{ ap.id }}"
|
||
hx-swap="outerHTML"
|
||
hx-confirm="Delete attachment point #{{ ap.id }}?">Delete</button>
|
||
</td>
|
||
</tr>
|