51 lines
1.8 KiB
HTML
51 lines
1.8 KiB
HTML
|
|
<!-- Data Row Template - Rendered server-side for each item -->
|
||
|
|
<tr id="row-${id}" class="data-row" data-id="${id}">
|
||
|
|
<td class="cell-name">
|
||
|
|
<div class="name-cell">
|
||
|
|
<span class="name-text">${name}</span>
|
||
|
|
</div>
|
||
|
|
</td>
|
||
|
|
<td class="cell-email">
|
||
|
|
<a href="mailto:${email}" class="email-link">${email}</a>
|
||
|
|
</td>
|
||
|
|
<td class="cell-status">
|
||
|
|
<span class="badge badge-${status_class}">${status}</span>
|
||
|
|
</td>
|
||
|
|
<td class="cell-date">
|
||
|
|
<span class="date-text">${created_at}</span>
|
||
|
|
</td>
|
||
|
|
<td class="cell-actions">
|
||
|
|
<div class="row-actions">
|
||
|
|
<!-- View Details -->
|
||
|
|
<button class="btn btn-sm btn-secondary"
|
||
|
|
hx-get="/api/data/${table}/${id}"
|
||
|
|
hx-target="#detail-panel"
|
||
|
|
hx-swap="innerHTML"
|
||
|
|
title="View details">
|
||
|
|
👁️
|
||
|
|
</button>
|
||
|
|
|
||
|
|
<!-- Edit -->
|
||
|
|
<button class="btn btn-sm btn-secondary"
|
||
|
|
hx-get="/api/data/${table}/${id}/edit"
|
||
|
|
hx-target="#edit-form-content"
|
||
|
|
hx-swap="innerHTML"
|
||
|
|
hx-on::after-request="openModal('edit-modal')"
|
||
|
|
title="Edit">
|
||
|
|
✏️
|
||
|
|
</button>
|
||
|
|
|
||
|
|
<!-- Delete -->
|
||
|
|
<button class="btn btn-sm btn-danger"
|
||
|
|
hx-delete="/api/data/${table}/${id}"
|
||
|
|
hx-target="closest tr"
|
||
|
|
hx-swap="outerHTML swap:500ms"
|
||
|
|
hx-confirm="Are you sure you want to delete this item?"
|
||
|
|
hx-on::after-request="showToast('Item deleted')"
|
||
|
|
title="Delete">
|
||
|
|
🗑️
|
||
|
|
</button>
|
||
|
|
</div>
|
||
|
|
</td>
|
||
|
|
</tr>
|