<div class="col-sm-10">
    <div class="row ">
        <div class="col-sm-12 ">
            <div class="col-sm-6 col-sm-offset-3">
                <div class="input-group">
                    <input type="text" 
                           class="form-control"
                           id="search_input"
                           placeholder="Search here..." 
                           aria-describedby="basic-addon1">
                    <input type="hidden" id="baseUrl" value="<?php echo base_url(); ?>">
                    <span class="input-group-addon" id="basic-addon1"><i class="fa fa-search"></i></span>
                </div>
            </div>
        </div>

        <div class="col-sm-12 "><br></div>
        <div class="col-sm-12 ">
            <div class="col-sm-12" ><br>  <hr></div>
            <div class="col-sm-12" id="view_course">
                <div class="col-sm-12 gray_ttc" style="border-bottom: 2px solid #8CC73F;padding-top: 10px;padding-bottom: 10px;font-weight: bold">
                    <div class="col-sm-2">Topic Name</div>
                    <div class="col-sm-4">Course Name</div>
                    <div class="col-sm-2">Folder Name</div>
                    <div class="col-sm-1">Total Work file</div>          
                    <div class="col-sm-1">Status</div>          
                    <div class="col-sm-2">Action</div>
                </div>
                <div class="col-sm-12"><br></div>


                <div class="col-sm-12 padding-zero" id="view_work_file_courses">
                    <?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;
                    ?>
                </div>
            </div>



        </div>
    </div>

    <div class="col-sm-12 "><br></div>
    <div class="col-sm-12 ">
        <div class="col-sm-12 gray" style="padding-left: 10px">
            <a href="<?php echo base_url(); ?>super-admin">Dashboard</a>->> <span> Manage Course Work File </span>
        </div>
    </div>
    <div class="col-sm-12 "><br></div>

</div>

<script type="text/javascript" src="<?php echo base_url() ?>back_end_resource/course/view_course_work_file.js"></script>