<?php
foreach ($all_bank_name as $bank_value) {
    ?>
    <div id="singleBankView<?php echo $bank_value->bank_id; ?>" class="col-sm-12  form-group" style="margin-left: 5px;background: #ededed">
        <div class="col-sm-6" style="padding-top: 5px;padding-bottom: 5px">
            <?php echo $bank_value->bank_name ?>
        </div>
        <div class="col-sm-3 " style="padding-top: 5px;padding-bottom: 5px">
            <?php
            if ($total_branch[$bank_value->bank_id] == 0) {
                echo $total_branch[$bank_value->bank_id];
            } else {
                echo '<a href="' . base_url('admin/bank-branch/' . $bank_value->bank_id) . '">' . $total_branch[$bank_value->bank_id] . '</a>';
            }
            ?>
        </div>
        <div class="col-sm-2 " style="padding-top: 5px;padding-bottom: 5px">
            <a href="javascript:void(0)" id="editBankName<?php echo $bank_value->bank_id; ?>"><i class="fa fa-edit" title="Edit"></i></a>
            <span>&nbsp;&nbsp;</span>

            <span id="statusAction<?php echo $bank_value->bank_id; ?>" class="padding-zero">
                <?php
                if ($bank_value->bank_status == 1) {
                    ?>
                    <a href="javascript:void(0)"  id="pendingBankName<?php echo $bank_value->bank_id; ?>" >
                        <i class="fa fa-user-times" title="Pending"></i>
                    </a><span>&nbsp;&nbsp;</span>       
                    <?php
                } else {
                    ?>
                    <a href="javascript:void(0)"  id="activeBankName<?php echo $bank_value->bank_id; ?>" >
                        <i class="fa fa-user-plus" title="Acitve"></i>
                    </a><span>&nbsp;&nbsp;</span>   
                    <?php
                }
                ?>
            </span>
            <a href="javascript:void(0)"  id="deleteBankName<?php echo $bank_value->bank_id; ?>" >
                <i class="fa fa-trash" title="Delete"></i>
            </a>                                           
        </div>
    </div>

    <div class="modal fade" style="" id="viewActiveBankModal<?php echo $bank_value->bank_id; ?>" tabindex="-1" role="dialog" aria-labelledby="changeRole" aria-hidden="true">
        <?php
        $message = '<span style="text-align:center">Are you sure you want to Active this?</span>';
        $this->cf->view_modal('Active' . $bank_value->bank_id, $message);
        ?>
    </div>
    <div class="modal fade" style="" id="viewPendingBankModal<?php echo $bank_value->bank_id; ?>" tabindex="-1" role="dialog" aria-labelledby="changeRole" aria-hidden="true">
        <?php
        $message1 = '<span style="text-align:center">Are you sure you want to Pending this?</span>';
        $this->cf->view_modal('Pending' . $bank_value->bank_id, $message1);
        ?>
    </div>
    <div class="modal fade" style="" id="viewDeleteBankModal<?php echo $bank_value->bank_id; ?>" tabindex="-1" role="dialog" aria-labelledby="changeRole" aria-hidden="true">
        <?php
        $message2 = '<span style="text-align:center">Are you sure you want to delete this?</span>';
        $this->cf->view_modal('Delete' . $bank_value->bank_id, $message2);
        ?>
    </div>
    <?php
}
echo $pagination_link;
