<?php
$person_role1 = $this->session->userdata('person_role');
?>
<div class="col-sm-12 gray_ttc" id="edit_education<?php echo $value->person_education_details_id; ?>" style="padding: 0;">
    <div class="col-sm-12 pull-right" style="color: limegreen; padding: 10px;">
        <?php
        switch ($person_role1) {
            case 6:
                if ($value->person_education_status == 1) {
                    ?>
                    <a href="javascript:void(0)" 
                       onclick="editEducation('<?php echo base_url() ?>super-admin-profile/edit-education/<?php echo $person_info->url . '/' . $value->person_education_details_id; ?>', '<?php echo $value->person_education_details_id; ?>')">
                        <i class="fa fa-edit" title="Edit Education"></i></a>&nbsp;
                    <a href="javascript:void(0)" 
                       onclick="checkForAction('<?php echo base_url() . 'super_admin_profile/archive_education_detail_information/' . $value->person_education_details_id; ?>', 'Archive', '<?php echo $value->person_education_details_id; ?>', '<?php echo $value->education_institute_country; ?>')" >
                        <i class="fa fa-archive" title="Archive"></i></a>&nbsp;
                    <a href="javascript:void(0)" 
                       onclick="checkForAction('<?php echo base_url() . 'super_admin_profile/delete_education_detail_information/' . $value->person_education_details_id; ?>', 'Delete', '<?php echo $value->person_education_details_id; ?>')" >
                        <i class="fa fa-trash-o" title="Delete"></i></a>&nbsp;
                <?php } else { ?>
                    <a href="javascript:void(0)"
                       onclick="checkForAction('<?php echo base_url() . 'super_admin_profile/active_education_detail_information/' . $value->person_education_details_id; ?>', 'Active', '<?php echo $value->person_education_details_id; ?>', '<?php echo $value->education_institute_country; ?>')" >
                        <i class="fa fa-archive" title="Active"></i></a>&nbsp;
                    <a href="javascript:void(0)" 
                       onclick="checkForAction('<?php echo base_url() . 'super_admin_profile/delete_education_detail_information/' . $value->person_education_details_id; ?>', 'Delete', '<?php echo $value->person_education_details_id; ?>')" >
                        <i class="fa fa-trash-o" title="Delete"></i></a>&nbsp;
                    <?php
                }
                break;
            case 1:
                if ($person_info->person_role != 6) {
                    if ($value->person_education_status == 1) {
                        ?>
                        <a href="javascript:void(0)" 
                           onclick="editEducation('<?php echo base_url() ?>super-admin-profile/edit-education/<?php echo $person_info->url . '/' . $value->person_education_details_id; ?>', '<?php echo $value->person_education_details_id; ?>')">
                            <i class="fa fa-edit" title="Edit Education"></i></a>&nbsp;
                        <a href="javascript:void(0)" 
                           onclick="checkForAction('<?php echo base_url() . 'super_admin_profile/archive_education_detail_information/' . $value->person_education_details_id; ?>', 'Archive', '<?php echo $value->person_education_details_id; ?>', '<?php echo $value->education_institute_country; ?>')" >
                            <i class="fa fa-archive" title="Archive"></i></a>&nbsp;
                        <a href="javascript:void(0)" 
                           onclick="checkForAction('<?php echo base_url() . 'super_admin_profile/delete_education_detail_information/' . $value->person_education_details_id; ?>', 'Delete', '<?php echo $value->person_education_details_id; ?>')" >
                            <i class="fa fa-trash-o" title="Delete"></i></a>&nbsp;
                    <?php } else { ?>
                        <a href="javascript:void(0)"
                           onclick="checkForAction('<?php echo base_url() . 'super_admin_profile/active_education_detail_information/' . $value->person_education_details_id; ?>', 'Active', '<?php echo $value->person_education_details_id; ?>', '<?php echo $value->education_institute_country; ?>')" >
                            <i class="fa fa-archive" title="Active"></i></a>&nbsp;
                        <a href="javascript:void(0)" 
                           onclick="checkForAction('<?php echo base_url() . 'super_admin_profile/delete_education_detail_information/' . $value->person_education_details_id; ?>', 'Delete', '<?php echo $value->person_education_details_id; ?>')" >
                            <i class="fa fa-trash-o" title="Delete"></i></a>&nbsp;
                        <?php
                    }
                }
                break;
        }
        ?>
    </div>
    <div class="col-sm-12"><br></div>
    <div class="col-sm-12">
        <div class="col-sm-2">Attended For</div>
        <div class="col-sm-10"><?php
            switch ($value->attended_for) {
                case 1:
                    echo 'School';
                    break;
                case 2:
                    echo 'Collage';
                    break;
                case 3:
                    echo 'Graduation';
                    break;
                case 4:
                    echo 'Post Graduation';
                    break;
                case 5:
                    echo 'PHD';
                    break;
                case 6:
                    echo 'Post-PHD';
                    break;
            }
            ?></div>
    </div>
    <div class="col-sm-12"><br></div>
    <div class="col-sm-12">
        <div class="col-sm-2">Education Institute</div>
        <div class="col-sm-10"><?php echo $value->education_institute_name; ?></div>
    </div>
    <div class="col-sm-12"><br></div>
    
    <div class="col-sm-12">
        <div class="col-sm-2">Institute Country</div>
        <div class="col-sm-10" id="view_country<?php echo $value->person_education_details_id; ?>"></div>
    </div>
    <script>
               var country = getCountryName('<?php echo $value->education_institute_country; ?>');
               document.getElementById('view_country<?php echo $value->person_education_details_id; ?>').innerHTML = country;
    </script>
    <div class="col-sm-12"><br></div>

    <div class="col-sm-12">
        <div class="col-sm-2">Institute City</div>
        <div class="col-sm-10"><?php echo $value->education_institute_city; ?></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 $value->start_time_period; ?></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 ($value->end_time_period == NULL) {
                echo 'Running';
            } else {
                echo $value->end_time_period;
            }
            ?></div>
    </div>
    <div class="col-sm-12"><br></div>
</div>

<div class="col-sm-12"><br></div>