<div class="col-sm-8">
    <div class="row gray">
        <div class="col-sm-12">
            <div class="tab-content">                
                <div class="col-sm-12 gray_ttc text-center" style="border-bottom: 2px solid #8CC73F;padding-top: 10px;padding-bottom: 10px;font-weight: normal">
                    <div class="col-sm-9 text-left"> Batch Details </div>
                    <div class="col-sm-3">Action</div>
                </div>

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

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

                    <?php
                    if (!empty($batch_data)) {
                        foreach ($batch_data as $batch) {
                            ?> 
                    <div class="col-sm-12 gray text-center" style="margin-bottom: 10px">
                                <div class="col-sm-9 text-left" style="padding: 10px">
                                    <span style="font-weight: normal;margin-right: 50px">Batch Name : <?php echo $batch['batch_name'] ?></span>
                                    <br>
                                    <span style="font-weight: normal;margin-right: 53px">
                                        Course Tile :<a href="<?php echo base_url() . $batch['course_url']; ?>"  target="_blank"> <?php echo $batch['course_title']; ?> </a>
                                    </span><br>                                                                                       
                                    <span style="font-weight: normal;margin-right: 115px">Resource Person :
                                        <a href="<?php echo base_url() . $batch['resource_person_url'] . '/profile'; ?> " target="_blank">
                                            <?php 
                                                //echo $batch['resource_person_name'];
                                                 echo substr($batch['resource_person_name'], 0, 40).'...';
                                            ?>
                                        </a>
                                    </span><br>
                                    <span style="font-weight: normal;margin-right: 50px">Course By : 
                                        <a href="<?php echo base_url() . $batch['course_by_url']; ?> " target="_blank">
                                            <?php 
                                                //echo $batch['course_by_name'];
                                                echo substr($batch['course_by_name'], 0, 40).'...';
                                                
                                            ?>
                                        </a>
                                    </span><br>
                                    <span style="font-weight: normal; margin-right: 6px">Total Registered student : <?php echo $batch['course_registered_student']; ?></span><br>
                                    <span style="font-weight: normal;margin-right: 50px">Batch Status : <?php echo $batch['batch_status']; ?></span><br>        
                                </div>
                        <?php if(!empty($batch['certificate'])):?>
                                <div class="col-sm-3" style="padding-top: 10px">                                       
                                    <a href="<?php echo base_url().'view-certificate/'.$batch['certificate']->student_roll_number; ?>" target="_blank">
                                        <i class="fa fa-graduation-cap" title="Certificate"></i>
                                    </a>&nbsp;&nbsp;&nbsp;
                                </div>
                        <?php endif;?>
                            </div>
                        <?php }
                    }else{   ?>                     
                    <p>Get registration in any course to be assigned in a batch! <a href="<?php echo base_url().'course'?>" target="_blank">Course Registration</a></p>
                   <?php }
                    ?>

                </div>                            

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

<script type="text/javascript" src="<?php echo base_url() ?>front_end_resource/batch/batch.js"></script>
