123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139 |
- <div class="main-content-inner">
- <div class="breadcrumbs" id="breadcrumbs">
- <ul class="breadcrumb">
- <li>
- <i class="ace-icon fa fa-home home-icon"></i>
- <a>首页</a>
- </li>
- <!-- <li>
- <a>模块</a>
- </li> -->
- <li class="active">教学进度</li>
- </ul>
- </div>
- <div class="page-content">
- <div class="row">
- <div class="col-xs-12">
- <!-- PAGE CONTENT BEGINS -->
- <div id="dynamic-table_wrapper" class="dataTables_wrapper form-inline no-footer">
- <div class="row">
- <form method="get" action="<?php echo $this->createUrl('syllabus/index');?>">
- <div class="col-xs-10">
- <div class="dataTables_length margin-zy">
- <select class="form-control" name="years_id" onchange="changeYears(this.value);">
- <option value="">请选择年级</option>
- <?php if(!empty($yearsInfo)):foreach($yearsInfo as $loop):?>
- <option <?php if(!empty($years_id) && $years_id == $loop->years_id){echo 'selected';}?> value="<?php echo $loop->years_id;?>"><?php echo $loop->years_name;?></option>
- <?php endforeach;endif;?>
- </select>
-
- <select class="form-control" id="class_id" name="class_id" <?php if(empty($class_id)){echo 'style="display:none;"';}?>>
- <?php if(!empty($classInfo)):foreach($classInfo as $lp):?>
- <option <?php if(!empty($class_id) && $class_id == $lp->class_id){echo 'selected';}?> value="<?php echo $lp->class_id;?>"><?php echo $lp->class_name;?></option>
- <?php endforeach;endif;?>
- </select>
- <button class="btn btn-minier btn-primary">搜索</button>
- </div>
- </div>
- </form>
- <div class="col-xs-2">
- <div id="dynamic-table_filter" class="dataTables_filter">
- <a class="btn btn-primary btn-sm" href="<?php echo $this->createUrl('syllabus/add');?>">
- <i class="fa fa-plus" style="font-style: normal;"></i> 添加教学进度
- </a>
- </div>
- </div>
- </div>
- <table id="dynamic-table" class="table table-striped table-bordered table-hover dataTable no-footer DTTT_selectable">
- <thead>
- <tr>
- <th>ID</th>
- <th>年级</th>
- <th>班级</th>
- <th>教材</th>
- <th>章</th>
- <th>节</th>
- <th>创建时间</th>
- <th>操作</th>
- </tr>
- </thead>
- <tbody>
- <?php if(!empty($syllaList)):foreach($syllaList as $cl):?>
- <tr>
- <td><?php echo $cl['syllabus_id'];?></td>
- <td><?php echo $cl['years_name'];?></td>
- <td><?php echo $cl['class_name'];?></td>
- <td><?php echo $cl['teach_name'];?></td>
- <td><?php echo $cl['unit_name'];?></td>
- <td><?php echo $cl['sec_name'];?></td>
- <td><?php echo $cl['create_time'];?></td>
- <td>
- <div class="hidden-sm hidden-xs action-buttons">
- <a class="green" title="编辑" href="<?php echo $this->createUrl('syllabus/edit',array('sid'=>$cl['syllabus_id']));?>">
- <i class="ace-icon fa fa-pencil bigger-130"></i>
- </a>
- </div>
- </td>
- </tr>
- <?php endforeach;endif;?>
- </tbody>
- </table>
- <div class="row">
- <div class="col-xs-6">
-
- </div>
- <div class="col-xs-6">
- <div class="dataTables_paginate paging_simple_numbers">
- <?php
- $this->widget('CLinkPager', array(
- 'header' => '',
- 'firstPageLabel'=> '首页',
- 'lastPageLabel' => '末页',
- 'prevPageLabel' => '上一页',
- 'nextPageLabel' => '下一页',
- 'pages' => $pages,
- 'maxButtonCount'=> 5,
- ));
- echo '共:'.$page_total.'条';
- ?>
- </div>
- </div>
- </div>
- </div>
- <!-- PAGE CONTENT ENDS -->
- </div>
- </div>
- </div>
- </div>
- <script type="text/javascript">
- // ajax获取班级
- function changeYears(num) {
- if (!num) return;
- $.post("<?php echo $this->createUrl('classes/ajaxclass');?>",{yid:num},function(data){
- var p = eval("("+data+")");
- if (p.flag) {
- var html;
- var cityObj = $("#class_id");
- cityObj.show();
- cityObj.empty();
- if (p.classList.length > 0){
- html = "<option value=''>请选择班级</option>";
- $.each(p.classList,function(i,n){
- html += "<option <?php if(!empty($class_id) && $class_id == "+n.class_id+"){echo 'selected';}?> value='"+n.class_id+"'>" + n.class_name + "</option>";
- });
- } else {
- html = "<option value=''>暂无班级</option>";
- }
- cityObj.append(html);
- } else {
- alert("获取数据失败!");
- }
- });
- }
- </script>
|