23 lines
888 B
HTML
23 lines
888 B
HTML
<div id="ap-{{ augmented_part_id }}-notes" class="ap-inline-section">
|
|
<h3>Notes</h3>
|
|
|
|
<div class="fit-notes">
|
|
{% for note in notes %}
|
|
<div class="fit-note">
|
|
<span class="fit-note-meta">{{ note.username }} · {{ note.created_at.strftime("%Y-%m-%d %H:%M") }}</span>
|
|
<p class="fit-note-body">{{ note.body }}</p>
|
|
</div>
|
|
{% else %}
|
|
<p class="muted" style="font-size:0.85rem;margin:0 0 0.5rem">No notes recorded yet.</p>
|
|
{% endfor %}
|
|
{% if can_write_notes %}
|
|
<form hx-post="/admin/augmented-parts/{{ augmented_part_id }}/notes"
|
|
hx-target="#ap-{{ augmented_part_id }}-notes" hx-swap="outerHTML"
|
|
class="inline-edit fit-note-form">
|
|
<input type="text" name="body" placeholder="Add a note…" required>
|
|
<button type="submit" class="btn btn-ghost">Add note</button>
|
|
</form>
|
|
{% endif %}
|
|
</div>
|
|
</div>
|