<?php defined('BASEPATH')or exit("NO DIRECT ACCESS iS ALLOWED");?>

<section class="content home">
    <div class="container-fluid">
        <div class="block-header">
              <!-- -->
              <div class="row clearfix">
                  <div class="col-sm-12 col-md-6 col-lg-5"> <!--<b>Large</b>-->
                    <h2>Dashboard</h2>
<!--    <small class="text-muted">Welcome to Swift application</small> -->
                  </div>
                  <div class="col-sm-12 col-md-6 col-lg-3"> <!--<b>Large</b>-->
                    <span><?=$link;?></span>
                      <!-- <ul class="pagination pagination-sm">
                          <li class="page-item"><a class="page-link" href="#">Previous</a></li>
                          <li class="page-item"><a class="page-link" href="#">1</a></li>
                          <li class="page-item"><a class="page-link" href="#">2</a></li>
                          <li class="page-item"><a class="page-link" href="#">3</a></li>
                          <li class="page-item"><a class="page-link" href="#">Next</a></li>
                      </ul> -->
                  </div>
              </div>
        </div>


        <div class="row clearfix">
            <!-- Task Info -->
            <?php if ($this->session->flashdata('message') == TRUE): ?>
              <div class="alert alert-success"><?php echo $this->session->flashdata('message'); ?></div>
            <?php endif; ?>
            <div class="col-sm-12 col-md-12">
                <div class="card">
                    <div class="header">
                        <h2>TASK INFOS</h2>
                        <ul class="header-dropdown">
                            <li class="dropdown"> <a href="javascript:void(0);" class="dropdown-toggle" data-toggle="dropdown" role="button" aria-haspopup="true" aria-expanded="false"><i class="zmdi zmdi-more-vert"></i></a>
                                <ul class="dropdown-menu pull-right">
                                  <li><?=anchor("Admin/student_list","All S Image View",['class'=>'waves-effect waves-block'])?></li>
                                  <li><?=anchor("Admin/student_index","All Student Table View",['class'=>'waves-effect waves-block'])?></li>
                                  <li><?=anchor("Admin/student_create","Add Student",['class'=>'waves-effect waves-block'])?></li>
                                </ul>
                            </li>
                        </ul>
                    </div>
                    <div class="body">
                        <div class="table-responsive">
                            <table class="table table-hover dashboard-task-infos">
                                <thead>
                                    <tr>
                                        <th>#</th>
                                        <th>Task</th>
                                        <th>Status</th>
                                        <th>Professors</th>
                                        <th>Progress</th>
                                        <th>Action</th>
                                    </tr>
                                </thead>
                                <tbody>
                                  <?php if( count($list) ):$sn=1;
                                			$count = $this->uri->segment(4);
                                			foreach($list as $lists ): ?>
                                    <tr>
                                        <td ><?php echo  $sn; ?></td>
                                        <td ><?php echo  strtoupper($lists->name);?></td>
                                        <td ><?php echo img(array("src"=>$lists->profile_image,"height"=>"50","width"=>"50"))?></td>
                                        <?php $json2 =  json_decode($lists->info);?>
                                        <td ><?php echo  strtoupper($json2->profile->first_name);?></td>
                                        <td > </td>
                                        <td >
                                          <?php echo anchor("Admin/edit_student/{$lists->id}",'<i class="material-icons">mode_edit</i>',['title'=>'Edit Student']); ?><?php nbs(3);?>
                                          <?php echo anchor("Admin/view_student/{$lists->id}",'<i class="material-icons">remove_red_eye</i>',['title'=>'View Student']); ?>
                                          <?php echo anchor("Admin/delete_student/{$lists->id}",'<i class="material-icons">delete_forever</i>',['title'=>'Delete Student',
                                          'onClick' =>"return confirm('Are you sure you want to delete?')"]); ?>
                                        </td>
                                        <!-- <td><span class="label bg-green">Doing</span></td>
                                        <td>John Doe</td>
                                        <td><div class="progress m-b-0">
                                                <div class="progress-bar bg-green" role="progressbar" aria-valuenow="62" aria-valuemin="0" aria-valuemax="100" style="width: 62%"></div>
                                            </div></td> -->
                                     </tr>
                                      <?php $sn++; unset($json2);?>
                                      <?php endforeach; ?>
                                      <?php else : ?>
                                        <tr>
                                        <td colspan="6"><strong>No record found</strong></td>
                                        </tr>
                                      <?php endif; ?>

                                </tbody>
                            </table> <?php $count++; //echo  $link; ?>
                        </div>
                    </div>
                </div>
            </div>
            <!-- #END# Task Info -->
        </div>


	</div>
</section>
