<div class="row">
    <div class="col-sm-12 col-md-12">
        <div class="panel panel-bd lobidrag">
            <div class="panel-heading">
                <div class="panel-title">
                    <h4><?php echo(!empty($title) ? $title : null) ?></h4>
                </div>
                <?php if($employ_data[0]->is_admin == 1){ ?>
                <div class="panel-body">
                    <table width="100%" class="datatable table table-striped table-bordered table-hover">
                        <thead>
                        <tr>
                            <th><?php echo display('cid') ?></th>
                            <th><?php echo "Employee Name" ?></th>
                            <th><?php echo "Supervisor Name" ?></th>
                            <th><?php echo "Query Date" ?></th>
                            <th><?php echo display('action') ?></th>
                            <th><?php echo 'Status' ?></th>

                        </tr>
                        </thead>
                        <tbody>
                        <?php if (!empty($quries_hr)) { ?>
                            <?php $sl = 1; ?>
                            <?php foreach ($quries_hr as $row) {

                                if ($row->approve_by_hr == null){
                                    $approve_by_hr = "Pending";
                                    $color_hr = "warning";
                                }elseif ($row->approve_by_hr == 0){
                                    $approve_by_hr = "Rejected";
                                    $color_hr = "danger";
                                }elseif($row->approve_by_hr == 1){
                                    $approve_by_hr = "Approved";
                                    $color_hr = "success";
                                }elseif($row->approve_by_hr == 3){
                                    $approve_by_hr = "Under process";
                                    $color_hr = "info button_3";
                                }else{
                                    $approve_by_hr = "";
                                    $color_hr = "";
                                }

                                ?>
                                <tr class="<?php echo ($sl & 1) ? "odd gradeX" : "even gradeC" ?>">
                                    <td><?php echo $sl; ?></td>
                                    <td><?php echo $row->first_name . " " . $row->last_name ?></td>
                                    <td><?php echo $row->supervisor_name ?></td>
                                    <td><?php echo $row->query_date ?></td>
                                    <td class="center">
                                        <a href="<?php echo base_url("employeequery/Query/view_query_hr/$row->id") ?>"
                                           class="btn btn-xs btn-success">Show</a>
                                    </td>
                                    <td class="center">
                                        <p class="btn btn-xs btn-<?php echo $color_hr ?>"><?php echo $approve_by_hr ?></p>
                                    </td>
                                </tr>
                                <?php $sl++; ?>
                            <?php } ?>
                        <?php } ?>
                        </tbody>
                    </table>  <!-- /.table-responsive -->
                </div>
                <?php }else{?>
                    <div class="panel-body">
                        You are not Admin
                    </div>
                <?php }?>
            </div>
        </div>
    </div>
</div>