Adding Attachment Points

This commit is contained in:
Ian Roddis committed 2026-07-02 14:06:18 -03:00
1 parent 2767fb1c8e
commit ceae27a12e
15 files changed
+729 -3

No files matched your search

@@ -0,0 +1,38 @@
{% 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.augmented_part.description | truncate(40) }}</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>