google_forms/application/views/Tables/draft.php

65 lines
2.8 KiB
PHP
Raw Normal View History

2024-07-23 12:54:27 +00:00
<style>/* CSS styles */
.title-column {
color: darkblue; /* Dark blue color for title */
}
</style>
2024-07-19 12:30:57 +00:00
<div class="container">
<div class="row">
<div class="col-md-12 mt-4">
<div class="card">
<div class="card-header">
<?php if ($this->session->flashdata('status')): ?>
<div class="alert alert-success">
<?= $this->session->flashdata('status'); ?>
</div>
<?php endif; ?>
<h3>
2024-07-22 09:49:37 +00:00
Drafts
2024-07-19 12:30:57 +00:00
</h3>
</div>
<div class="card-body">
<!-- here your table will occur -->
<table id="basetable1" class="table table-bordered">
<thead>
<tr>
2024-07-23 12:54:27 +00:00
<th>Drafts</th>
2024-07-19 12:30:57 +00:00
<th>Title</th>
<th>Created On</th>
<th>Edit</th>
<th>Delete</th>
2024-07-23 12:54:27 +00:00
<th>Preview</th>
2024-07-19 12:30:57 +00:00
</tr>
</thead>
<tbody>
2024-07-23 12:54:27 +00:00
<?php
$serialNumber = 1; // Initialize the counter variable
foreach ($forms as $row): ?>
<tr>
<td><?php echo $serialNumber++; ?></td>
<td class="title-column">
<?php echo $row->title; ?>
2024-07-19 12:30:57 +00:00
</td>
2024-07-23 12:54:27 +00:00
2024-07-22 09:49:37 +00:00
<td><?php echo $row->created_at; ?></td>
2024-07-19 12:30:57 +00:00
<td>
2024-07-22 12:39:47 +00:00
<a href="<?php echo base_url('edit/' . $row->id); ?>"
class="btn btn-success btn-sm " style=" background-color: rgb(103, 58, 183); border-color: rgb(103, 58, 183); color: white;">Edit</a>
2024-07-19 12:30:57 +00:00
</td>
<td>
<a href="<?php echo base_url('forms/delete/' . $row->id); ?>"
2024-07-22 12:39:47 +00:00
class="btn btn-danger btn-sm" style=" background-color: rgb(103, 58, 183); border-color: rgb(103, 58, 183); color: white;">Delete</a>
2024-07-19 12:30:57 +00:00
</td>
2024-07-23 12:54:27 +00:00
<td>
<a href="<?php echo base_url('form_preview/' . $row->id); ?>">
<i class="fas fa-eye"></i> <!-- Eye icon -->
</a>
</td>
2024-07-19 12:30:57 +00:00
</tr>
<?php endforeach; ?>
</tbody>
</table>
</div>
</div>
</div>
</div>
</div>