| 1 |
<tr class="edit-row" id="edit-row-{{ item.id }}"> |
| 2 |
<td>{{ item.position }}</td> |
| 3 |
<td> |
| 4 |
<input type="text" name="title" value="{{ item.title }}" class="edit-input"> |
| 5 |
</td> |
| 6 |
<td> |
| 7 |
<select name="item_type" class="edit-select"> |
| 8 |
<option {% if item.item_type == "Plugin" %}selected{% endif %}>Plugin</option> |
| 9 |
<option {% if item.item_type == "Samples" %}selected{% endif %}>Samples</option> |
| 10 |
<option {% if item.item_type == "Preset" %}selected{% endif %}>Preset</option> |
| 11 |
<option {% if item.item_type == "Course" %}selected{% endif %}>Course</option> |
| 12 |
<option {% if item.item_type == "Documentation" %}selected{% endif %}>Documentation</option> |
| 13 |
</select> |
| 14 |
</td> |
| 15 |
<td> |
| 16 |
<input type="number" step="0.01" min="0" placeholder="0.00" class="edit-input item-edit-price-input w-80 input--numeric" |
| 17 |
oninput="this.nextElementSibling.value = Math.round(parseFloat(this.value || 0) * 100)"> |
| 18 |
<input type="hidden" name="price_cents" value="0"> |
| 19 |
</td> |
| 20 |
<td>{{ item.sales }}</td> |
| 21 |
<td>{{ item.revenue }}</td> |
| 22 |
<td><span class="badge {{ item.status|lowercase }}">{{ item.status }}</span></td> |
| 23 |
<td> |
| 24 |
<div class="item-actions"> |
| 25 |
<button class="btn-secondary" |
| 26 |
hx-put="/api/items/{{ item.id }}" |
| 27 |
hx-target="closest tr" |
| 28 |
hx-swap="outerHTML" |
| 29 |
hx-include="closest tr">Save</button> |
| 30 |
<button class="btn-secondary" |
| 31 |
hx-get="/dashboard/item/{{ item.id }}/row" |
| 32 |
hx-target="closest tr" |
| 33 |
hx-swap="outerHTML">Cancel</button> |
| 34 |
</div> |
| 35 |
</td> |
| 36 |
</tr> |
| 37 |
|