Adding AugmentedItem notes
This commit is contained in:
1 parent
30a13644ce
commit
34679d53e8
10 files changed
+254
-12
No files matched your search
@@ -0,0 +1,22 @@
|
||||
<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>
|
||||
@@ -61,5 +61,9 @@
|
||||
{% include "admin/_augmented_part_fits.html" %}
|
||||
</div>
|
||||
{% endif %}
|
||||
|
||||
<div class="card">
|
||||
{% include "admin/_augmented_part_notes.html" %}
|
||||
</div>
|
||||
</main>
|
||||
{% endblock %}
|
||||
Reference in new issue
Block a user