<?php
switch ($type) {
    case $type == 'public' || $type == 'tt_user':
        if ($category_value->course_category_access_level == 2) {
            ?>
            <a href="javascript:void(0)"
               onclick="checkChildID('<?php echo base_url() . 'super-admin/change-course-category-action'; ?>', '<?php echo $category_value->course_category_id; ?>', 'Access Level', 'public')" >
                <i class="fa fa-users" title="Public"></i>
            </a>
            <?php
        } else if ($category_value->course_category_access_level == 1) {
            ?>
            <a href="javascript:void(0)"
               onclick="checkChildID('<?php echo base_url() . 'super-admin/change-course-category-action'; ?>', '<?php echo $category_value->course_category_id; ?>', 'Access Level', 'tt_user')" >
                <img src="<?php echo base_url() ?>image/dashboard-tt-icon.png" title="TalhaTraining" alt="TalhaTraining">
            </a>
            <?php
        }
        break;
        
    case $type == 'yes' || $type == 'no':

        if ($category_value->course_category_home_page_view == 1) {
            ?>
            <a href="javascript:void(0)"
               onclick="checkChildID('<?php echo base_url() . 'super-admin/change-course-category-action'; ?>', '<?php echo $category_value->course_category_id; ?>', 'View Status', 'yes')" >
                <i class="fa fa-check-circle" title="Yes"></i>
            </a>
            <?php
        } else if ($category_value->course_category_home_page_view == 2) {
            ?>
            <a href="javascript:void(0)"
               onclick="checkChildID('<?php echo base_url() . 'super-admin/change-course-category-action'; ?>', '<?php echo $category_value->course_category_id; ?>', 'View Status', 'no')" >
                <i class="fa fa-times" title="NO"></i>
            </a>
            <?php
        }
        break;
        
    case $type == 'active' || $type == 'inactive' || $type == 'pending' || $type == 'approved' || $type == 'archive':
        switch ($category_value->course_category_status) {
            case 1:
                ?>
                <span>&nbsp;</span>
                <a href="javascript:void(0)"
                   onclick="checkChildID('<?php echo base_url() . 'super-admin/change-course-category-action'; ?>', '<?php echo $category_value->course_category_id; ?>', 'Status', 'inactive')" >
                    <i class="fa fa-user-times" title="Inactive"></i>
                </a>
                <span>&nbsp;</span>
                <a href="javascript:void(0)"
                   onclick="checkChildID('<?php echo base_url() . 'super-admin/change-course-category-action'; ?>', '<?php echo $category_value->course_category_id; ?>', 'Status', 'pending')" >
                    <i class="fa fa-refresh fa-spin" title="Pending"></i>
                </a>
                <span>&nbsp;</span>
                <a href="javascript:void(0)"
                   onclick="checkChildID('<?php echo base_url() . 'super-admin/change-course-category-action'; ?>', '<?php echo $category_value->course_category_id; ?>', 'Status', 'archive')" >
                    <i class="fa fa-archive" title="Archive"></i>
                </a>
                <span>&nbsp;</span>
                <a href="javascript:void(0)"
                   onclick="checkChildID('<?php echo base_url() . 'super-admin/change-course-category-action'; ?>', '<?php echo $category_value->course_category_id; ?>', 'Status', 'delete')" >
                    <i class="fa fa-trash-o" title="Delete"></i>
                </a>
                <span>&nbsp;</span>
                <a href="<?php echo base_url().'super-admin/edit-course-category/'.$category_value->url ?>"><i class="fa fa-edit" title="Edit"></i></a>
                <?php
                break;
            case 2:
                ?>
                <span>&nbsp;</span>
                <a href="javascript:void(0)"
                   onclick="checkChildID('<?php echo base_url() . 'super-admin/change-course-category-action'; ?>', '<?php echo $category_value->course_category_id; ?>', 'Status', 'active')" >
                    <i class="fa fa-user-plus" title="Acitve"></i>
                </a>
                <span>&nbsp;</span>
                <a href="javascript:void(0)"
                   onclick="checkChildID('<?php echo base_url() . 'super-admin/change-course-category-action'; ?>', '<?php echo $category_value->course_category_id; ?>', 'Status', 'pending')" >
                    <i class="fa fa-refresh fa-spin" title="Pending"></i>
                </a>
                <span>&nbsp;</span>
                <a href="javascript:void(0)"
                   onclick="checkChildID('<?php echo base_url() . 'super-admin/change-course-category-action'; ?>', '<?php echo $category_value->course_category_id; ?>', 'Status', 'archive')" >
                    <i class="fa fa-archive" title="Archive"></i>
                </a>
                <span>&nbsp;</span>
                <a href="javascript:void(0)"
                   onclick="checkChildID('<?php echo base_url() . 'super-admin/change-course-category-action'; ?>', '<?php echo $category_value->course_category_id; ?>', 'Status', 'delete')" >
                    <i class="fa fa-trash-o" title="Delete"></i>
                </a>
                <span>&nbsp;</span>
                <a href="<?php echo base_url().'super-admin/edit-course-category/'.$category_value->url ?>"><i class="fa fa-edit" title="Edit"></i></a>
                <?php
                break;
            case 3:
                ?>
                <span>&nbsp;</span>
                <a href="javascript:void(0)"
                   onclick="checkChildID('<?php echo base_url() . 'super-admin/change-course-category-action'; ?>', '<?php echo $category_value->course_category_id; ?>', 'Status', 'active')" >
                    <i class="fa fa-user-plus" title="Acitve"></i>
                </a>
                <span>&nbsp;</span>
                <a href="javascript:void(0)"
                   onclick="checkChildID('<?php echo base_url() . 'super-admin/change-course-category-action'; ?>', '<?php echo $category_value->course_category_id; ?>', 'Status', 'delete')" >
                    <i class="fa fa-trash-o" title="Delete"></i>
                </a>
                <span>&nbsp;</span>
                <a href="<?php echo base_url().'super-admin/edit-course-category/'.$category_value->url ?>"><i class="fa fa-edit" title="Edit"></i></a>
                <?php
                break;
            case 4:
                ?>
                <span>&nbsp;</span>
                <a href="javascript:void(0)"
                   onclick="checkChildID('<?php echo base_url() . 'super-admin/change-course-category-action'; ?>', '<?php echo $category_value->course_category_id; ?>', 'Status', 'approved')" >
                    <i class="glyphicon glyphicon-ok" title="Approved"></i>
                </a>
                <span>&nbsp;</span>
                <a href="javascript:void(0)"
                   onclick="checkChildID('<?php echo base_url() . 'super-admin/change-course-category-action'; ?>', '<?php echo $category_value->course_category_id; ?>', 'Status', 'delete')" >
                    <i class="fa fa-trash-o" title="Delete"></i>
                </a>
                <span>&nbsp;</span>
                <a href="<?php echo base_url().'super-admin/edit-course-category/'.$category_value->url ?>"><i class="fa fa-edit" title="Edit"></i></a>
                <?php
                break;
            case 5:
                ?>
                <span>&nbsp;</span>
                <a href="javascript:void(0)"
                   onclick="checkChildID('<?php echo base_url() . 'super-admin/change-course-category-action'; ?>', '<?php echo $category_value->course_category_id; ?>', 'Status', 'active')" >
                    <i class="fa fa-user-plus" title="Acitve"></i>
                    <span>&nbsp;</span>
                    <a href="javascript:void(0)"
                       onclick="checkChildID('<?php echo base_url() . 'super-admin/change-course-category-action'; ?>', '<?php echo $category_value->course_category_id; ?>', 'Status', 'delete')" >
                        <i class="fa fa-trash-o" title="Delete"></i>
                    </a>
                    <span>&nbsp;</span>
                    <a href="<?php echo base_url().'super-admin/edit-course-category/'.$category_value->url ?>"><i class="fa fa-edit" title="Edit"></i></a>
                    <?php
                    break;
            }
            break;
    }