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

    <!-- Page Heading -->
    <h1 class="h3 mb-2 text-gray-800">All Country</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/addcountry'">Add New Country</button>
        </div>
        <div class="card-body">
            <div class="table-responsive">
                <table class="table table-bordered" id="dataTable" width="100%" cellspacing="0">
                    <thead>
                        <tr>

                            <th>Country</th>
                            <th>Description</th>
                            <th>Image</th>
                            <th>Actions</th>
                        </tr>
                    </thead>
                    <tfoot>
                        <tr>

                        <th>Country</th>
                            <th>Description</th>
                            <th>Image</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['details']); ?></td>
                            <td>
                                <?php if ($speciality['image'] != "") { ?>

                                <img class="img-thumbnail" width="100" height="100" src="<?php echo output($speciality['image']); ?>">
                                <?php } else { ?>
                                <img class="img-thumbnail" src="http://placehold.jp/100x100.png">
                                <?php } ?>
                            </td>
                            <td style="width: 20%;">

                                 
                                <a class="icon" style="text-decoration: none;" href="<?php echo base_url(); ?>dashboard/editcountry/<?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/deletecountry/<?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 -->