<style>
    body{background:#EAEDED;}
    a{color:black;}
a:hover{text-decoration:none;}
</style>

<div class="container-fluid mt-3 mb-3">
    <div class="row">
        <div class="col-sm-12 bg-white pt-3 pb-3">

            <ul class="breadcrumb">
                
                <li class="breadcrumb-item"><a href="<?php echo base_url(); ?>Welcome">Home</a></li> 
                <li class="breadcrumb-item">Fee Heads</li> 
                <!--<li class="breadcrumb-item"></li> -->
            </ul>    
    
            <a href="<?php echo base_url();?>Fee/add_new_fee_head" class="btn btn-sm btn-info mb-3">Add New Fee Head</a>    
           
    

            <div class="table-responsive">
                <table class="table table-bordered table-striped">
                    <thead>
                        <tr>
                            <th>#</th>
                            <th>Fee Head</th>
                            <th>Status</th>
                            <th>Edit</th>
                            <!--<th>Fee</th>-->
                        </tr>
                    </thead>
                    <tbody>
                    <?php    
                    $table='fee_heads';
                    $count=0;
                    $all_heads=$this->NewFeeModel->get_fee_heads_session_wise($table);
                    if($all_heads){
                        foreach($all_heads as $fee_heads){
                            $count=$count + 1;
                            $status=$fee_heads['status'];
                    ?>
                        <tr>
                            <td><?php echo $count; ?></td>
                            <td><?php echo $fee_heads['title']; ?></td>
                            <td>
                                <?php 
                                if($status == 1){
                                ?>
                                <button class="btn btn-sm btn-outline-success">Active</button>
                                <?php
                                }else if($status == 0){
                                ?>
                                <button class="btn btn-sm btn-outline-danger">Inactive</button>
                                <?php
                                }
                                ?>
                            </td>
                            <td>
                                <a href="<?php echo base_url()."Fee/edit_fee_head/".$fee_heads['id']; ?>" class="btn btn-sm btn-warning">Edit</a>
                            </td>
  

                        </tr>

                    <?php
                        }
                    }
                    ?>
                    </tbody>
                </table>
            </div>

        </div>
    </div>
</div>