<div class="col-sm-10">
    <div class="row ">
        <div class="col-sm-12 "><br></div>
        <div class="col-sm-12 ">
            <div class="col-sm-12">
                <label>Dashboard-&gt;&gt; Manage Bug Report</label><br>
            </div>

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

                <div class="col-sm-12 gray_ttc" style="border-bottom: 2px solid #8CC73F;padding-top: 10px;padding-bottom: 10px;font-weight: bold">
                    <div class="col-sm-8">Bug Subject</div>                   
                    <div class="col-sm-4">Action</div>
                </div>
                <div class="col-sm-12"><br></div> 
                <div class="col-sm-12 gray_ttc " style="padding-top: 10px;padding-bottom: 10px;">
                    <?php foreach ($all_bug_report as $all_bug_report_info) { ?>
                        <div class="col-sm-8">
                            <a target="_blank" href="<?php echo base_url(); ?>view-bug-report/<?php echo $all_bug_report_info->support_id; ?>" > 
                                <?php echo $all_bug_report_info->support_title; ?>
                            </a>
                        </div>
                        <div class="col-sm-4 padding-zero">
                            <a href="<?php echo base_url(); ?>edit-bug-report/<?php echo $all_bug_report_info->support_id; ?>">
                                <i class="fa fa-edit" title="Edit"></i>
                            </a>&nbsp;
                            <?php if ($all_bug_report_info->support_status == 0) { ?>
                                <a href="javascript:void(0)" 
                                   data-toggle="modal" 
                                   data-target="#activebugreportalert<?php echo $all_bug_report_info->support_id ?>">
                                    <i class="fa fa-user-plus" title="Active"></i>
                                </a>
                            <?php } else { ?>
                                <a href="javascript:void(0)" 
                                   data-toggle="modal" 
                                   data-target="#inactivebugreportalert<?php echo $all_bug_report_info->support_id ?>">
                                    <i class="fa fa-user-times" title="Inactive"></i> 
                                </a>
                            <?php } ?>

                            <?php if ($manage_bug_report_by_person->person_role == 6) { ?>
                                <a href="javascript:void(0)" 
                                   data-toggle="modal" 
                                   data-target="#bugreportdeletealert<?php echo $all_bug_report_info->support_id ?>">
                                    <i class="fa fa-trash" title="Delete"></i>
                                </a>&nbsp;
                            <?php } ?>  
                            <a target="_blank" href="<?php echo base_url(); ?>reply-bug-report/<?php echo $all_bug_report_info->support_id; ?>" > <i class="fa fa-reply" title="Reply"></i></a>
                        </div>

                        <div class="modal" style="" id="activebugreportalert<?php echo $all_bug_report_info->support_id ?>" tabindex="-1" role="dialog" aria-labelledby="changeRole" aria-hidden="true">
                            <div class="modal-dialog">
                                <div class="modal-content" style="top: 180px;border: 5px solid #80c12c;border-top: 20px solid #80c12c !important;margin: 0 auto;width: 450px">           
                                    <div class="modal-body">
                                        <h4 class="text-center">Are you sure want to Active this Bug Report?</h4>
                                    </div>
                                    <div class="modal-footer">
                                        <div  class="col-sm-12">               
                                            <button onclick="activebugreport('<?php echo base_url(); ?>active-bug-report', '<?php echo $all_bug_report_info->support_id ?>')" style="margin-left: 90px" type="button" class="btn btn-success  col-sm-2" data-dismiss="modal">Yes</button>
                                            <button type="button" style="margin-left: 20px" class="btn btn-danger col-sm-2 col-sm-offset-4" data-dismiss="modal">No</button>
                                        </div>
                                    </div>            
                                </div>
                            </div>
                        </div>


                        <div class="modal" style="" id="inactivebugreportalert<?php echo $all_bug_report_info->support_id ?>" tabindex="-1" role="dialog" aria-labelledby="changeRole" aria-hidden="true">
                            <div class="modal-dialog">
                                <div class="modal-content" style="top: 180px;border: 5px solid #80c12c;border-top: 20px solid #80c12c !important;margin: 0 auto;width: 450px">           
                                    <div class="modal-body">
                                        <h4 class="text-center">Are you sure want to Inactive this Bug Report?</h4>
                                    </div>
                                    <div class="modal-footer">
                                        <div  class="col-sm-12">               
                                            <button onclick="inactivebugreport('<?php echo base_url(); ?>inactive-bug-report', '<?php echo $all_bug_report_info->support_id ?>')" style="margin-left: 90px" type="button" class="btn btn-success  col-sm-2" data-dismiss="modal">Yes</button>
                                            <button type="button" style="margin-left: 20px" class="btn btn-danger col-sm-2 col-sm-offset-4" data-dismiss="modal">No</button>
                                        </div>
                                    </div>            
                                </div>
                            </div>
                        </div>

                        <div class="modal" style="" id="bugreportdeletealert<?php echo $all_bug_report_info->support_id ?>" tabindex="-1" role="dialog" aria-labelledby="changeRole" aria-hidden="true">
                            <div class="modal-dialog">
                                <div class="modal-content" style="top: 180px;border: 5px solid #80c12c;border-top: 20px solid #80c12c !important;margin: 0 auto;width: 450px">           
                                    <div class="modal-body">
                                        <h4 class="text-center">Are you sure want to Delete this Bug Report?</h4>
                                    </div>
                                    <div class="modal-footer">
                                        <div  class="col-sm-12">               
                                            <button onclick="deletebugreport('<?php echo base_url(); ?>delete-bug-report', '<?php echo base_url(); ?>manage-bug-report', '<?php echo $all_bug_report_info->support_id ?>')" style="margin-left: 90px" type="button" class="btn btn-success  col-sm-2" data-dismiss="modal">Yes</button>
                                            <button type="button" style="margin-left: 20px" class="btn btn-danger col-sm-2 col-sm-offset-4" data-dismiss="modal">No</button>
                                        </div>
                                    </div>            
                                </div>
                            </div>
                        </div> 



                    <?php } ?>
                </div>



                <?php
                $total_page = ceil($total_bug->total_bug / 10);
                if ($total_page > 1) {
                    ?>
                    <nav class="course-pagination">
                        <ul class="pagination">
                            <?php
                            if ($page > 2) {
                                ?>
                                <li>
                                    <a href="<?php echo base_url() . 'manage-bug-report/'; ?>" aria-label="Previous">
                                        <span aria-hidden="true" title="First Page">««</span>
                                    </a>
                                </li>
                                <li>
                                    <a href="<?php echo base_url() . 'manage-bug-report/' . ($page - 1); ?>" aria-label="Previous">
                                        <span aria-hidden="true" title="Previous Page">«</span>
                                    </a>
                                </li>
                            <?php } elseif ($page > 1) { ?>
                                <li>
                                    <a href="<?php echo base_url() . 'manage-bug-report/' . ($page - 1); ?>" aria-label="Previous">
                                        <span aria-hidden="true" title="Previous Page">&laquo;</span>
                                    </a>
                                </li>
                                <?php
                            }
                            for ($i = 0; $total_page > $i; $i++) {
                                echo '<li><a href="' . base_url() . 'manage-bug-report/' . ($i + 1) . '">' . ($i + 1) . '</a></li>';
                            }
                            if ($total_page != $page) {
                                ?>                              
                                <li>
                                    <a href="<?php echo base_url() . 'manage-bug-report/' . ($page + 1); ?>" aria-label="Next">
                                        <span aria-hidden="true" title="Next Page">&raquo;</span>
                                    </a>
                                </li>
                                <li>
                                    <a href="<?php echo base_url() . 'manage-bug-report/' . $total_page; ?>" aria-label="Next">
                                        <span aria-hidden="true" title="Last Page">&raquo;&raquo;</span>
                                    </a>
                                </li>
                            <?php }
                            ?>
                        </ul>
                    </nav>
                <?php }
                ?>
            </div>
        </div>
    </div>
</div>
<script type="text/javascript" src="<?php echo base_url() ?>back_end_resource/support/support.js"></script>



