Adding on_website and preferred part indicators

This commit is contained in:
Ian Roddis committed 2026-09-21 14:01:23 -03:00
1 parent 13b64a2d17
commit 4fd2bb1b58
13 files changed
+331 -6

No files matched your search

@@ -8,6 +8,8 @@
<td>{{ ap.part_type.name }}</td>
<td>{{ ap.sub_part_type.name if ap.sub_part_type else '—' }}</td>
<td>{% if ap.archived %}<span class="tag">Archived</span>{% else %}—{% endif %}</td>
<td>{% if ap.on_website %}<span class="tag">Yes</span>{% else %}—{% endif %}</td>
<td>{% if ap.preferred_part %}<span class="tag">Yes</span>{% else %}—{% endif %}</td>
<td class="row-actions">
<button class="btn btn-ghost"
hx-get="/admin/augmented-parts/{{ ap.id }}/edit"
@@ -1,5 +1,5 @@
<tr id="augmented-part-{{ ap.id }}">
<td colspan="10">
<td colspan="12">
<form id="augmented-part-edit-form-{{ ap.id }}"
hx-post="/admin/augmented-parts/{{ ap.id }}"
hx-target="#augmented-part-{{ ap.id }}"
@@ -45,6 +45,8 @@
{% endfor %}
</select>
</label>
<label class="check"><input type="checkbox" name="on_website" value="true" {{ "checked" if ap.on_website }}> On website</label>
<label class="check"><input type="checkbox" name="preferred_part" value="true" {{ "checked" if ap.preferred_part }}> Preferred part</label>
<div class="row-actions">
<button type="submit" class="btn btn-primary">Save</button>
<button type="button" class="btn btn-ghost"
@@ -44,6 +44,7 @@
{% endfor %}
</select>
<label><input type="checkbox" name="include_archived" {{ "checked" if include_archived }}> Show archived</label>
<label><input type="checkbox" name="on_website" {{ "checked" if on_website }}> On website</label>
</form>
</div>
@@ -13,6 +13,8 @@
{{ sort_th("part_type", "Type", sort_headers) }}
{{ sort_th("sub_part_type", "Sub Type", sort_headers) }}
<th>Archived</th>
<th>On Website</th>
<th>Preferred</th>
<th></th>
</tr>
</thead>
@@ -20,7 +22,7 @@
{% for ap in augmented_parts %}
{% include "admin/_augmented_part_row.html" %}
{% else %}
<tr><td colspan="10" class="muted">No augmented parts recorded.</td></tr>
<tr><td colspan="12" class="muted">No augmented parts recorded.</td></tr>
{% endfor %}
</tbody>
</table>
@@ -11,6 +11,8 @@
<span class="tag">{{ ap.part_type.name }}</span>
{% if ap.sub_part_type %}<span class="tag">{{ ap.sub_part_type.name }}</span>{% endif %}
{% if ap.archived %}<span class="tag">Archived</span>{% endif %}
{% if ap.on_website %}<span class="tag">On website</span>{% endif %}
{% if ap.preferred_part %}<span class="tag">Preferred</span>{% endif %}
{% if ap.description %}{{ ap.description }}{% endif %}
</p>
+2
View File
@@ -50,6 +50,8 @@
{% endfor %}
</select>
</label>
<label class="check"><input type="checkbox" name="on_website" value="true"> On website</label>
<label class="check"><input type="checkbox" name="preferred_part" value="true"> Preferred part</label>
<button type="submit" class="btn btn-primary">Add</button>
</form>
</div>