123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139 |
- <!DOCTYPE html>
- <html lang="en" xmlns:th="http://www.thymeleaf.org" xmlns:shiro="http://www.pollix.at/thymeleaf/shiro">
- <head>
- <meta charset="utf-8" />
- <meta name="viewport" content="width=device-width, initial-scale=1.0" />
- <title>原动力 - 内容管理系统</title>
- <link href="/resource/css/bootstrap.min.css" rel="stylesheet" type="text/css" />
- <link href="/resource/css/font-awesome.min.css" rel="stylesheet" type="text/css" />
- <link href="/resource/css/ionicons.min.css" rel="stylesheet" type="text/css" />
- <link href="/resource/css/iCheck/all.css" rel="stylesheet" type="text/css" />
- <link href="/resource/css/style.css" rel="stylesheet" type="text/css" />
- </head>
- <body>
- <div class="row">
- <div class="col-md-12">
- <h1 class="panel-heading">表单管理</h1>
- <!--breadcrumbs start -->
- <ul class="breadcrumb">
- <li><a href="/admin/dashboard/toIndex"><i class="fa fa-home"></i> 首页</a></li>
- <li class="active">表单管理</li>
- </ul>
- <!--breadcrumbs end -->
- </div>
- </div>
- <section class="panel">
- <div class="panel-body" shiro:hasAnyPermissions="system:form:toadd,system:form:add">
- <button class="btn btn-primary btn-addon btn-sm" th:onclick="javascript: toAdd()">
- <i class="fa fa-plus"></i> 添加表单
- </button>
- </div>
- <div class="panel-body table-responsive">
- <table class="table table-hover">
- <thead>
- <tr>
- <th style="width:50px;">选择</th>
- <th>表单编码</th>
- <th>表单名称</th>
- <th>附加表</th>
- <th>类型</th>
- <th>发布时间</th>
- <th style="width:300px;">操作</th>
- </tr>
- </thead>
- <tbody>
- <tr th:each="form : ${page.list}">
- <td><input type="checkbox" class="flat-grey list-child" th:value="${form.id}"/></td>
- <td th:text="${form.code}"></td>
- <td th:text="${form.formName}"></td>
- <td th:text="${'system_' + form.tableName}"></td>
- <td><span th:text="${form.type} == '1' ? '自定义表单' : '系统表单'" th:class="${form.type}=='1'? 'label label-success' : 'label label-danger'"></span></td>
- <td th:text="${#dates.format(form.createTime, 'yyyy-MM-dd')}"></td>
- <td class="operate">
- <a th:href="@{/admin/forms/toEdit(id=${form.id})}" class="btn btn-xs btn-success" shiro:hasAnyPermissions="system:form:toedit,system:form:update">编辑</a>
- <a href="javascript:void(0)" data-toggle="modal" class="btn btn-xs btn-danger" th:formid="${form.id}" th:onclick="javascript: confrimRemove(this.getAttribute('formid'))" th:if="${form.type}=='1'" shiro:hasAnyPermissions="system:form:delete">删除</a>
- </td>
- </tr>
- <tr th:if="${#lists.isEmpty(page.list)}">
- <td colspan="7" align="center">无数据</td>
- </tr>
- </tbody>
- </table>
- </div>
- <div class="panel-footer bg-white text-right">
- <ul class="pagination">
- <li><a th:href="@{/admin/forms/list(pageNum=1,pageSize=${page.pageSize})}" title="首页" th:class="${page.isFirstPage} ? 'paginationNotAllowed' : ''">«</a></li>
- <li><a th:href="@{/admin/forms/list(pageNum=${page.prePage},pageSize=${page.pageSize})}" title="上一页" th:if="${page.hasPreviousPage}">‹</a></li>
- <li th:each="pageinfo : ${page.navigatepageNums}"><a th:href="@{/admin/forms/list(pageNum=${pageinfo},pageSize=${page.pageSize})}" th:class="${pageinfo == page.pageNum} ? 'paginationActive' : ''" th:text="${pageinfo}"></a></li>
- <li><a th:href="@{/admin/forms/list(pageNum=${page.nextPage},pageSize=${page.pageSize})}" title="下一页" th:if="${page.hasNextPage}">›</a></li>
- <li><a th:href="@{/admin/forms/list(pageNum=${page.pages},pageSize=${page.pageSize})}" title="未页" th:class="${page.isLastPage} ? 'paginationNotAllowed' : ''">»</a></li>
- </ul>
- </div>
- </section>
- <div aria-hidden="true" aria-labelledby="myModalLabel" role="dialog" tabindex="-1" id="remove-dialog" class="modal fade">
- <div class="modal-dialog">
- <div class="modal-content">
- <div class="modal-header">
- <button aria-hidden="true" data-dismiss="modal" class="close" type="button">×</button>
- <h4 class="modal-title">操作提示?</h4>
- </div>
- <div class="modal-body">
- <div class="alert alert-block alert-danger">
- <strong>注意!</strong> 表单删除后,如有调用则会报错且删除后不可恢复.
- </div>
- <h4 class="modal-title">您确定要删除该记录吗?</h4>
- <input type="hidden" id="cacheID" />
- </div>
- <div class="modal-footer">
- <button type="button" class="btn btn-primary btn-addon btn-sm" onclick="remove();">确定</button>
- <button type="button" class="btn btn-default btn-sm" data-dismiss="modal">取消</button>
- </div>
- </div>
- </div>
- </div>
- <script src="/resource/js/jquery.min.js"></script>
- <script src="/resource/js/bootstrap.min.js"></script>
- <script src="/resource/js/plugins/iCheck/icheck.min.js"></script>
- <!-- Director App -->
- <script src="/resource/js/Director/app.js"></script>
- <script src="/resource/js/jquery.serializejson.js"></script>
- <script>
- window.onload = function(){
- renderCheckBox();
- }
-
- function renderCheckBox(){
- $('input').on('ifChecked', function(event) {
- $(this).parents('li').addClass("task-done");
- console.log('ok');
- });
- $('input').on('ifUnchecked', function(event) {
- $(this).parents('li').removeClass("task-done");
- console.log('not');
- });
-
- $('input[type="checkbox"].flat-grey, input[type="radio"].flat-grey').iCheck({
- checkboxClass: 'icheckbox_flat-grey',
- radioClass: 'iradio_flat-grey'
- });
- }
-
- function toAdd(){
- window.location.href = "/admin/forms/toAdd";
- }
-
- function confrimRemove(id){
- $("#remove-dialog").modal();
- $("#cacheID").val(id);
- }
-
- function remove(){
- var currentID = $("#cacheID").val();
- window.location.href="/admin/forms/delete?id="+currentID;
- $("#remove-dialog").modal('hide');
- }
- </script>
- </body>
- </html>
|