feat: add delete notification button with confirmation in admin notifications
This commit is contained in:
@@ -29,12 +29,13 @@ $data = $notifications['data'] ?? [];
|
||||
<th>Message</th>
|
||||
<th>Target</th>
|
||||
<th>Read by</th>
|
||||
<th style="width:60px">Actions</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
<?php if (empty($data)): ?>
|
||||
<tr>
|
||||
<td colspan="6" class="text-center text-muted">No notifications sent yet.</td>
|
||||
<td colspan="7" class="text-center text-muted">No notifications sent yet.</td>
|
||||
</tr>
|
||||
<?php else: ?>
|
||||
<?php foreach ($data as $note): ?>
|
||||
@@ -65,6 +66,13 @@ $data = $notifications['data'] ?? [];
|
||||
</span>
|
||||
<?php endif; ?>
|
||||
</td>
|
||||
<td>
|
||||
<button class="btn btn-icon btn-xs" title="Delete"
|
||||
onclick="confirmDelete(<?= $note['id'] ?>, '<?= htmlspecialchars(addslashes($note['title'] ?? '')) ?>')"
|
||||
style="color:var(--danger)">
|
||||
<i class="fas fa-trash"></i>
|
||||
</button>
|
||||
</td>
|
||||
</tr>
|
||||
<?php endforeach; ?>
|
||||
<?php endif; ?>
|
||||
|
||||
Reference in New Issue
Block a user