<?php
foreach ($all_bank_branchs as $value) {
    ?>
    <div id="singleBankBranchView<?php echo $value->bank_branch_id; ?>" class="col-sm-12  form-group" style="margin-left: 5px;background: #ededed">
        <div class="col-sm-5" id="bankName<?php echo $value->bank_id; ?>" style="padding-top: 5px;padding-bottom: 5px; color: #80c12c; cursor: pointer;">
            <?php echo $bank_name[$value->bank_branch_id]->bank_name ?>
        </div>
        <div class="col-sm-4 " style="padding-top: 5px;padding-bottom: 5px">
            <?php echo $value->bank_branch_name ?>
        </div>
        <div class="col-sm-3 " style="padding-top: 5px;padding-bottom: 5px">
            <a href="javascript:void(0)" id="editBankBranceName<?php echo $value->bank_branch_id; ?>">
                <i class="fa fa-edit" title="Edit"></i>
            </a>
            <span>&nbsp;&nbsp;</span>

            <span id="statusBranchAction<?php echo $value->bank_branch_id; ?>" class="padding-zero">
                <?php
                if ($value->bank_branch_status == 1) {
                    ?>
                    <a href="javascript:void(0)"  id="pendingBankBranchName<?php echo $value->bank_branch_id; ?>" >
                        <i class="fa fa-user-times" title="Pending"></i>
                    </a><span>&nbsp;&nbsp;</span>       
                    <?php
                } else {
                    ?>
                    <a href="javascript:void(0)"  id="activeBankBranchName<?php echo $value->bank_branch_id; ?>" >
                        <i class="fa fa-user-plus" title="Acitve"></i>
                    </a><span>&nbsp;&nbsp;</span>   
                    <?php
                }
                ?>
            </span>
            <a href="javascript:void(0)"  id="deleteBankBranchName<?php echo $value->bank_branch_id; ?>" >
                <i class="fa fa-trash" title="Delete"></i>
            </a>                                           
        </div>
    </div>

    <div class="modal fade" style="" id="viewActiveBankBranchModal<?php echo $value->bank_branch_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 Bank Branch?</span>';
        $this->cf->view_modal('branchActive' . $value->bank_branch_id, $message);
//        $status_message1 = 'Are you sure you want to Active this Bank Branch?';
//        $function_name1 = 'updateBankBranchStatus(&quot;' . $value->bank_branch_id . '&quot;,&quot;1&quot;)';
//        $this->cf->get_status_modal($function_name1, $status_message1);
        ?>
    </div>
    <div class="modal fade" style="" id="viewPendingBankBranchModal<?php echo $value->bank_branch_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 Bank Branch?</span>';
        $this->cf->view_modal('branchPending' . $value->bank_branch_id, $message1);
//        $status_message2 = 'Are you sure you want to Pending this Bank Branch?';
//        $function_name2 = 'updateBankBranchStatus(&quot;' . $value->bank_branch_id . '&quot;,&quot;2&quot;)';
//        $this->cf->get_status_modal($function_name2, $status_message2);
        ?>
    </div>
    <div class="modal fade" style="" id="viewDeleteBankBranchModal<?php echo $value->bank_branch_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 Bank Branch?</span>';
        $this->cf->view_modal('branchDelete' . $value->bank_branch_id, $message2);
        ?>
    </div>
    <?php
}
echo $pagination_link;
