google_forms/application/views/responses_list.php

76 lines
3.1 KiB
PHP
Raw Normal View History

2024-07-29 09:17:16 +00:00
<!DOCTYPE html>
<html lang="en">
<head>
<!-- Other head elements -->
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Responses for "<?php echo $form->title; ?>"</title>
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/6.0.0-beta3/css/all.min.css">
2024-07-24 13:12:00 +00:00
<style>
.username-column {
2024-07-29 09:17:16 +00:00
color: darkblue; /* Dark blue color for title */
}
</style>
</head>
<body>
<div class="container">
<div class="row">
<div class="col-md-12 mt-4">
<div class="card">
<div class="card-header">
2024-08-09 12:04:48 +00:00
<?php if ($this->session->flashdata('status')) : ?>
2024-07-29 09:17:16 +00:00
<div class="alert alert-success">
<?= $this->session->flashdata('status'); ?>
</div>
<?php endif; ?>
<h3>Responses for "<?php echo $form->title; ?>"</h3>
<!-- <a href="<?php echo base_url('Response_submit/summary/' . $form->id); ?>" class="btn btn-primary">View Summary</a> -->
</div>
<div class="card-body">
<table id="basetable1" class="table table-bordered">
<thead>
2024-07-17 12:21:51 +00:00
<tr>
2024-07-29 09:17:16 +00:00
<th>Username</th>
<th>Submitted At</th>
<th>View</th>
2024-07-17 12:21:51 +00:00
</tr>
2024-07-29 09:17:16 +00:00
</thead>
<tbody>
2024-08-09 12:04:48 +00:00
<?php foreach ($responses as $response) : ?>
2024-07-29 09:17:16 +00:00
<tr>
<td class="username-column"><?php echo $response->username; ?></td>
<td><?php echo $response->submitted_at; ?></td>
<td>
<a href="<?php echo base_url('responses/view/' . $response->response_id); ?>">
<i class="fas fa-eye"></i> <!-- Eye icon -->
</a>
</td>
</tr>
<?php endforeach; ?>
</tbody>
</table>
</div>
2024-07-17 12:21:51 +00:00
</div>
</div>
</div>
</div>
2024-07-29 09:17:16 +00:00
<script>
$(document).ready(function() {
$('#basetable1').DataTable({
"pagingType": "full_numbers",
"lengthMenu": [10, 25, 50],
"language": {
"search": "Filter records:",
"lengthMenu": "Show _MENU_ entries"
},
"columnDefs": [
{ "orderable": false, "targets": 2 }
],
"order": [[1, "desc"]]
});
});
</script>
2024-07-17 12:21:51 +00:00
</body>
</html>