<!-- Begin Page Content -->
<div class="container-fluid">

    <!-- Page Heading -->
    <h1 class="h3 mb-2 text-gray-800">All Specialities</h1>
    <!-- DataTales Example -->
    <div class="card shadow mb-4">
        <div class="card-header py-3">
            <button class="btn btn-primary" onclick="location.href = '<?php echo(base_url()); ?>dashboard/addspeciality'">Add New Speciality</button>
        </div>
        <div class="card-body">
            <div class="table-responsive">
                <table class="table table-bordered" id="dataTable" width="100%" cellspacing="0">
                    <thead>
                        <tr>
                            <th>Speciality Name</th>
                            <th>Category</th>
                            <th>Actions</th>
                        </tr>
                    </thead>
                    <tfoot>
                        <tr>
                            <th>Speciality Name</th>
                            <th>Category</th>
                            <th>Actions</th>
                        </tr>
                    </tfoot>
                    <tbody>
                        <?php
                           if (!empty($specialities)) {
                              $count = 1;
                              foreach ($specialities as $id => $speciality) {
                        ?>
                        <tr>
                            <td style="width: 40%;"> <?php echo output($speciality['name']); ?></td>
                            <td style="width: 40%;"> <?php echo output($speciality['category']); ?></td>

                            <td style="width: 20%;">
                                <a class="icon" style="text-decoration: none;" href="<?php echo base_url(); ?>dashboard/editspeciality/<?php echo output($id); ?>">
                                    <button class="btn btn-info mt-2">Update</button>
                                </a>
                                <a class="icon" style="text-decoration: none;" href="<?php echo base_url(); ?>dashboard/deletespeciality/<?php echo output($id); ?>">
                                    <button class="btn btn-danger mt-2">Delete</button>
                                </a>
                            </td>
                        </tr>
                        <?php } } ?>
                    </tbody>
                </table>
            </div>
        </div>
    </div>

</div>
<!-- /.container-fluid -->