<?php defined('BASEPATH') or exit('No direct Access is Allowed'); ?>
<style>
.container-tb {
    height: 500px;
    width: 100%;
    overflow: auto;
    border: 2px solid #999;
}
* {
    -moz-box-sizing: border-box;
    -webkit-box-sizing: border-box;
    box-sizing: border-box;
}
table {
    border-collapse: collapse;
    table-layout: fixed;
    width: auto;
    min-width: 100%;
}
td, th {
    border: 1px solid #ccc;
    padding-left: 10px;
    padding-right: 10px;
    white-space: nowrap;
}
thead td, thead th {
    border-top: none;
    border-bottom: none;
}
tfoot td, thead th {
    border-top: none;
    border-bottom: none;
}
td.fth-header, th.fth-header, td.fth-footer, th.fth-footer {
    border-top: none !important;
    border-bottom: none !important;
}
td.fth-header, th.fth-header {
        padding: 3px;
    background-color: #444;
    border-bottom: rgba(0,0,0,0.2);
    color: white;
}
td.fth-footer, th.fth-footer {
    background-color:  #444;
    border-top:  rgba(0,0,0,0.2);
    color: white;
}

.input-sm {
    height: 34px;
    padding: 7px 8px;
	}
	.padding_20 {
    padding: 0;
}
.emp_style
{
margin-top:12px;
}
.collapse_tool{
    position: absolute;
    right: 10px;
      top: 8px;
}
.padding_box {
    padding:5px!important;
    margin-top: 0px!important;
	}
.wrap {
    position: absolute;
    overflow: hidden;
    top: 18%;
    right: 1.1%;
    bottom: auto;
    padding: 14px 0px;
  display: block;
  border-radius: 4px;
  transform: translateY(20px);
  transition: all 0.5s;
  visibility: hidden;
}
.wrap .content {
  opacity: 0;
}
.wrap:before {
  position: absolute;
  width: 1px;
  height: 1px;
  background: white;
  content: "";
  bottom: 10px;
  left: 50%;
  top: 95%;
  color: #fff;
  border-radius: 50%;
  -webkit-transition: all 600ms cubic-bezier(0.215, 0.61, 0.355, 1);
  transition: all 600ms cubic-bezier(0.215, 0.61, 0.355, 1);
}
.wrap.active {
  display: block;
  visibility: visible;
 box-shadow: 0px 14px 12px silver;
  transition: all 600ms;
  transform: translateY(0px);
  transition: all 0.5s;
      font-family: sans-serif;
	      width: 94%;
}
.wrap.active:before {
  height: 2000px;
  width: 2000px;
  border-radius: 50%;
  top: 50%;
  left: 50%;
  margin-left: -1000px;
  margin-top: -1000px;
  display: block;
  -webkit-transition: all 600ms cubic-bezier(0.215, 0.61, 0.355, 1);
  transition: all 600ms cubic-bezier(0.215, 0.61, 0.355, 1);
}
.wrap.active .content {
  position: relative;
  z-index: 1;
  opacity: 1;
  transition: all 600ms cubic-bezier(0.55, 0.055, 0.675, 0.19);
}
button_collapse{
padding: 6px 11px 6px 6px;
    outline: none;
    /* border-radius: 50%; */
    /* background: #007fed; */
    color: #fff;
    font-size: 13px;
    display: block;
    /* position: absolute; */
    /* left: 50%; */
    /* bottom: 67px; */
    top: -1px;
    margin-left: -28px;
    transition: transform 0.25s;
	}
	a.btn.btn-sm.btn-social.btn-github.pull-right.button_collapse {
    font-size: 13px!important;
    /* font-weight: 900; */
    font-family: sans-serif!important;
}
.button_collapse:hover {
  text-decoration: none;
  
}
.button_collapse.active {
     /* padding: 6px 19px 6px 6px; */
    margin-top:1px;
    font-size: 13px;
    /* font-weight: 900; */
    font-family: sans-serif;
    transition: transform 0.5s;
}

.content_pop {
    min-height:0px;
    padding: 0;
    margin-right: auto;
    margin-left: auto;
    padding-left: 0px;
    padding-right: 0;
}	
.btn_mrgin{
margin-top:12px;
}	
.select2-container {
    font-size: 12px;
}
.select2-container--default .select2-selection--single, .select2-selection .select2-selection--single {
    border: 1px solid #d2d6de;
    border-radius: 0;
    padding: 6px 10px;
    height: 34px;
    margin-top: 12px;
}
.select2-container--default .select2-selection--single .select2-selection__arrow {
    height: 26px;
    position: absolute;
    top: 13px;
    right: 1px;
    width: 20px;
}
select.input-sm {
     height: 34px;
}
</style>
<div class="content-wrapper">
  <!-- Content Header (Page header) -->
<?php /*?>  <section class="content-header">
    <h1>  <small>WorkPackage Master</small> </h1>
    <ol class="breadcrumb">
      <li><a href="#"><i class="fa fa-dashboard"></i> Dashboard</a></li>
      <li><a href="#">Manage</a></li>
      <li class="active">WorkPackage Master</li>
    </ol>
  </section><?php */?>
  <!-- Main content -->
  <section class="content">
  <div class="row">
    <div class="col-xs-12">
      <div class="box">
          <div class="box-header">
			<div class="box-header with-border padding_box">
				<div class="create pu">
					<div class="col-md-2 padding_20">
						<form action="<?=site_url('admin/Adminlte/download_excel_page')?>" class="exconvert"  method="post">
							<input type="hidden" id="expo1" name="expo1">
							<input type="submit" value="Excel" class="pull-right active form-control btn-social btn-success input-sm"  />
						</form>
					 </div>
					<div class="col-md-2  padding_20">
						<?=form_open('admin/master/Chapter');?><?php if( count($list)==10 ){?><?php echo form_hidden('all','all');?><?php  } ?>
						<?php echo form_submit('All','All',['class'=>'form-control input-sm pull-right active']);?>
						<?=form_close();?>
					</div>
					<div class="col-md-2  padding_20">
						<?php echo anchor('admin/master/chapter/create','<i class="fa fa-fw fa-plus-square"></i> Add Faculty',['class'=>'form-control input-sm pull-right active']); ?>
					</div>
				</div>
				<div class="box-tools pull-right collapse_tool">
					<!--<a class='button glyphicon glyphicon-plus button_collapse' href='#'></a>-->
						<a href="#" class="btn btn-sm btn-social btn-github pull-right button_collapse" style="margin-left:3px;">
						<i class="fa fa-fw fa-search  text-green"></i>Search</a>
				</div>
			</div>	
          </div>
          <?php //echo $message;?>
          <?php echo form_hidden('my_array',['name'=>'doaction','id'=>'doaction']);?>
     <div class="box-body table-responsive no-padding" >
        <div  id="reportsummary">
        <!-- <table id="example2" class="table table-bordered table-hover  table-responsive" style="font-size: 10px;">-->
                
  <div id="tableContainer2" class="container-tb">
        <table>
          <thead>
            <tr>
              <th>#</th>
              <th>Category</th>
              <th>Class</th>
              <th>Subject</th>
              <th>Chapter</th>
              <th>Chapter Code</th>
			  <th>Description</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->category);?></td>
              <td ><?php echo  strtoupper($lists->class);?></td>
                <td ><?php echo  strtoupper($lists->subject);?></td>
                <td ><?php echo  strtoupper($lists->chapter);?></td>
                <td ><?php echo  strtoupper($lists->category_code.$lists->class_code.$lists->subject_code.$lists->chapter_code);?></td>
                <td ><?php echo  strtoupper($lists->description);?></td>
              <td >
					<?php echo anchor("admin/master/chapter/edit/{$lists->id}",'<i class="fa fa-edit"></i>',['title'=>'Edit chapter']); ?><?php nbs(3);?>
                    <?php echo anchor("admin/master/chapter/view/{$lists->id}",'<i class="fa fa-fw fa-eye"></i>',['title'=>'View chapter']); ?>
					<?php echo anchor("admin/master/chapter/delete/{$lists->id}",'<i class="fa fa-fw fa-scissors"></i>',['title'=>'Delete chapter',
					'onClick' =>"return confirm('Are you sure you want to delete?')"]); ?>
               </td>
            </tr>
            <?php $sn++;?>
			<?php endforeach; ?>
            <?php else : ?>
            <tr>
              <td colspan="6"><strong>No record found</strong></td>
            </tr>
            <?php endif; ?>
          </tbody>
        <?php echo form_close();?>
         <tfoot>
            <tr>
              <th>#</th>
              <th>Category</th>
              <th>Class</th>
              <th>Subject</th>
              <th>Chapter</th>
			  <th>Chapter code</th>
              <th>Description</th>
              <th>Action</th>
            </tr>
          </tfoot>
        </table>
		 </div>
        </div>
        <?php $count++; //echo  $link; ?>
        
        </div>
    </div>
  </div>
</div>
</section>
</div>
<div class='wrap'>
	<div class='content content_pop'>
		<div class="col-md-12">
			<?=form_open('admin/master/Chapter/search');?>
				<div class="">
					<div class="col-md-2  padding_20 emp_style">
						<select id='sel_category' class="form-control input-sm" name="category">
							<option value="" >Select Category</option>
							<?php
							foreach($category as $category1){
								echo "<option value='".$category1['id']."'>".strtoupper($category1['category_code'])." | ".strtoupper($category1['category'])."</option>";
							}
							?>
						</select>
					</div>
					<div class="col-md-2  padding_20 emp_style">										
						<select id='sel_class' class="form-control input-sm" name="class" >
							<option value="" >Select class</option>
						</select>
					</div>
					<div class="col-md-2 padding_20 emp_style">
						<select id='sel_subject' class="form-control input-sm" name="subject" >
							<option value="" >Select subject</option>
						</select>
					</div>
					<div class="col-md-2 padding_20 emp_style">
						<select id='sel_chapter' class="form-control" name="chapter" >
                        <option value="" >Select chapter</option>
                    </select>
					</div>
					<div class="col-md-2 padding_20">
						<?=form_dropdown('chapter_code',$chapter_code ,set_value('chapter_code',$data_taskpo['chapter_code']),['class'=>'form-control select2 select2-hidden-accessible input-sm',
					"tabindex"=>"-1","aria-hidden"=>"true","style"=>"width: 100%;"]);?>
                   </div>
				   
							 
					<div class="col-md-2  padding_20 emp_style">
						<?php $options=array(''=>'Search Type','and'=>'And','or'=>'OR');?>
						<?=form_dropdown('seach_term',$options,set_value('seach_term','and'),['class'=>'form-control input-sm','style'=>'']);?>
					</div>
					<div class="col-md-2  padding_20 emp_style">
						<?php $options=array(''=>'Order By','ASC'=>'Ascending','DESC'=>'Descending','RANDOM'=>'Random');?>
						<?=form_dropdown('order_by',$options,set_value('order_by','ASC'),['class'=>'form-control input-sm']);?> 
					</div>
						
				</div>
				<div class="btn_mrgin1">
			
				 <?=form_submit('search','search',['class'=>'btn btn-primary btn_mrgin btn-sm']);?> 
				</div>
			<?php echo form_close();?>
			</div>	
	</div>		  
</div>
