Adding AttachmentPointNames

This commit is contained in:
Ian Roddis committed 2026-07-02 13:57:03 -03:00
1 parent ae50ec7049
commit 2767fb1c8e
14 files changed
+406 -3

No files matched your search

@@ -0,0 +1,15 @@
<tr id="attachment-point-name-{{ apn.id }}">
<td>{{ apn.id }}</td>
<td>{{ apn.name }}</td>
<td class="row-actions">
<button class="btn btn-ghost"
hx-get="/admin/attachment-point-names/{{ apn.id }}/edit"
hx-target="#attachment-point-name-{{ apn.id }}"
hx-swap="outerHTML">Edit</button>
<button class="btn btn-danger"
hx-delete="/admin/attachment-point-names/{{ apn.id }}"
hx-target="#attachment-point-name-{{ apn.id }}"
hx-swap="outerHTML"
hx-confirm="Delete {{ apn.name }}?">Delete</button>
</td>
</tr>
@@ -0,0 +1,18 @@
<tr id="attachment-point-name-{{ apn.id }}">
<td colspan="3">
<form hx-post="/admin/attachment-point-names/{{ apn.id }}"
hx-target="#attachment-point-name-{{ apn.id }}"
hx-swap="outerHTML"
class="inline-edit">
<span class="muted">#{{ apn.id }}</span>
<label>Name <input type="text" name="name" value="{{ apn.name }}" required></label>
<div class="row-actions">
<button type="submit" class="btn btn-primary">Save</button>
<button type="button" class="btn btn-ghost"
hx-get="/admin/attachment-point-names/{{ apn.id }}/row"
hx-target="#attachment-point-name-{{ apn.id }}"
hx-swap="outerHTML">Cancel</button>
</div>
</form>
</td>
</tr>
@@ -0,0 +1,18 @@
<div id="attachment-point-name-list" class="card">
<table class="table">
<thead>
<tr>
<th>ID</th>
<th>Name</th>
<th></th>
</tr>
</thead>
<tbody>
{% for apn in attachment_point_names %}
{% include "admin/_attachment_point_name_row.html" %}
{% else %}
<tr><td colspan="3" class="muted">No attachment point names recorded.</td></tr>
{% endfor %}
</tbody>
</table>
</div>
@@ -0,0 +1,21 @@
{% extends "base.html" %}
{% block title %}Attachment Point Names · {{ app_name }}{% endblock %}
{% block body %}
{% include "_nav.html" %}
<main class="container">
<h1>Attachment Point Names</h1>
<div class="card">
<h2>Add attachment point name</h2>
<form hx-post="/admin/attachment-point-names"
hx-target="#attachment-point-name-list"
hx-swap="outerHTML"
class="form-grid">
<label>Name <input type="text" name="name" required></label>
<button type="submit" class="btn btn-primary">Add</button>
</form>
</div>
{% include "admin/_attachment_point_names_table.html" %}
</main>
{% endblock %}