<?php $person_id = $this->session->userdata('user_id'); ?>
<div class="col-sm-6  white form-group " style="height: 170px">
    <div class="col-sm-12 padding-zero text-right">
        <?php if ($person_link_info->add_link_request_status == 1) { ?>
            <a href="javascript:void(0)" 
               onclick="return checkForLinkAction('<?php echo base_url() . 'remove-link/' . $person_info->person_id; ?>', 'Remove Link', ' Do you want to Remove Link', '<?php echo $person_link_info->person_link_id; ?>')">
                <i class="fa fa-unlink" title="Remove From Link"></i>
            </a>&nbsp;&nbsp;&nbsp;

            <a href="javascript:void(0)"
               onclick="return checkForLinkAction('<?php echo base_url() . 'block-link/' . $person_info->person_id; ?>', 'Block Person', ' Do you want to Block Person', '<?php echo $person_link_info->person_link_id; ?>')"> 
                <i class="fa fa-ban" title="Block Person"></i>
            </a>&nbsp;&nbsp;&nbsp;

            <?php
        } else if ($person_link_info->add_link_request_status == 3) {
            if ($person_link_info->person_id == $person_id) {
                ?>  

                <a href="javascript:void(0)"
                   onclick="return checkForLinkAction('<?php echo base_url() . 'accept-link/' . $person_info->person_id; ?>', 'Accept Request', ' Do you want to Accept Request', '<?php echo $person_link_info->person_link_id; ?>')"> 
                    <i class="fa fa-check-circle" title="Accept Request"></i>
                </a>&nbsp;&nbsp;&nbsp;

                <a href="javascript:void(0)"
                   onclick="return checkForLinkAction('<?php echo base_url() . 'cancel-link/' . $person_info->person_id; ?>', 'Cancel Request', ' Do you want to Cancel Request', '<?php echo $person_link_info->person_link_id; ?>')"> 
                    <i class="fa fa-user-times" title="Cancel Request"></i>
                </a>&nbsp;&nbsp;&nbsp;

                <a href="javascript:void(0)"
                   onclick="return checkForLinkAction('<?php echo base_url() . 'block-link/' . $person_info->person_id; ?>', 'Block Person', ' Do you want to Block Person', '<?php echo $person_link_info->person_link_id; ?>')"> 
                    <i class="fa fa-ban" title="Block Person"></i>
                </a>&nbsp;&nbsp;&nbsp;

            <?php } else { ?>

                <a href="javascript:void(0)"
                   onclick="return checkForLinkAction('<?php echo base_url() . 'cancel-link/' . $person_info->person_id; ?>', 'Cancel Request', ' Do you want to Cancel Request', '<?php echo $person_link_info->person_link_id; ?>')">
                    <i class="fa fa-user-times" title="Cancel Request"></i>
                    <!--<span class="span-text">Cancel Request</span>-->
                </a>&nbsp;&nbsp;

                <a href="javascript:void(0)"
                   onclick="return checkForLinkAction('<?php echo base_url() . 'block-link/' . $person_info->person_id; ?>', 'Block Person', ' Do you want to Block Person', '<?php echo $person_link_info->person_link_id; ?>')"> 
                    <i class="fa fa-ban" title="Block Person"></i>
                </a>&nbsp;&nbsp;&nbsp;

                <?php
            }
        }
        ?>

    </div>


    <div class="col-sm-4 padding-zero">
        <a href="<?php echo base_url() . $person_info->url . '/profile'; ?>">
            <?php if ($person_info->person_image_thumb) { ?>
                <img src="<?php echo base_url() . 'content-library/' .  $person_info->url . '/' . $person_info->person_image_thumb; ?>" 
                     style="width:100px; height:100px;"  class="img-responsive">
                 <?php } else { ?>
                <img src="<?php echo base_url() . 'image/no_profile_picture.png' ?>" style="width:100px; height:100px;" class="img-responsive">
            <?php } ?>
        </a>
    </div>
    <div class="col-sm-8 padding-zero text-left">
        <address class="margin-zero">
            <div class="col-sm-12">
                <?php
                if ($person_work_experience) {
                    echo $person_work_experience->designation;
                } else if ($person_education) {
                    echo 'Student';
                }
                ?>
            </div>
            <div class="col-sm-12">
                <?php
                if ($person_work_experience) {
                    echo $person_work_experience->company_name;
                } else if ($person_education) {
                    echo $person_education->education_institute_name;
                }
                ?>
            </div>
        </address>
    </div>
    <div class="col-sm-12 padding-zero text-left">
        <div class="col-sm-12">
            <a href="<?php echo base_url() . $person_info->url . '/profile'; ?>"> 
                <?php echo $person_info->person_first_name . ' ' . $person_info->person_last_name; ?>
            </a>
        </div>
    </div> 
</div>