<div class="col-sm-12 gray_ttc text-center" style="border-bottom: 2px solid #8CC73F;padding: 10px 0 10px 0;font-weight: bold">
    <div class="col-sm-2" style="padding: 0">Image</div>
    <div class="col-sm-3" style="padding: 0">Title</div>
    <div class="col-sm-3" style="padding: 0"> By</div>
    <div class="col-sm-2" style="padding: 0">Date</div>
    <div class="col-sm-2" style="padding: 0">Action</div>
</div>
<div class="col-sm-12"><br></div>   
<input type="hidden" name="url_id" id="url_id" value="<?php echo $group_url; ?>">
<span class="padding-zero" id="view_group_asignment">
    <?php
    $user_id = $this->session->userdata('user_id');
    if ($group_assignment_post) {
        foreach ($group_assignment_post as $v_assignment) {
            ?>
            <div class="col-sm-12 gray text-center" >
                <div class="col-sm-2" style="padding: 10px 0 0 0  "><a href="#">
                        <?php
                        $fileName = $v_assignment->post_file_original_name;
                        $file_explode = explode('.', $fileName);
                        $file_extention = $file_explode[count($file_explode) - 1];

                        if ($file_extention == 'pdf') {
                            ?>
                            <a href="javascript:;" onclick="downloadAssignment('<?php echo $v_assignment->post_id; ?>', '<?php echo $group_details->group_id; ?>')"> <img src="<?php echo base_url() . 'image/assignment/pdf.png' ?>"></a>
                            <!--<i style="color: #80c12c" class="fa fa-file-pdf-o"></i>-->
                        <?php } else if ($file_extention == 'rar' || $file_extention == 'zip') { ?>
                            <a href="javascript:;" onclick="downloadAssignment('<?php echo $v_assignment->post_id; ?>', '<?php echo $group_details->group_id; ?>')"> <img src="<?php echo base_url() . 'image/assignment/rar.png' ?>"></a>
                        <?php } else if ($file_extention == 'doc' || $file_extention == 'docx') { ?>
                            <a href="javascript:;" onclick="downloadAssignment('<?php echo $v_assignment->post_id; ?>', '<?php echo $group_details->group_id; ?>')"><img src="<?php echo base_url() . 'image/assignment/word.png' ?>"></a>

                        <?php } else if ($file_extention == 'xls' || $file_extention == 'xlsx') { ?>
                            <a href="javascript:;" onclick="downloadAssignment('<?php echo $v_assignment->post_id; ?>', '<?php echo $group_details->group_id; ?>')"> <img src="<?php echo base_url() . 'image/assignment/excel.png' ?>"></a>
                        <?php } else if ($file_extention == 'pptx' || $file_extention == 'ppt') { ?>
                            <a href="javascript:;" onclick="downloadAssignment('<?php echo $v_assignment->post_id; ?>', '<?php echo $group_details->group_id; ?>')"> <img src="<?php echo base_url() . 'image/assignment/powerpoint.png' ?>"></a>
                        <?php } else {
                            ?>
                            <a href="javascript:;" onclick="downloadAssignment('<?php echo $v_assignment->post_id; ?>', '<?php echo $group_details->group_id; ?>')"> <img src="<?php echo base_url() . 'image/assignment/unknown.png' ?>"></a>
                        <?php }
                        ?>
                    </a></div>
                <div class="col-sm-3" style="padding: 10px 0 0 0  ">
                    <a href="<?php echo base_url() . 'view-content-group/' . $this->utility_model->encode_id($v_assignment->post_id, '/', 'Tt') . '/2'; ?>"><?php echo $v_assignment->post_file_original_name; ?></a>
                </div>
                <div class="col-sm-3" style="padding: 10px 0 0 0; cursor: pointer; color: #80c12c;" id="viewGroup<?php echo $v_assignment->url ?>">
                    <?php
                    //echo $v_assignment->person_first_name . ' ' . $v_assignment->person_last_name; 
                    if (strlen($v_assignment->person_first_name) && strlen($v_assignment->person_last_name) < 20) {
                        echo $v_assignment->person_first_name . ' ' . $v_assignment->person_last_name;
                    } else {
                        echo substr($v_assignment->person_first_name, 0, 30) . ' ' . substr($v_assignment->person_last_name, 0, 20) . '...';
                    }
                    ?>
                </div>
                <div class="col-sm-2" style="padding: 10px 0 0 0  ">
                    <?php echo $v_assignment->post_date_time; ?>
                </div>

                <div class="col-sm-2" style="padding: 10px 0 0 0  ">
                    <?php
                    $post_status = $v_assignment->post_status;
//                            if ($post_status == 1) {
                    ?>
                        <!--<a href="//<?php // echo base_url() . 'make-inactive-group-post/' . $v_alert->post_id;                     ?>"><i class="fa fa-user-times" title="Inactive"></i></a>&nbsp;&nbsp;-->
                    <?php // } else if ($post_status == 0) {    ?>
                        <!--<a href="//<?php // echo base_url() . 'make-active-group-post/' . $v_alert->post_id;                     ?>" ><i class="fa fa-user-plus " title="Active"></i></a>&nbsp;&nbsp;-->
                    <?php // }    ?>

                    <?php
                    if ($v_assignment->posted_by == $user_id || $group_details->group_created_by == $user_id) {
                        if ($post_status != 2) {
                            ?>
                            <a href="#" onclick="return checkForDelete('<?php echo $v_assignment->post_id; ?>', '<?php echo $group_details->group_id; ?>')"><i class="fa fa-trash-o" title="Delete"></i></a>&nbsp;&nbsp;
                            <?php
                        }
                    }
                    ?>

                </div>
            </div>
            <div class="col-sm-12"><br></div>
                <?php
            }
        }
        ?>
</span>
<?php echo $group_detail_assignment_pagination_link; ?>
