CodeIgniter_Gforms/application/views/forms/mydrafts.php

35 lines
1.3 KiB
PHP
Raw Permalink Normal View History

2024-07-14 21:04:04 +00:00
<div style="margin: 0 10%;">
2024-07-16 10:46:16 +00:00
<h1>My Drafts</h1>
2024-07-14 21:04:04 +00:00
<table>
<thead>
<tr>
<th>Draft Title</th>
<th>Created At</th>
2024-07-16 10:46:16 +00:00
<th>Actions</th>
2024-07-14 21:04:04 +00:00
</tr>
</thead>
<tbody>
<?php if (!empty($forms)) : ?>
<?php foreach ($forms as $form) : ?>
2024-07-16 10:46:16 +00:00
<?php if ($form->is_published == 0) : ?>
<tr>
<td>
2024-07-19 11:43:09 +00:00
<a href="<?= base_url() ?>forms/view_form/<?=$form->form_id?>">
<?= htmlspecialchars($form->title ? $form->title : $form->form_id, ENT_QUOTES, 'UTF-8') ?>
</a>
</td>
2024-07-16 10:46:16 +00:00
<td><?php echo date('Y-m-d H:i:s', strtotime($form->created_at)); ?></td>
<td><a href="<?= base_url() ?>forms/delete/<?= $form->form_id ?>" onclick="return confirm('Are you sure you want to delete this form?');">Delete</a></td>
</tr>
<?php endif; ?>
2024-07-14 21:04:04 +00:00
<?php endforeach; ?>
<?php else : ?>
<tr>
2024-07-16 10:46:16 +00:00
<td colspan="3">No Drafts found.</td>
2024-07-14 21:04:04 +00:00
</tr>
<?php endif; ?>
</tbody>
</table>
2024-07-16 10:46:16 +00:00
</div>