donation/app/Views/business_list.php
2023-12-14 17:38:07 +05:30

57 lines
2.9 KiB
PHP

<div class="row">
<div class="col-12">
<div class="card">
<div class="card-body">
<div class="float-right">
<?php if($loggedin_person_role === 'sadmin'): ?>
<a href="<?= base_url()."new_bussiness/0"; ?>" class="btn btn-primary"><i class="ri-briefcase-4-fill"></i> Add Organization </a>
<?php endif; ?>
</div><!-- end col-->
<br>
<h4 class="header-title mb-3"><?= $page_name; ?></h4>
<div class="table-responsive">
<table id="scroll-horizontal-datatable" class="table w-100 nowrap">
<thead class="thead-light">
<tr>
<th>Organization Name</th>
<th>Email</th>
<th>Mobile Number</th>
<th>Address</th>
<th>City</th>
<th>State</th>
<th>Zip</th>
<th>File</th>
<th>Action</th>
</tr>
</thead>
<tbody>
<?php foreach ($businesses as $business) : ?>
<tr>
<td><?= $business['title']; ?></td>
<td><?= $business['email']; ?></td>
<td><?= $business['mobile_no']; ?></td>
<td><?= $business['address']; ?></td>
<td><?= $business['city']; ?></td>
<td><?= $business['state']; ?></td>
<td><?= $business['postal_code']; ?></td>
<td><?= $business['business_logo']; ?></td>
<td>
<a href="<?= base_url() . "new_bussiness/" . $business['business_id']; ?>" class="edit-button" title="Click to Edit Business"><i class="ri-pencil-line"></i></a>
<?php if($loggedin_person_role === 'sadmin'): ?>
<a href="<?= base_url() . "delete_business/" . $business['business_id']; ?>" class="delete-button" title="Click to Delete Business"><i class="ri-delete-bin-line"></i></a>
<?php endif; ?>
</td>
</tr>
<?php endforeach; ?>
</tbody>
</table>
</div>
</div> <!-- end card body-->
</div> <!-- end card -->
</div><!-- end col-->
</div>
<!-- end row-->