File: /var/www/html/taxicamera/application/views/admin/notification/notification_list.php
<div class="main-content">
<div class="content-wrapper">
<div class="container-fluid">
<!-- Basic form layout section start -->
<section id="basic-form-layouts">
<div class="row">
<div class="col-md-12">
<div class="card">
<div class="card-header">
<div class="page-title-wrap">
<h4 class="card-title">Notification List</h4>
</div>
</div>
<div class="card-body">
<div class="px-3">
<div id="report_list_div">
<div class="row">
<div class="table-responsive custom_table_area export_table_area">
<table class="table table-striped table-bordered export_btn_dt c_table_style notification_table">
<thead>
<tr>
<th>SL No.</th>
<th>Notification Id</th>
<th>Title</th>
<th>Description</th>
<th>Status</th>
</tr>
</thead>
<tbody>
<?php if(!empty($notification_details)): ?>
<?php foreach($notification_details as $key => $list): ?>
<tr>
<td><?php echo $key+1; ?></td>
<td><?php echo "#N00".$list['notification_id']; ?></td>
<?php if($list['notification_flag'] =='0'): ?>
<?php $url_class = 'notification_url'; ?>
<?php $url = 'javascript:void(0);'; ?>
<?php $status = 'Unread'; ?>
<?php $status_class = 'btn mr-1 btn-danger'; ?>
<?php else: ?>
<?php $url_class = ''; ?>
<?php $url = base_url().$list['notification_link']; ?>
<?php $status = 'Read'; ?>
<?php $status_class = 'btn mr-1 btn-success'; ?>
<?php endif; ?>
<td><?php echo $list['notification_title']; ?></td>
<td><?php echo $list['notification_description']; ?></td>
<td><a href="<?php echo $url; ?>" rel ="<?php echo $list['notification_type']."|".$list['notification_id']."|".$list['referrence_id']."|".$list['notification_link']; ?>" class="<?php echo $status_class.' '.$url_class; ?> "><?php echo $status; ?></a></td>
</tr>
<?php endforeach; ?>
<?php else: ?>
<tr>
<td colspan="4">No data found</td>
</tr>
<?php endif; ?>
</tbody>
</table>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
</section>
<!-- // Basic form layout section end -->
</div>
</div>
</div>
<script>
$(document).ready(function() {
$('.notification_table').DataTable();
})
</script>