<?php
$person_role1 = $this->session->userdata('person_role');
?>
<div class="col-sm-12 gray_ttc" id="work_info<?php echo $p_value->person_work_details_id; ?>" style="padding: 10px">
    <div class="col-sm-12 pull-right" style="color: limegreen">
        <?php
        switch ($person_role1) {
            case 6:
                if ($p_value->work_details_status == 1) {
                    ?>
                    <a href="javascript:void(0)"
                       onclick="editWorkExperience('<?php echo base_url() ?>super_admin_profile/edit_work_experience/<?php echo $p_value->person_work_details_id; ?>', '<?php echo $p_value->person_work_details_id; ?>')" > 
                        <i class="fa fa-edit" title="Edit Work Experience"></i>
                    </a>&nbsp;
                    <a href="javascript:void(0)"
                       onclick="checkWorkAction('<?php echo base_url() . 'super_admin_profile/archive_work_detail_information/' . $p_value->person_work_details_id; ?>', 'Archive', '<?php echo $p_value->person_work_details_id; ?>')"  >
                        <i class="fa fa-archive" title="Archive"></i>
                    </a>&nbsp;
                    <a href="javascript:void(0)"
                       onclick="checkWorkAction('<?php echo base_url() . 'super_admin_profile/delete_work_detail_information/' . $p_value->person_work_details_id; ?>', 'Delete', '<?php echo $p_value->person_work_details_id; ?>')" >
                        <i class="fa fa-trash-o" title="Delete"></i>
                    </a>&nbsp;
                <?php } else { ?>
                    <a href="javascript:void(0)"
                       onclick="checkWorkAction('<?php echo base_url() . 'super_admin_profile/active_work_detail_information/' . $p_value->person_work_details_id; ?>', 'Active', '<?php echo $p_value->person_work_details_id; ?>')" >
                        <i class="fa fa-archive" title="Archive"></i>
                    </a>&nbsp;
                    <a href="javascript:void(0)"
                       onclick="checkWorkAction('<?php echo base_url() . 'super_admin_profile/delete_work_detail_information/' . $p_value->person_work_details_id; ?>', 'Delete', '<?php echo $p_value->person_work_details_id; ?>')" >
                        <i class="fa fa-trash-o" title="Delete"></i>
                    </a>&nbsp;
                    <?php
                }
                break;

            case 1:
                if ($person_info->person_role != 6) {
                    if ($p_value->work_details_status == 1) {
                        ?>
                        <a href="javascript:void(0)"
                           onclick="editWorkExperience('<?php echo base_url() ?>super_admin_profile/edit_work_experience/<?php echo $p_value->person_work_details_id; ?>', '<?php echo $p_value->person_work_details_id; ?>')" > 
                            <i class="fa fa-edit" title="Edit Work Experience"></i>
                        </a>&nbsp;
                        <a href="javascript:void(0)"
                           onclick="checkWorkAction('<?php echo base_url() . 'super_admin_profile/archive_work_detail_information/' . $p_value->person_work_details_id; ?>', 'Archive', '<?php echo $p_value->person_work_details_id; ?>')"  >
                            <i class="fa fa-archive" title="Archive"></i>
                        </a>&nbsp;
                        <a href="javascript:void(0)"
                           onclick="checkWorkAction('<?php echo base_url() . 'super_admin_profile/delete_work_detail_information/' . $p_value->person_work_details_id; ?>', 'Delete', '<?php echo $p_value->person_work_details_id; ?>')" >
                            <i class="fa fa-trash-o" title="Delete"></i>
                        </a>&nbsp;
                    <?php } else { ?>
                        <a href="javascript:void(0)"
                           onclick="checkWorkAction('<?php echo base_url() . 'super_admin_profile/active_work_detail_information/' . $p_value->person_work_details_id; ?>', 'Active', '<?php echo $p_value->person_work_details_id; ?>')" >
                            <i class="fa fa-archive" title="Archive"></i>
                        </a>&nbsp;
                        <a href="javascript:void(0)"
                           onclick="checkWorkAction('<?php echo base_url() . 'super_admin_profile/delete_work_detail_information/' . $p_value->person_work_details_id; ?>', 'Delete', '<?php echo $p_value->person_work_details_id; ?>')" >
                            <i class="fa fa-trash-o" title="Delete"></i>
                        </a>&nbsp;
                        <?php
                    }
                }
                break;
        }
        ?>
    </div>

    <div class="col-sm-12">
        <div class="col-sm-2">Company Name</div>
        <div class="col-sm-10"><?php echo $p_value->company_name; ?></div>
    </div>
    <div class="col-sm-12"><br></div>
    <div class="col-sm-12">
        <div class="col-sm-2">Designation</div>
        <div class="col-sm-10"><?php echo $p_value->designation; ?></div>
    </div>
    <div class="col-sm-12"><br></div>
    <div class="col-sm-12">
        <div class="col-sm-2">Company Address</div>
        <div class="col-sm-10"><?php echo $p_value->company_address; ?></div>
    </div>
    <div class="col-sm-12"><br></div>
    <div class="col-sm-12">
        <div class="col-sm-2">Company Website</div>
        <div class="col-sm-10"><a href="<?php echo $p_value->company_website_url; ?>" target="_blank"><?php echo $p_value->company_website_url; ?></a></div>
    </div>
    <div class="col-sm-12"><br></div>
    <div class="col-sm-12">
        <div class="col-sm-2">Start Time Period</div>
        <div class="col-sm-10"><?php echo $p_value->job_start_date; ?></div>
    </div>
    <div class="col-sm-12"><br></div>
    <div class="col-sm-12">
        <div class="col-sm-2">End Time Period</div>
        <div class="col-sm-10"><?php
            if ($p_value->job_end_date == NULL) {
                echo 'Running';
            } else {
                echo $p_value->job_end_date;
            }
            ?></div>
    </div>
    <div class="col-sm-12"><br></div>
</div>