<?php
foreach ($work_file as $value) {
    ?>
    <div class="col-sm-12 gray_ttc " style="padding-top: 10px;padding-bottom: 10px;">
        <div class="col-sm-2">
            <?php
            echo $topic_name[$value->work_file_id];
            ?>
        </div>
        <div class="col-sm-4">
            <a href="<?php echo base_url($course_url[$value->work_file_id]); ?>" target="_blank">
                <?php
//                                    if (strlen($course_value->course_name) > 30) {
//                                        echo mb_substr($course_value->course_name, 0, 30, 'utf-8') . ' ...';
//                                    } else {
//                                        echo $course_value->course_name;
//                                    }
                echo $course_info[$value->work_file_id]->course_name;
                ?>
            </a>
        </div>
        <div class="col-sm-2 ">
            <?php
            echo $folder_name[$value->work_file_id];
            ?>
        </div>
        <div class="col-sm-1 text-center">
            <?php
            echo $total_work_file[$value->work_file_id];
            ?>
        </div>
        <div class="col-sm-1 ">
            <?php
            echo ($value->work_file_status == '1') ? 'Active' : 'Draft';
            ?>
        </div>
        <div class="col-sm-2">
            <a href="<?php echo base_url() . 'admin/course/edit-work-file/' . $course_url[$value->work_file_id]; ?>" target="_blank">
                <i class="fa fa-edit" title="Edit"></i>
            </a>&nbsp;
            <a href="<?php echo base_url() . 'admin/course/view-work-file/' . $course_url[$value->work_file_id]; ?>" target="_blank">
                <i class="glyphicon glyphicon-open" title="work file"></i>
            </a>&nbsp;
            <a href="javascript:void(0)" id="deleteWorkFile<?php echo $course_url[$value->work_file_id]; ?>">
                <i class="fa fa-trash" title="Delete"></i>
            </a>
        </div>
    </div>
    <div class="modal fade" style="" id="viewDeleteWorkFileModal<?php echo $course_url[$value->work_file_id]; ?>" tabindex="-1" role="dialog" aria-labelledby="changeRole" aria-hidden="true">
        <?php
        $message2 = '<span style="text-align:center">Are you sure you want to delete course work file?</span>';
        $this->cf->view_modal($course_url[$value->work_file_id], $message2);
        ?>
    </div>
    <?php
}
echo $pagination_link;