<link rel="stylesheet" href="<?php echo base_url();?>public/js/vendor/smalot_bootstrap-datetimepicker/css/bootstrap-datetimepicker.min.css">
<script src="<?php echo base_url();?>public/js/vendor/smalot_bootstrap-datetimepicker/js/bootstrap-datetimepicker.min.js"></script>
<script src="<?php echo base_url();?>public/js/vendor/smalot_bootstrap-datetimepicker/js/locales/bootstrap-datetimepicker.zh-CN.js"></script>

<div class="content_wrapper">

    <div class="container-fluid">
        <div class="row">
            <div class="col-sm-12">
                <aside>
                    <section>
                        <div class="container-fluid">
<!--                            <button type="button" class="btn btn-success goback">返回</button>-->
                            <a href="#gameupdate/addremark" class="btn btn-info" role="button" data-toggle="modal" data-target="#addremark">添加备注</a>
                        </div>
                    </section>
                </aside>
            </div>
        </div>
        <div class="row">
            <div class="col-sm-12">
                <aside>
                    <header><i class="fa fa-fw fa-file"></i>游戏更新备注</header>
                    <section>
                        <div class="container-fluid">
                            <div class="row">
                                <div class="col-sm-12">
                                    <div class="table-responsive">
                                        <table id="example" class="table table-striped table-bordered table-hover" cellspacing="0" width="100%">
                                            <thead>
                                            <tr>
                                                <th>版本</th>
                                                <th>设备</th>
                                                <th style="width:60%;">内容</th>
                                                <th>操作人</th>
                                                <th>更新时间</th>
                                                <th>操作时间</th>
<!--                                                <th>操作</th>-->
                                            </tr>
                                            </thead>
                                            <tbody>
                                            <?php foreach($list as $k => $v) { ?>
                                            <tr>
                                                <td><?php echo $v['version_name'];?></td>
                                                <td><?php echo $v['version_device'];?></td>
                                                <td><?php echo $v['remark'];?></td>
                                                <td><?php echo $v['remark_name']?></td>
                                                <td><?php echo empty($v['update_time']) ? '' : date('Y-m-d H:i', $v['update_time']);?></td>
                                                <td><?php echo date('Y-m-d H:i:s', $v['remark_time']);?></td>
<!--                                                <td><a href="#gameupdate/subversionmark/--><?php //echo $v['version_id'];?><!--" class="btn btn-primary" role="button">查看热更新备注</a></td>-->
                                            </tr>
                                            <?php } ?>
                                            </tbody>
                                        </table>
                                    </div>
                                </div>
                            </div>
                        </div>
                    </section>
                </aside>
            </div>
        </div>
    </div>

</div>

<!-- 添加备注 -->
<div class="modal fade" id="addremark" tabindex="-1" role="dialog" aria-labelledby="myModalLabel">
  <div class="modal-dialog" role="document">
    <div class="modal-content">
      <div class="modal-header">
        <button type="button" class="close" data-dismiss="modal" aria-label="Close"><span aria-hidden="true">&times;</span></button>
        <h4 class="modal-title" id="myModalLabel">添加备注</h4>
      </div>
    <form class="form-horizontal J_ajaxForm" role="form" method="post" action="gameupdate/addMark">
      <div class="modal-body">
            <div class="form-group">
                <label class="col-sm-2 control-label">版本号</label>
                <div class="col-sm-10">
                  <input type="type" class="form-control" name="version_name" placeholder="版本号">
                </div>
            </div>
            <div class="form-group">
                <label class="col-sm-2 control-label">设备</label>
                <div class="col-sm-10">
                    <label class="checkbox-inline">
                      <input type="checkbox" name="version_device[]" value="1"> 安卓
                    </label>
                    <label class="checkbox-inline">
                      <input type="checkbox" name="version_device[]" value="2"> 苹果
                    </label>
                </div>
            </div>
            <div class="form-group">
                <label  class="col-sm-2 control-label">内容</label>
                <div class="col-sm-10">
                    <textarea class="form-control" rows="3" name="content"></textarea>
                </div>
            </div>

          <div class="form-group">
              <label  class="col-sm-2 control-label">更新时间</label>
              <div class="col-sm-10">
                  <input type="text" class="form-control datetimepicker" value="<?php if($time) echo $time;?>"  name="time" />
              </div>
          </div>
      </div>
      <div class="modal-footer">
        <button type="button" class="btn btn-default" data-dismiss="modal">关闭</button>
        <button type="button" class="btn btn-primary J_ajaxSubmitBtn">保存</button>
      </div>
    </form>
    </div>
  </div>
</div>
<!-- 添加备注 -->

<script type="text/javascript">

    //选择日期
    $('.datetimepicker').datetimepicker({
        format: 'yyyy-mm-dd hh:ii',
        locale: 'zh-cn'
    });

    $(".goback").click(function(){
        window.history.go(-1);
    });
</script>