<!-- begin:: Subheader -->
<div class="kt-subheader   kt-grid__item" id="kt_subheader">
<div class="kt-container  kt-container--fluid ">
    <div class="kt-subheader__main">
        <div class="kt-subheader__breadcrumbs">
           <a  class="kt-subheader__breadcrumbs-link">
                Courses </a>
            <span class="kt-subheader__breadcrumbs-separator"></span>
            <a class="kt-subheader__breadcrumbs-link">
                All Courses </a>
            <span class="kt-subheader__breadcrumbs-separator"></span>
            
        </div>
    </div>
    <div class="kt-subheader__toolbar">
        <a href="<?=base_url();?>admin/add_course" class="btn btn-label-brand btn-bold">
            Add Course </a>
        
    </div>                                        
</div>
</div>
<!-- end:: Subheader -->
<!-- begin:: Content -->
<div class="kt-container  kt-container--fluid  kt-grid__item kt-grid__item--fluid">
   <div class="kt-portlet">
      <div class="kt-portlet__body kt-portlet__body--fit">
         <div class="kt-portlet__body">

            <!--begin: Datatable -->
            <table class="table table-striped- table-bordered table-hover table-checkable" id="kt_table_1">
                <thead>
                    <tr>                                                    
                        <th>S No.</th>                                                                  
                        <th> Name </th>
                        <th> Semesters </th>
                        <th> Status</th>
                        <th> Actions</th>
                    </tr>
                </thead>
                <?php $i=1; foreach ($course_list as $key):?>
                    <tr>
                        <td><?=$i?></td>
                        <td><?=ucfirst($key->name);?></td>
                        <td><?=$key->years;?></td>
                        <td>
                            <?php if($key->status==1){ ?>   
                    <a href="<?=base_url();?>admin/course_status/<?=$key->id; ?>/2"><p class="kt-badge kt-badge--brand kt-badge--inline kt-badge--pill">Active</p></a>
                    <?php } else { ?>
                        <a href="<?=base_url();?>admin/course_status/<?=$key->id; ?>/1"><p class="kt-badge  kt-badge--danger kt-badge--inline kt-badge--pill">Inactive</p></a>
                    <?php } ?>  
                        </td>
                        <td>                            
                            <a href="<?=base_url();?>admin/edit_course/<?=$key->id; ?>" class="btn btn-sm btn-clean btn-icon btn-icon-md">
                                <i class="la la-edit"></i>
                            </a>
                            <a href="javascript:confirmDelete('<?=base_url();?>admin/delete_course/<?=$key->id; ?>')" class="btn btn-sm btn-clean btn-icon btn-icon-md">                                                                       
                                <i class="kt-nav__link-icon flaticon2-trash"></i>
                            </a>                           
                        </td>
                    </tr>
                    <?php $i++; endforeach ?>                                              
                </tbody>
            </table>

            <!--end: Datatable -->
        </div>
      </div>
   </div>
</div>
