123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687 |
- {template 'common/header'}
- {template 'article/common'}
- {if $do == 'category'}
- <div class="clearfix">
- <form action="{php echo url('article/notice/category');}" method="post" class="we7-form" role="form">
- <div class="form-group">
- <div class="pull-right">
- <a href="{php echo url('article/notice/category_post');}" class="btn btn-primary">添加分类</a>
- </div>
- </div>
- <table class="table we7-table table-hover">
- <col width="100px"/>
- <col />
- <col width="150px" />
- <tr>
- <th>排序</th>
- <th class="text-left">分类名称</th>
- <th class="text-right">操作</th>
- </tr>
- {loop $data $da}
- <input type="hidden" name="ids[]" value="{$da['id']}"/>
- <tr>
- <td><input type="text" name="displayorder[]" value="{$da['displayorder']}" class="form-control"/></td>
- <td><input type="text" name="title[]" value="{$da['title']}" class="form-control"/></td>
- <td>
- <div class="link-group"><a href="{php echo url('article/notice/category_del', array('id' => $da['id']));}" class="del" onclick="if(!confirm('删除分类后,该分类下公告也会被删除,确定删除吗?')) return false;">删除</a></div>
- </td>
- </tr>
- {/loop}
- </table>
- <div class="form-group">
- <div class="">
- <input type="submit" class="btn btn-primary we7-padding-horizontal" name="submit" value="提交" />
- <input type="hidden" name="token" value="{$_W['token']}" />
- </div>
- </div>
- </form>
- </div>
- {elseif $do == 'category_post'}
- <div class="clearfix">
- <form action="{php echo url('article/notice/category_post');}" method="post" class="we7-form" role="form">
-
- <div id="tpl">
- <div class="form-group">
- <label class="col-xs-12 col-sm-2 col-md-2 control-label">分类名称</label>
- <div class="col-sm-8 col-lg-9 col-xs-12">
- <input type="text" class="form-control" name="title[]" vlaue="" placeholder="分类名称"/>
- <div class="help-block">请填写分类名称</div>
- </div>
- </div>
- <div class="form-group">
- <label class="col-xs-12 col-sm-2 col-md-2 control-label">排序</label>
- <div class="col-sm-8 col-lg-9 col-xs-12">
- <input type="text" class="form-control" name="displayorder[]" vlaue="" placeholder="排序"/>
- <div class="help-block">数字越大,越靠前</div>
- </div>
- </div>
- <hr/>
- </div>
- <div id="container"></div>
- <div class="form-group">
- <label class="col-xs-12 col-sm-2 col-md-2 control-label"></label>
- <div class="col-sm-8 col-lg-9 col-xs-12">
- <a href="javascript:;" id="category-add"><i class="fa fa-plus-circle"></i> 继续添加分类</a>
- </div>
- </div>
-
- <div class="form-group">
- <div class="col-sm-8 col-lg-9 col-xs-12">
- <input type="submit" class="btn btn-primary" name="submit" value="提交" />
- <input type="hidden" name="token" value="{$_W['token']}" />
- </div>
- </div>
- </form>
- </div>
- {/if}
- <script>
- $(function(){
- $('#category-add').click(function(){
- var html = $('#tpl').html();
- $('#container').append(html);
- return false;
- });
- });
- </script>
- {template 'common/footer'}
|