fix for box item parsing issue
This commit is contained in:
3
templates/box-items/box-item-list.html
Normal file
3
templates/box-items/box-item-list.html
Normal file
@@ -0,0 +1,3 @@
|
||||
<tr id="box-item-list">
|
||||
<td>Hooray!</td>
|
||||
</tr>
|
||||
@@ -1,11 +1,12 @@
|
||||
<tr id="boxrow-{{.ID}}" class="border-b dark:border-neutral-500 hover:bg-slate-300 hover:bg-opacity-20">
|
||||
<td
|
||||
hx-get="/box-items?box_id={{ .ID }}"
|
||||
hx-target="#boxrow-{{ .ID }}"
|
||||
hx-swap="afterend"
|
||||
class="whitespace-nowrap px-6 py-4 relative top-0 -left-12 inline-flex items-center h-8 m-2 text-sm text-stone-100 transition-colors duration-150 bg-stone-700 rounded-lg focus:shadow-outline hover:bg-stone-800"
|
||||
>
|
||||
<
|
||||
<td class="whitespace-nowrap px-6 py-4">
|
||||
<button
|
||||
hx-get="/box-items?boxid={{ .ID }}"
|
||||
hx-target="#boxrow-{{ .ID }}"
|
||||
class="inline-flex items-center h-8 px-4 m-2 text-sm text-stone-100 transition-colors duration-150 bg-stone-700 rounded-lg focus:shadow-outline hover:bg-stone-800"
|
||||
>
|
||||
>
|
||||
</button>
|
||||
</td>
|
||||
<td class="whitespace-nowrap px-6 py-4">{{.ID}}</td>
|
||||
<td class="whitespace-nowrap px-6 py-4">{{.Name}}</td>
|
||||
|
||||
@@ -18,7 +18,7 @@
|
||||
<td class="whitespace-nowrap px-6 py-4">...</td>
|
||||
{{ end }}
|
||||
|
||||
<td class="whitespace-nowrap px-6 py-4">
|
||||
<td class="flex whitespace-nowrap px-6 py-4">
|
||||
<button
|
||||
hx-get="/items/edit/{{ .ID }}"
|
||||
hx-target="#datarow-{{ .ID }}"
|
||||
@@ -27,4 +27,15 @@
|
||||
>
|
||||
Edit
|
||||
</button>
|
||||
|
||||
<button
|
||||
hx-delete="/items/delete/{{ .ID }}"
|
||||
hx-confirm="Are you sure?"
|
||||
hx-target="#datarow-{{ .ID }}"
|
||||
hx-swap="delete"
|
||||
class="inline-flex items-center h-8 px-4 m-2 text-sm text-red-100 transition-colors duration-150 bg-red-700 rounded-lg focus:shadow-outline hover:bg-red-800"
|
||||
>
|
||||
Delete
|
||||
</button>
|
||||
</td>
|
||||
</tr>
|
||||
|
||||
Reference in New Issue
Block a user