<div class="col-sm-10">

    <div class="row ">

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

            <div class="col-sm-12 ">
                <div class="col-sm-12 gray">

                    <div class="col-sm-4 h4">
                        Manage Tutorial
                    </div>
                    <div class="col-sm-4 col-sm-offset-4 ">

                        <form action="#" method="post">
                            <div class="input-group">
                                <input type="text" class="form-control"  placeholder="Search here..." aria-describedby="basic-addon1">
                                <span class="input-group-addon" id="basic-addon1"><i class="fa fa-search"></i></span>
                            </div>
                        </form>

                    </div>

                </div>
            </div>

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

                <div class="col-sm-12 gray_ttc text-center" style="border-bottom: 2px solid #8CC73F;padding-top: 10px;padding-bottom: 10px;font-weight: bold">

                    <div class="col-sm-5">Tutorial Title</div>
                    <div class="col-sm-2">Topics</div>
                    <!--<div class="col-sm-2">Work File</div>-->
                    <div class="col-sm-2">Status</div>
                    <div class="col-sm-3">Action</div>
                </div>
                <div class="col-sm-12"><br></div> 

                <?php foreach ($all_tutorial as $v_all_tutorial) { ?>    
                    <div class="col-sm-12 gray text-center" >
                        <div class="col-sm-5" style="padding-top: 10px "><a href="#"><?php echo $v_all_tutorial->tutorial_title; ?></a></div>
                        <div class="col-sm-2" style="padding-top: 10px"><a href="<?php echo base_url() ?>manage-tutorial-topics/<?php echo $v_all_tutorial->tutorial_id ?>"><?php echo count($topics[$v_all_tutorial->tutorial_id]) ?></a></div>
                        <!--<div class="col-sm-2" style="padding-top: 10px"><a href="<?php echo base_url() ?>manage-tutorial-work-file/<?php echo $v_all_tutorial->tutorial_id ?>"><?php echo count($tutorial_work_file[$v_all_tutorial->tutorial_id]) ?></a></div>-->
                        <div class="col-sm-2" style="padding-top: 10px">

                            <?php
                            $tutorial_status = $v_all_tutorial->tutorial_status;
                            if ($tutorial_status == 0) {
                                echo '<strong style=color:red>Unpublished</strong>';
                            } else if ($tutorial_status == 1) {
                                echo '<strong style=color:green>Published</strong>';
                            } else if ($tutorial_status == 2) {
                                echo '<strong style=color:limegreen>Archive</strong>';
                            }
                            ?>

                        </div>
                        <div class="col-sm-3" style="padding-top: 10px">
                            <a href="<?php echo base_url() ?>edit-tutorial/<?php echo $v_all_tutorial->tutorial_id ?>"><i class="fa fa-edit" title="Edit"></i></a>
                            <span>&nbsp;</span>
                            <a href="<?php echo base_url() ?>delete-tutorial/<?php echo $v_all_tutorial->tutorial_id ?>"><i class="fa fa-trash-o" title="Delete"></i></a>
                            <span>&nbsp;</span>



                            <?php
                            $tutorial_status = $v_all_tutorial->tutorial_status;
                            if ($tutorial_status == 0) {
                                ?>

                                <a href="<?php echo base_url() ?>active-tutorial/<?php echo $v_all_tutorial->tutorial_id ?>"><i class="fa  fa-user-plus" title="Published"></i></a><span>&nbsp;</span>

                                <a href="<?php echo base_url() ?>archive-tutorial/<?php echo $v_all_tutorial->tutorial_id ?>"><i class="fa  fa-user-secret" title="Archive"></i></a>
                            <?php } else if ($tutorial_status == 1) {
                                ?>

                                <a href="<?php echo base_url() ?>inactive-tutorial/<?php echo $v_all_tutorial->tutorial_id ?>"><i class="fa  fa-user-times" title="Unpublished"></i></a><span>&nbsp;</span>

                                <a href="<?php echo base_url() ?>archive-tutorial/<?php echo $v_all_tutorial->tutorial_id ?>"><i class="fa  fa-user-secret" title="Archive"></i></a>

                                <?php
                            } else if ($tutorial_status == 2) {
                                ?>

                                <a href="<?php echo base_url() ?>active-tutorial/<?php echo $v_all_tutorial->tutorial_id ?>"><i class="fa  fa-user-plus" title="Published"></i></a><span>&nbsp;</span>

                                <a href="<?php echo base_url() ?>inactive-tutorial/<?php echo $v_all_tutorial->tutorial_id ?>"><i class="fa  fa-user-times" title="Unpublished"></i></a><span>&nbsp;</span>

                            <?php } ?>


                        </div>
                    </div>

                <?php } ?>    

                <div class="col-sm-12"><br><br></div> 
                <div class="col-sm-12  text-center" >
                    <nav class="course-pagination">
                        <ul class="pagination">
                            <li>
                                <a href="#" aria-label="Previous">
                                    <span aria-hidden="true" title="First Page">&laquo;&laquo;</span>
                                </a>
                            </li>
                            <li>
                                <a href="#" aria-label="Previous">
                                    <span aria-hidden="true" title="Previous Page">&laquo;</span>
                                </a>
                            </li>
                            <li><a href="#">1</a></li>
                            <li><a href="#">2</a></li>
                            <li><a href="#">3</a></li>
                            <li><a href="#">4</a></li>
                            <li><a href="#">5</a></li>
                            <li>
                                <a href="#" aria-label="Next">
                                    <span aria-hidden="true" title="Next Page">&raquo;</span>
                                </a>
                            </li>
                            <li>
                                <a href="#" aria-label="Next">
                                    <span aria-hidden="true" title="Last Page">&raquo;&raquo;</span>
                                </a>
                            </li>
                        </ul>
                    </nav>
                </div>



            </div>


        </div><!-- /.row gray -->


    </div>



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

    <div class="col-sm-12 ">
        <div class="col-sm-12 gray text-left">
            <label><a href="<?php echo base_url() ?>super_admin">Dashboard </a>->>Manage Tutorial</label>
        </div> 
    </div> 
    <div class="col-sm-12">    <br><br></div>
</div>





