<ul class="nav nav-tabs nav-tabs-new" role="tablist">

    <li class="active"><a href="#home" role="tab" data-toggle="tab"
                          class="btn btn-primary"><?php echo "Active" ?></a></li>
    <li><a href="#menu1" role="tab" data-toggle="tab"
           class="btn btn-primary"><?php echo "On Hold" ?></a></li>
    <li><a href="#menu2" role="tab" data-toggle="tab"
           class="btn btn-primary"><?php echo "Closed" ?></a></li>
</ul>

<div class="tab-content">
    <div id="home" class="tab-pane fade in active">
        <div class="row">
            <!--  table area -->
            <div class="col-sm-12">

                <div class="panel panel-default thumbnail">

                    <div class="panel-body">
                        <table width="100%" class="datatable table table-striped table-bordered table-hover">
                            <thead>
                            <tr>
                                <th><?php echo display('Sl') ?></th>
                                <th><?php echo "Status" ?></th>
                                <th><?php echo "Requisition Receive Date" ?></th>
                                <th><?php echo "Department" ?></th>
                                <th><?php echo "Designation" ?></th>
                                <th><?php echo "Employment Type" ?></th>
                                <th><?php echo "HR Responsible Person" ?></th>
                                <th><?php echo "Closing Date" ?></th>
                                <th><?php echo "Candidate Finalized" ?></th>
                                <th><?php echo "Actions" ?></th>
                            </tr>
                            </thead>
                            <tbody>
                            <?php if (!empty($activeStatus)) { ?>
                                <?php $sl = 1; ?>
                                <?php foreach ($activeStatus as $row) {
                                    if ($row->status == '1') {
                                        $status = "In Progress";
                                    } else if ($row->status == '2') {
                                        $status = "On Hold";
                                    } else {
                                        $status = "Closed";
                                    }

                                    if ($row->employee_type == '1') {
                                        $employee_type = "Full Time";
                                    } else if ($row->employee_type == '1') {
                                        $employee_type = "Part Time";
                                    } else {
                                        $employee_type = "Contract";
                                    }
                                    ?>
                                    <tr class="<?php echo ($sl & 1) ? "odd gradeX" : "even gradeC" ?>">
                                        <td><?php echo $sl; ?></td>
                                        <td><?php echo $status ?></td>
                                        <td><?php echo $row->rrd ?></td>
                                        <td><?php echo $row->department_name ?></td>
                                        <td><?php echo $row->position_name ?></td>
                                        <td><?php echo $employee_type ?></td>
                                        <td><?php echo $row->responsible_person ?></td>
                                        <td><?php echo $row->close_date ?></td>
                                        <td><?php echo $row->candidate_finalized ?></td>
                                        <td class="center">
                                            <a href="<?php echo base_url("recruitment/Candidate/update_recruitment_status/$row->status_id") ?>"
                                               class="btn btn-xs btn-success"><i class="fa fa-pencil"></i></a>

                                            <a href="<?php echo base_url("recruitment/Candidate/delete_recruitment_status/$row->status_id") ?>"
                                               class="btn btn-xs btn-danger"
                                               onclick="return confirm('<?php echo display('are_you_sure') ?>') "><i
                                                        class="fa fa-trash"></i></a>
                                        </td>
                                    </tr>
                                    <?php $sl++; ?>
                                <?php } ?>
                            <?php } ?>
                            </tbody>
                        </table>
                    </div>
                </div>
            </div>

        </div>
    </div>

    <!--######## work experience porsion #########################-->
    <div id="menu1" class="tab-pane fade">

        <div class="row">
            <!--  table area -->
            <div class="col-sm-12">

                <div class="panel panel-default thumbnail">

                    <div class="panel-body">
                        <table width="100%" class="datatable table table-striped table-bordered table-hover">
                            <thead>
                            <tr>
                                <th><?php echo display('Sl') ?></th>
                                <th><?php echo "Status" ?></th>
                                <th><?php echo "Requisition Receive Date" ?></th>
                                <th><?php echo "Department" ?></th>
                                <th><?php echo "Designation" ?></th>
                                <th><?php echo "Employment Type" ?></th>
                                <th><?php echo "HR Responsible Person" ?></th>
                                <th><?php echo "Closing Date" ?></th>
                                <th><?php echo "Candidate Finalized" ?></th>
                                <th><?php echo "Actions" ?></th>
                            </tr>
                            </thead>
                            <tbody>
                            <?php if (!empty($holdStatus)) { ?>
                                <?php $sl = 1; ?>
                                <?php foreach ($holdStatus as $row) {
                                    if ($row->status == '1') {
                                        $status = "In Progress";
                                    } else if ($row->status == '2') {
                                        $status = "On Hold";
                                    } else {
                                        $status = "Closed";
                                    }

                                    if ($row->employee_type == '1') {
                                        $employee_type = "Full Time";
                                    } else if ($row->employee_type == '1') {
                                        $employee_type = "Part Time";
                                    } else {
                                        $employee_type = "Contract";
                                    }
                                    ?>
                                    <tr class="<?php echo ($sl & 1) ? "odd gradeX" : "even gradeC" ?>">
                                        <td><?php echo $sl; ?></td>
                                        <td><?php echo $status ?></td>
                                        <td><?php echo $row->rrd ?></td>
                                        <td><?php echo $row->department_name ?></td>
                                        <td><?php echo $row->position_name ?></td>
                                        <td><?php echo $employee_type ?></td>
                                        <td><?php echo $row->responsible_person ?></td>
                                        <td><?php echo $row->close_date ?></td>
                                        <td><?php echo $row->candidate_finalized ?></td>
                                        <td class="center">
                                            <a href="<?php echo base_url("recruitment/Candidate/update_recruitment_status/$row->status_id") ?>"
                                               class="btn btn-xs btn-success"><i class="fa fa-pencil"></i></a>

                                            <a href="<?php echo base_url("recruitment/Candidate/delete_recruitment_status/$row->status_id") ?>"
                                               class="btn btn-xs btn-danger"
                                               onclick="return confirm('<?php echo display('are_you_sure') ?>') "><i
                                                        class="fa fa-trash"></i></a>
                                        </td>
                                    </tr>
                                    <?php $sl++; ?>
                                <?php } ?>
                            <?php } ?>
                            </tbody>
                        </table>
                    </div>
                </div>
            </div>
        </div>


    </div>
    <!--######## Educational  porsion #########################-->
    <div id="menu2" class="tab-pane fade">
        <div class="row">
            <!--  table area -->
            <div class="col-sm-12">

                <div class="panel panel-default thumbnail">

                    <div class="panel-body">
                        <table width="100%" class="datatable table table-striped table-bordered table-hover">
                            <thead>
                            <tr>
                                <th><?php echo display('Sl') ?></th>
                                <th><?php echo "Status" ?></th>
                                <th><?php echo "Requisition Receive Date" ?></th>
                                <th><?php echo "Department" ?></th>
                                <th><?php echo "Designation" ?></th>
                                <th><?php echo "Employment Type" ?></th>
                                <th><?php echo "HR Responsible Person" ?></th>
                                <th><?php echo "Closing Date" ?></th>
                                <th><?php echo "Candidate Finalized" ?></th>
                                <th><?php echo "Actions" ?></th>
                            </tr>
                            </thead>
                            <tbody>
                            <?php if (!empty($closedStatus)) { ?>
                                <?php $sl = 1; ?>
                                <?php foreach ($closedStatus as $row) {
                                    if ($row->status == '1') {
                                        $status = "In Progress";
                                    } else if ($row->status == '2') {
                                        $status = "On Hold";
                                    } else {
                                        $status = "Closed";
                                    }

                                    if ($row->employee_type == '1') {
                                        $employee_type = "Full Time";
                                    } else if ($row->employee_type == '1') {
                                        $employee_type = "Part Time";
                                    } else {
                                        $employee_type = "Contract";
                                    }
                                    ?>
                                    <tr class="<?php echo ($sl & 1) ? "odd gradeX" : "even gradeC" ?>">
                                        <td><?php echo $sl; ?></td>
                                        <td><?php echo $status ?></td>
                                        <td><?php echo $row->rrd ?></td>
                                        <td><?php echo $row->department_name ?></td>
                                        <td><?php echo $row->position_name ?></td>
                                        <td><?php echo $employee_type ?></td>
                                        <td><?php echo $row->responsible_person ?></td>
                                        <td><?php echo $row->close_date ?></td>
                                        <td><?php echo $row->candidate_finalized ?></td>
                                        <td class="center">
                                            <a href="<?php echo base_url("recruitment/Candidate/update_recruitment_status/$row->status_id") ?>"
                                               class="btn btn-xs btn-success"><i class="fa fa-pencil"></i></a>

                                            <a href="<?php echo base_url("recruitment/Candidate/delete_recruitment_status/$row->status_id") ?>"
                                               class="btn btn-xs btn-danger"
                                               onclick="return confirm('<?php echo display('are_you_sure') ?>') "><i
                                                        class="fa fa-trash"></i></a>
                                        </td>
                                    </tr>
                                    <?php $sl++; ?>
                                <?php } ?>
                            <?php } ?>
                            </tbody>
                        </table>
                    </div>
                </div>
            </div>
        </div>
    </div>
</div>