cms module
This commit is contained in:
4
modules/cms/src/main/resources/views/functions/abbr.html
Normal file
4
modules/cms/src/main/resources/views/functions/abbr.html
Normal file
@@ -0,0 +1,4 @@
|
||||
<%
|
||||
var title = para0, length = para1;
|
||||
return @com.jeesite.common.lang.StringUtils.abbr(title, length);
|
||||
%>
|
||||
@@ -0,0 +1,4 @@
|
||||
<%
|
||||
var articleId = para0;
|
||||
return @com.jeesite.modules.cms.utils.CmsUtils.getArticle(articleId);
|
||||
%>
|
||||
@@ -0,0 +1,4 @@
|
||||
<%
|
||||
var siteCode = para0, categoryCode = para1, number = para2, params = para3!;
|
||||
return @com.jeesite.modules.cms.utils.CmsUtils.getArticleList(siteCode, categoryCode, number, params);
|
||||
%>
|
||||
@@ -0,0 +1,4 @@
|
||||
<%
|
||||
var categoryCode = para0;
|
||||
return @com.jeesite.modules.cms.utils.CmsUtils.getCategory(categoryCode);
|
||||
%>
|
||||
@@ -0,0 +1,4 @@
|
||||
<%
|
||||
var siteCode = para0, parentCode = para1, number = para2, params = para3!;
|
||||
return @com.jeesite.modules.cms.utils.CmsUtils.getCategoryList(siteCode, parentCode, number, params);
|
||||
%>
|
||||
4
modules/cms/src/main/resources/views/functions/site.html
Normal file
4
modules/cms/src/main/resources/views/functions/site.html
Normal file
@@ -0,0 +1,4 @@
|
||||
<%
|
||||
var siteCode = para0!'main';
|
||||
return @com.jeesite.modules.cms.utils.CmsUtils.getSite(siteCode);
|
||||
%>
|
||||
@@ -0,0 +1,3 @@
|
||||
<%
|
||||
return @com.jeesite.modules.cms.utils.CmsUtils.getSiteList();
|
||||
%>
|
||||
@@ -0,0 +1,10 @@
|
||||
<%
|
||||
var p = {
|
||||
// 标签参数 预留功能
|
||||
id: id!, // 文章的id
|
||||
attribute:attribute! //文章的属性,反向获取文章
|
||||
|
||||
};
|
||||
|
||||
var article= @com.jeesite.modules.cms.utils.CmsUtils.getArticle("main");
|
||||
%>
|
||||
@@ -0,0 +1,14 @@
|
||||
<%
|
||||
var p = {
|
||||
// 标签参数
|
||||
path: path!, // 绑定form上model中属性的值
|
||||
class:class!, // 绑定textarea上的class属性的值
|
||||
rows:rows!, // 绑定textarea上的rows属性值
|
||||
cols:cols!, // 绑定textarea上的cols属性值
|
||||
value:value!,
|
||||
maxlength:maxlength!
|
||||
};
|
||||
%>
|
||||
|
||||
${p.path}--${p.value}
|
||||
|
||||
@@ -0,0 +1,14 @@
|
||||
<%
|
||||
var p = {
|
||||
// 标签参数
|
||||
path: path!, // 绑定form上model中属性的值
|
||||
class:class!, // 绑定textarea上的class属性的值
|
||||
rows:rows!, // 绑定textarea上的rows属性值
|
||||
cols:cols!, // 绑定textarea上的cols属性值
|
||||
value:value!,
|
||||
maxlength:maxlength!
|
||||
};
|
||||
%>
|
||||
|
||||
${p.path}--${p.value}
|
||||
|
||||
@@ -0,0 +1,14 @@
|
||||
<%
|
||||
var p = {
|
||||
// 标签参数
|
||||
path: path!, // 绑定form上model中属性的值
|
||||
class:class!, // 绑定textarea上的class属性的值
|
||||
rows:rows!, // 绑定textarea上的rows属性值
|
||||
cols:cols!, // 绑定textarea上的cols属性值
|
||||
value:value!,
|
||||
maxlength:maxlength!
|
||||
};
|
||||
%>
|
||||
|
||||
${p.path}--${p.value}
|
||||
|
||||
@@ -0,0 +1,14 @@
|
||||
<%
|
||||
var p = {
|
||||
// 标签参数
|
||||
path: path!, // 绑定form上model中属性的值
|
||||
class:class!, // 绑定textarea上的class属性的值
|
||||
rows:rows!, // 绑定textarea上的rows属性值
|
||||
cols:cols!, // 绑定textarea上的cols属性值
|
||||
value:value!,
|
||||
maxlength:maxlength!
|
||||
};
|
||||
%>
|
||||
|
||||
${p.path}--${p.value}
|
||||
|
||||
@@ -0,0 +1,14 @@
|
||||
<%
|
||||
var p = {
|
||||
// 标签参数
|
||||
path: path!, // 绑定form上model中属性的值
|
||||
class:class!, // 绑定textarea上的class属性的值
|
||||
rows:rows!, // 绑定textarea上的rows属性值
|
||||
cols:cols!, // 绑定textarea上的cols属性值
|
||||
value:value!,
|
||||
maxlength:maxlength!
|
||||
};
|
||||
%>
|
||||
|
||||
${p.path}--${p.value}
|
||||
|
||||
@@ -0,0 +1,14 @@
|
||||
<%
|
||||
var p = {
|
||||
// 标签参数
|
||||
path: path!, // 绑定form上model中属性的值
|
||||
class:class!, // 绑定textarea上的class属性的值
|
||||
rows:rows!, // 绑定textarea上的rows属性值
|
||||
cols:cols!, // 绑定textarea上的cols属性值
|
||||
value:value!,
|
||||
maxlength:maxlength!
|
||||
};
|
||||
%>
|
||||
|
||||
${p.path}--${p.value}
|
||||
|
||||
@@ -0,0 +1,14 @@
|
||||
<%
|
||||
var p = {
|
||||
// 标签参数
|
||||
path: path!, // 绑定form上model中属性的值
|
||||
class:class!, // 绑定textarea上的class属性的值
|
||||
rows:rows!, // 绑定textarea上的rows属性值
|
||||
cols:cols!, // 绑定textarea上的cols属性值
|
||||
value:value!,
|
||||
maxlength:maxlength!
|
||||
};
|
||||
%>
|
||||
|
||||
${p.path}--${p.value}
|
||||
|
||||
@@ -0,0 +1,14 @@
|
||||
<%
|
||||
var p = {
|
||||
// 标签参数
|
||||
path: path!, // 绑定form上model中属性的值
|
||||
class:class!, // 绑定textarea上的class属性的值
|
||||
rows:rows!, // 绑定textarea上的rows属性值
|
||||
cols:cols!, // 绑定textarea上的cols属性值
|
||||
value:value!,
|
||||
maxlength:maxlength!
|
||||
};
|
||||
%>
|
||||
|
||||
${p.path}--${p.value}
|
||||
|
||||
@@ -0,0 +1,14 @@
|
||||
<%
|
||||
var p = {
|
||||
// 标签参数
|
||||
path: path!, // 绑定form上model中属性的值
|
||||
class:class!, // 绑定textarea上的class属性的值
|
||||
rows:rows!, // 绑定textarea上的rows属性值
|
||||
cols:cols!, // 绑定textarea上的cols属性值
|
||||
value:value!,
|
||||
maxlength:maxlength!
|
||||
};
|
||||
%>
|
||||
|
||||
${p.path}--${p.value}
|
||||
|
||||
@@ -0,0 +1,252 @@
|
||||
<% layout('/layouts/default.html', {title: '文章管理', libs: ['validate','fileupload','ueditor']}){ %>
|
||||
<link rel="stylesheet" href="${ctxStatic}/colorpicker/bootstrap-colorpicker.css"/>
|
||||
<div class="main-content">
|
||||
<div class="box box-main">
|
||||
<div class="box-header with-border">
|
||||
<div class="box-title">
|
||||
<i class="fa icon-note"></i> ${text(article.isNewRecord ? '新增文章' : '编辑文章')}(${@CmsUtils.getCurrentSite().getSiteName()})
|
||||
</div>
|
||||
<div class="box-tools pull-right">
|
||||
<button type="button" class="btn btn-box-tool" data-widget="collapse"><i class="fa fa-minus"></i></button>
|
||||
</div>
|
||||
</div>
|
||||
<#form:form id="inputForm" model="${article}" action="${ctx}/cms/article/save" method="post" class="form-horizontal">
|
||||
<div class="box-body">
|
||||
<div class="form-unit">${text('基本信息')}</div>
|
||||
<#form:hidden path="id"/>
|
||||
<#form:hidden path="wordCount"/>
|
||||
<div class="row">
|
||||
<div class="col-xs-6">
|
||||
<div class="form-group">
|
||||
<label class="control-label col-sm-4" title="">
|
||||
<span class="required ">*</span> ${text('所属栏目')}:<i class="fa icon-question hide"></i></label>
|
||||
<div class="col-sm-8">
|
||||
<#form:treeselect id="category" title="${text('所属栏目')}"
|
||||
path="category.categoryCode" labelPath="category.categoryName"
|
||||
url="${ctx}/cms/category/treeData?excludeCode=${article.category.categoryCode}"
|
||||
class="required" allowClear="true" canSelectRoot="true" canSelectParent="true" />
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-xs-6">
|
||||
<div class="form-group">
|
||||
<label class="control-label col-sm-4" title="">
|
||||
<span class="required hide">*</span> ${text('来源')}:<i class="fa icon-question hide"></i></label>
|
||||
<div class="col-sm-8">
|
||||
<#form:radio path="source" dictType="cms_source" class="form-control required" />
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="row">
|
||||
<div class="col-xs-12">
|
||||
<div class="form-group">
|
||||
<label class="control-label col-sm-2" title="">
|
||||
<span class="required ">*</span> ${text('内容标题')}:<i class="fa icon-question hide"></i></label>
|
||||
<div class="col-sm-10">
|
||||
<div class="input-group">
|
||||
<#form:input path="title" maxlength="255" class="form-control text-ruler required"/>
|
||||
<span class="input-group-btn">
|
||||
<span class="input-group input-color " data-color-format="hex">
|
||||
<span class="input-group-addon" style="border-radius:0;border-left:0;">
|
||||
<i style="background-color:${isNotBlank(article.color)?article.color:'#ddd'};"></i>
|
||||
</span>
|
||||
<#form:input path="color" maxlength="50" class="form-control" style="width:80px;" placeholder="${text('标题颜色')}"/>
|
||||
</span>
|
||||
</span>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="row">
|
||||
<div class="col-xs-12">
|
||||
<div class="form-group">
|
||||
<label class="control-label col-sm-2" title="">
|
||||
<span class="required hide">*</span> ${text('外部链接')}:<i class="fa icon-question" title="${text('如果填写外部链接,点击该文章会直接跳转到该地址,不想不跳转请留空')}。"></i></label>
|
||||
<div class="col-sm-10">
|
||||
<#form:input path="href" maxlength="1000" class="form-control"/>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="row">
|
||||
<div class="col-xs-6">
|
||||
<div class="form-group">
|
||||
<label class="control-label col-sm-4" title="${text('数值越大排序越靠前,可设置权重过期时间')}。">
|
||||
${text('权重/排序')}: <i class="fa icon-question"></i></label>
|
||||
<div class="col-sm-8">
|
||||
<div class="form-inline">
|
||||
<#form:input path="weight" class="form-control width-90 digits" maxlength="10"/>
|
||||
<#form:checkbox id="weightTop" label="${text('置顶')}" value="${article.weight==9999 ?'1' : ''}"
|
||||
class="form-control" style="vertical-align:middle;"/>
|
||||
</div>
|
||||
<span class="help-block"> </span>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-xs-6">
|
||||
<div class="form-group">
|
||||
<label class="control-label col-sm-4" title="${text('时间到期后,权重自动恢复为0,如果为空,则权重永不过期')}。">
|
||||
${text('权重过期时间')}: <i class="fa icon-question"></i></label>
|
||||
<div class="col-sm-8">
|
||||
<#form:input path="weightDate" readonly="true" maxlength="20" class="form-control laydate"
|
||||
dataFormat="datetime" data-type="datetime" data-format="yyyy-MM-dd HH:mm"/>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-unit">${text('详细信息')}</div>
|
||||
<div class="row">
|
||||
<div class="col-xs-12">
|
||||
<div class="form-group">
|
||||
<label class="control-label col-sm-1">${text('摘要')}:</label>
|
||||
<div class="col-sm-11">
|
||||
<#form:textarea path="description" maxlength="500" class="form-control"/>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="row">
|
||||
<div class="col-xs-12">
|
||||
<div class="form-group">
|
||||
<label class="control-label col-sm-1">${text('正文')}:</label>
|
||||
<div class="col-sm-11">
|
||||
<#form:ueditor id="content" path="articleData.content" maxlength="10000" height="500" class="required" simpleToolbars="false" readonly="false" outline="false"/>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-unit">${text('其他信息')}</div>
|
||||
<div class="row">
|
||||
<div class="col-xs-12">
|
||||
<div class="form-group">
|
||||
<label class="control-label col-sm-2" title="">
|
||||
<span class="required hide">*</span> ${text('内容图片')}:<i class="fa icon-question hide"></i></label>
|
||||
<div class="col-sm-10">
|
||||
<#form:fileupload id="uploadImage" bizKey="${article.id}"
|
||||
bizType="article_image" returnPath="true"
|
||||
filePathInputId="image" uploadType="image" readonly="false"
|
||||
maxUploadNum="4" isMini="false" />
|
||||
<#form:input path="image" maxlength="1000" readonly="true" class="form-control" />
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="row">
|
||||
<div class="col-xs-6">
|
||||
<div class="form-group">
|
||||
<label class="control-label col-sm-4" title="">
|
||||
<span class="required hide">*</span> ${text('关键字')}:<i class="fa icon-question hide"></i></label>
|
||||
<div class="col-sm-8">
|
||||
<#form:input path="keywords" maxlength="500" class="form-control"/>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-xs-6">
|
||||
<div class="form-group">
|
||||
<label class="control-label col-sm-4">${text('推荐位')}:</label>
|
||||
<div class="col-sm-8">
|
||||
<div class="checkbox-list">
|
||||
<#form:checkbox path="posidList" dictType="cms_post" class="form-control" />
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="row">
|
||||
<div class="col-xs-6">
|
||||
<div class="form-group">
|
||||
<label class="control-label col-sm-4" title="${text('文章的发布状态')}">${text('状态')}:<i class="fa icon-question"></i></label>
|
||||
<div class="col-sm-8">
|
||||
<#form:select path="state" dictType="sys_status" blankOption="true" class="form-control" />
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-xs-6">
|
||||
<div class="form-group">
|
||||
<label class="control-label col-sm-4" title="${text('可修改发布时间,不填则使用当前时间')}">
|
||||
${text('发布时间')}: <i class="fa icon-question"></i></label>
|
||||
<div class="col-sm-8">
|
||||
<#form:input path="createDate" readonly="true" maxlength="20" class="form-control Wdate"
|
||||
dataFormat="datetime" onclick="WdatePicker({dateFmt:'yyyy-MM-dd HH:mm',isShowClear:false});"/>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-unit">${text('高级信息')}</div>
|
||||
<div class="row">
|
||||
<div class="col-xs-6">
|
||||
<div class="form-group">
|
||||
<label class="control-label col-sm-4" title="">
|
||||
<span class="required hide">*</span> ${text('自定义内容视图')}:<i class="fa icon-question" title="自定义内容视图名称必须以'${article_DEFAULT_TEMPLATE}'开始"></i></label>
|
||||
<div class="col-sm-8">
|
||||
<#form:select path="customContentView" items="${contentViewList}" itemLabel="id" itemValue="id" blankOption="true" class="form-control " />
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="row">
|
||||
<div class="col-xs-12">
|
||||
<div class="form-group">
|
||||
<label class="control-label col-sm-2" title="">
|
||||
<span class="required hide">*</span> ${text('视图参数配置')}:<i class="fa icon-question" title="视图参数例如: {count:2, title_show:'yes'} 则在视图文件中的获取方法是:\${viewConfig_count}、\${viewConfig_titleShow}"></i></label>
|
||||
<div class="col-sm-10">
|
||||
<#form:input path="viewConfig" maxlength="1000" placeholder="视图参数例如: {count:2, title_show:'yes'} 则在视图文件中的获取方法是:${'${'}viewConfig_count}、${'${'}viewConfig_titleShow}" class="form-control"/>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="row">
|
||||
<div class="col-xs-12">
|
||||
<div class="form-group">
|
||||
<label class="control-label col-sm-2" title="">
|
||||
<span class="required hide">*</span> ${text('备注信息')}:<i class="fa icon-question hide"></i></label>
|
||||
<div class="col-sm-10">
|
||||
<#form:textarea path="remarks" rows="4" maxlength="500" class="form-control"/>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<#form:extend collapsed="true" />
|
||||
<div class="box-footer">
|
||||
<div class="row">
|
||||
<div class="col-sm-offset-2 col-sm-10">
|
||||
<% if (hasPermi('cms:article:edit')){ %>
|
||||
<button type="submit" class="btn btn-sm btn-primary" id="btnSubmit"><i class="fa fa-check"></i> ${text('保 存')}</button>
|
||||
<% } %>
|
||||
<button type="button" class="btn btn-sm btn-default" id="btnCancel" onclick="js.closeCurrentTabPage()"><i class="fa fa-reply-all"></i> ${text('关 闭')}</button>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</#form:form>
|
||||
</div>
|
||||
</div>
|
||||
<% } %>
|
||||
<script src="${ctxStatic}/colorpicker/bootstrap-colorpicker.js"></script>
|
||||
<script type="text/javascript">
|
||||
// 颜色控件初始化
|
||||
$("#inputForm .input-color").colorpicker();
|
||||
// 权重、排序
|
||||
$('#weightTop input').on('ifChecked ifUnchecked', function(){
|
||||
if ($(this).is(':checked')){
|
||||
$('#weight').val('9999');
|
||||
}else{
|
||||
$('#weight').val('0');
|
||||
}
|
||||
});
|
||||
$("#inputForm").validate({
|
||||
submitHandler: function(form){
|
||||
$('#wordCount').val(contentUE.getContentTxt().length);
|
||||
js.ajaxSubmitForm($(form), function(data){
|
||||
js.showMessage(data.message);
|
||||
if(data.result == Global.TRUE){
|
||||
js.closeCurrentTabPage(function(contentWindow){
|
||||
contentWindow.page();
|
||||
});
|
||||
}
|
||||
}, "json");
|
||||
}
|
||||
});
|
||||
</script>
|
||||
@@ -0,0 +1,94 @@
|
||||
<% layout('/layouts/default.html', {title: '内容管理', libs: ['dataGrid']}){ %>
|
||||
<div class="main-content">
|
||||
<div class="box box-main">
|
||||
<div class="box-header">
|
||||
<div class="box-title">
|
||||
<i class="fa icon-note"></i> ${text('内容管理')}
|
||||
</div>
|
||||
<div class="box-tools pull-right">
|
||||
<a href="${ctxFront}/index" target="_blank" class="btn btn-default" title="${text('访问站点')}"><i class="fa fa-globe"></i> ${text('访问网站')}</a>
|
||||
<a href="#" class="btn btn-default" id="btnSearch" title="${text('查询')}"><i class="fa fa-filter"></i> ${text('查询')}</a>
|
||||
<% if(hasPermi('cms:article:edit')){ %>
|
||||
<a href="${ctx}/cms/article/form" onclick="$(this).data('href', this.href+'?category.categoryCode='+$('#categoryCode').val())" class="btn btn-default btnTool" title="${text('新增文章')}"><i class="fa fa-plus"></i> ${text('新增')}</a>
|
||||
<% } %>
|
||||
</div>
|
||||
</div>
|
||||
<div class="box-body">
|
||||
<#form:form id="searchForm" model="${article}" action="${ctx}/cms/article/listData" method="post" class="form-inline hide"
|
||||
data-page-no="${parameter.pageNo}" data-page-size="${parameter.pageSize}" data-order-by="${parameter.orderBy}">
|
||||
<div class="form-group">
|
||||
<label class="control-label">${text('栏目编码')}:</label>
|
||||
<div class="control-inline">
|
||||
<#form:input id="categoryCode" path="category.categoryCode" maxlength="64" class="form-control width-120"/>
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label class="control-label">${text('内容标题')}:</label>
|
||||
<div class="control-inline">
|
||||
<#form:input path="title" maxlength="255" class="form-control width-120"/>
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label class="control-label">${text('关键字')}:</label>
|
||||
<div class="control-inline">
|
||||
<#form:input path="keywords" maxlength="500" class="form-control width-120"/>
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label class="control-label">${text('状态')}:</label>
|
||||
<div class="control-inline width-90">
|
||||
<#form:select path="status" dictType="sys_search_status" blankOption="true" class="form-control"/>
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<button type="submit" class="btn btn-primary btn-sm">${text('查询')}</button>
|
||||
<button type="reset" class="btn btn-default btn-sm">${text('重置')}</button>
|
||||
</div>
|
||||
</#form:form>
|
||||
<table id="dataGrid"></table>
|
||||
<div id="dataGridPage"></div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<% } %>
|
||||
<script>
|
||||
// 初始化DataGrid对象
|
||||
$('#dataGrid').dataGrid({
|
||||
searchForm: $("#searchForm"),
|
||||
columnModel: [
|
||||
{header:'${text("标题")}', name:'title', index:'a.category_code', width:350, align:"left", frozen:true, formatter: function(val, obj, row, act){
|
||||
return '<a href="${ctx}/cms/article/form?id='+row.id+'" class="btnList" data-title="${text("编辑文章")}">'+(val||row.id)+'</a>';
|
||||
}},
|
||||
{header:'${text("栏目")}', name:'category.categoryName', index:'c.category_name', width:130, align:'center'},
|
||||
{header:'${text("权重")}', name:'weight', index:'a.weight', width:100, align:"center"},
|
||||
{header:'${text("点击数")}', name:'hits', index:'a.hits', width:100, align:"center"},
|
||||
{header:'${text("字数")}', name:'wordCount', index:'a.word_count', width:100, align:"center"},
|
||||
{header:'${text("状态")}', name:'status', index:'a.status', width:100, align:"center", formatter: function(val, obj, row, act){
|
||||
return js.getDictLabel(${@DictUtils.getDictListJson('sys_search_status')}, val, '${text("未知")}', true);
|
||||
}},
|
||||
{header:'${text("创建时间")}', name:'createDate', index:'a.create_date', width:150, align:"center"},
|
||||
// {header:'${text("备注信息")}', name:'remarks', index:'a.remarks', width:150, align:"left"},
|
||||
{header:'${text("操作")}', name:'actions', width:150, sortable:false, title:false, formatter: function(val, obj, row, act){
|
||||
var actions = [];
|
||||
<% if(hasPermi('cms:article:edit')){ %>
|
||||
actions.push('<a href="${ctx}/cms/article/form?id='+row.id+'" class="btnList" title="${text("编辑文章")}"><i class="fa fa-pencil"></i></a> ');
|
||||
if (row.status == Global.STATUS_NORMAL){
|
||||
actions.push('<a href="${ctx}/cms/article/disable?id='+row.id+'" class="btnList" title="${text("停用文章")}" data-confirm="${text("确认要停用该文章吗?")}"><i class="glyphicon glyphicon-ban-circle"></i></a> ');
|
||||
}
|
||||
if (row.status == Global.STATUS_DISABLE){
|
||||
actions.push('<a href="${ctx}/cms/article/enable?id='+row.id+'" class="btnList" title="${text("启用文章")}" data-confirm="${text("确认要启用该文章吗?")}"><i class="glyphicon glyphicon-ok-circle"></i></a> ');
|
||||
}
|
||||
actions.push('<a href="${ctx}/cms/article/delete?id='+row.id+'" class="btnList" title="${text("删除文章")}" data-confirm="${text("确认要删除该文章吗?")}"><i class="fa fa-trash-o"></i></a> ');
|
||||
if (row.status == Global.STATUS_NORMAL){
|
||||
actions.push('<a href="${ctxFront}/view-'+row.category.categoryCode+'-'+row.id+'" target="_blank" title="${text("预览文章")}"><i class="fa fa-globe"></i></a> ');
|
||||
}
|
||||
<% } %>
|
||||
return actions.join('');
|
||||
}}
|
||||
],
|
||||
// 加载成功后执行事件
|
||||
ajaxSuccess: function(data){
|
||||
|
||||
}
|
||||
});
|
||||
</script>
|
||||
@@ -0,0 +1,278 @@
|
||||
<% layout('/layouts/default.html', {title: '栏目添加', libs: ['validate','fileupload']}){ %>
|
||||
<div class="main-content">
|
||||
<div class="box box-main">
|
||||
<div class="box-header with-border">
|
||||
<div class="box-title">
|
||||
<i class="fa icon-organization"></i> ${text(category.isNewRecord ? '新增栏目' : '编辑栏目')}
|
||||
</div>
|
||||
<div class="box-tools pull-right">
|
||||
<button type="button" class="btn btn-box-tool" data-widget="collapse"><i class="fa fa-minus"></i></button>
|
||||
</div>
|
||||
</div>
|
||||
<#form:form id="inputForm" model="${category}" action="${ctx}/cms/category/save" method="post" class="form-horizontal">
|
||||
<div class="box-body">
|
||||
<div class="row">
|
||||
<div class="col-xs-6">
|
||||
<div class="form-group">
|
||||
<label class="control-label col-sm-4">${text('上级栏目')}:</label>
|
||||
<div class="col-sm-8">
|
||||
<#form:treeselect id="parent" title="${text('上级栏目')}"
|
||||
path="parent.id" labelPath="parent.categoryName"
|
||||
url="${ctx}/cms/category/treeData?excludeCode=${category.id}"
|
||||
class="" allowClear="true" canSelectRoot="true"
|
||||
canSelectParent="true" />
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-xs-6">
|
||||
<div class="form-group">
|
||||
<label class="control-label col-sm-4" title="">
|
||||
<span class="required ">*</span>${text('归属站点')}:<i class="fa icon-question hide"></i></label>
|
||||
<div class="col-sm-8">
|
||||
<#form:select path="site.siteCode" items="${@CmsUtils.getSiteList()}" itemLabel="siteName" itemValue="siteCode" class="form-control required" />
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="row">
|
||||
<div class="col-xs-6">
|
||||
<div class="form-group">
|
||||
<label class="control-label col-sm-4" title="">
|
||||
<span class="required ">*</span> ${text('栏目编码')}:<i class="fa icon-question hide"></i></label>
|
||||
<div class="col-sm-8">
|
||||
<#form:hidden path="isNewRecord" />
|
||||
<#form:input path="categoryCode" maxlength="64" readonly="${!category.isNewRecord}"
|
||||
class="form-control required abc" />
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-xs-6">
|
||||
<div class="form-group">
|
||||
<label class="control-label col-sm-4" title="">
|
||||
<span class="required ">*</span> ${text('内容模型')}:<i class="fa icon-question hide"></i></label>
|
||||
<div class="col-sm-8">
|
||||
<#form:select path="moduleType" dictType="cms_module_type" blankOption="true" class="form-control required" />
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="row">
|
||||
<div class="col-xs-6">
|
||||
<div class="form-group">
|
||||
<label class="control-label col-sm-4" title="">
|
||||
<span class="required ">*</span>${text('栏目名称')}:<i class="fa icon-question hide"></i></label>
|
||||
<div class="col-sm-8">
|
||||
<#form:input path="categoryName" maxlength="100" class="form-control required" />
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-xs-6">
|
||||
<div class="form-group">
|
||||
<label class="control-label col-sm-4" title="">
|
||||
<span class="required ">*</span> ${text('本级排序号')}:<i class="fa icon-question hide"></i></label>
|
||||
<div class="col-sm-8">
|
||||
<#form:input path="treeSort" class="form-control required digits" />
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="row">
|
||||
<div class="col-xs-12">
|
||||
<div class="form-group">
|
||||
<label class="control-label col-sm-2" title="">
|
||||
<span class="required hide">*</span> ${text('栏目图片')}:<i class="fa icon-question hide"></i></label>
|
||||
<div class="col-sm-10">
|
||||
<#form:fileupload id="uploadImage" bizKey="${category.id}" bizType="category_image"
|
||||
returnPath="true" filePathInputId="image" uploadType="image" readonly="false"
|
||||
maxUploadNum="1" isMini="false" />
|
||||
<#form:input path="image" maxlength="255" class="form-control" />
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="row">
|
||||
<div class="col-xs-6">
|
||||
<div class="form-group">
|
||||
<label class="control-label col-sm-4" title="">
|
||||
<span class="required hide">*</span> ${text('外部链接')}:<i class="fa icon-question " title="栏目超链接地址,优先级“高”"></i></label>
|
||||
<div class="col-sm-8">
|
||||
<#form:input path="href" maxlength="255" placeholder="栏目超链接地址,优先级“高”" class="form-control" />
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-xs-6">
|
||||
<div class="form-group">
|
||||
<label class="control-label col-sm-4" title="">
|
||||
<span class="required hide">*</span> ${text('超链接目标窗口')}:<i class="fa icon-question "
|
||||
title="栏目超链接打开的目标窗口,如:“_blank”"></i></label>
|
||||
<div class="col-sm-8">
|
||||
<#form:input path="target" maxlength="20" placeholder="栏目超链接打开的目标窗口,新窗口打开,请填写:“_blank”" class="form-control" />
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="row">
|
||||
<div class="col-xs-6">
|
||||
<div class="form-group">
|
||||
<label class="control-label col-sm-4" title="">
|
||||
<span class="required hide">*</span> ${text('栏目描述信息')}:<i class="fa icon-question hide"></i></label>
|
||||
<div class="col-sm-8">
|
||||
<#form:input path="description" maxlength="500" placeholder="填写描述,有助于搜搜引擎优化" class="form-control" />
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-xs-6">
|
||||
<div class="form-group">
|
||||
<label class="control-label col-sm-4" title="">
|
||||
<span class="required hide">*</span> ${text('栏目关键字')}:<i class="fa icon-question hide"></i></label>
|
||||
<div class="col-sm-8">
|
||||
<#form:input path="keywords" maxlength="500" placeholder="填写关键词,有助于搜索引擎优化" class="form-control" />
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-unit">${text('栏目配置')}</div>
|
||||
<div class="row">
|
||||
<div class="col-xs-6">
|
||||
<div class="form-group">
|
||||
<label class="control-label col-sm-4" title="是否在导航中显示该栏目">
|
||||
<span class="required hide">*</span> ${text('是否在导航中显示')}:<i class="fa icon-question"></i></label>
|
||||
<div class="col-sm-8">
|
||||
<#form:radio path="inMenu" dictType="sys_show_hide" class="form-control" />
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-xs-6">
|
||||
<div class="form-group">
|
||||
<label class="control-label col-sm-4" title="">
|
||||
<span class="required hide">*</span> ${text('是否允许评论')}:<i class="fa icon-question hide"></i></label>
|
||||
<div class="col-sm-8">
|
||||
<#form:radio path="isCanComment" dictType="sys_yes_no" class="form-control" />
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="row">
|
||||
<div class="col-xs-6">
|
||||
<div class="form-group">
|
||||
<label class="control-label col-sm-4" title="是否在分类页中显示该栏目的文章列表">
|
||||
<span class="required hide">*</span> ${text('是否在分类页中显示')}:<i class="fa icon-question" ></i></label>
|
||||
<div class="col-sm-8">
|
||||
<#form:radio path="inList" dictType="sys_show_hide" class="form-control" />
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-xs-6">
|
||||
<div class="form-group">
|
||||
<label class="control-label col-sm-4" title=""> <span class="required hide">*</span>
|
||||
${text('是否需要审核')}:<i class="fa icon-question hide"></i></label>
|
||||
<div class="col-sm-8">
|
||||
<#form:radio path="isNeedAudit" dictType="sys_yes_no" class="form-control" />
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="row">
|
||||
<div class="col-xs-6">
|
||||
<div class="form-group">
|
||||
<label class="control-label col-sm-4" title="默认展现方式,首栏目内容列表,栏目第一条内容">
|
||||
<span class="required hide">*</span> ${text('内容展现模式')}:<i class="fa icon-question" ></i></label>
|
||||
<div class="col-sm-8">
|
||||
<#form:radio path="showModes" dictType="cms_show_modes" class="form-control" />
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="row">
|
||||
<div class="col-xs-6">
|
||||
<div class="form-group">
|
||||
<label class="control-label col-sm-4" title="自定义内容视图名称必须以'${category_DEFAULT_TEMPLATE}'开始">
|
||||
${text('自定义列表视图')}:<i class="fa icon-question "></i></label>
|
||||
<div class="col-sm-8">
|
||||
<#form:select path="customListView" items="${listViewList}" itemLabel="id" itemValue="id" blankOption="true" class="form-control " />
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-xs-6">
|
||||
<div class="form-group">
|
||||
<label class="control-label col-sm-4" title="自定义内容视图名称必须以'${article_DEFAULT_TEMPLATE}'开始"> <span class="required hide">*</span>
|
||||
${text('自定义内容视图')}:<i class="fa icon-question "></i></label>
|
||||
<div class="col-sm-8">
|
||||
<#form:select path="customContentView" items="${contentViewList}" itemLabel="id" itemValue="id" blankOption="true" class="form-control " />
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="row">
|
||||
<div class="col-xs-12">
|
||||
<div class="form-group">
|
||||
<label class="control-label col-sm-2" title="视图参数例如: {count:2, title_show:'yes'} 则在视图文件中的获取方法是:\${viewConfig_count}、\${viewConfig_titleShow}">
|
||||
${text('视图参数配置')}:<i class="fa icon-question"></i></label>
|
||||
<div class="col-sm-10">
|
||||
<#form:input path="viewConfig" maxlength="1000" class="form-control"
|
||||
placeholder="视图参数例如: {count:2, title_show:'yes'} 则在视图文件中的获取方法是:${'${'}viewConfig_count}、${'${'}viewConfig_titleShow}" />
|
||||
<br />
|
||||
<ul class="text-muted well well-lg no-shadow">
|
||||
<li>例如视图参数设置为:count:2,titleShow:'yes'则在视图文件中的获取方法是:\${viewConfig_count}、\${viewConfig_titleShow}。</li>
|
||||
<li>设置栏目的管理地址:若设置【adminUrl:false】表示无管理地址,在内容发布栏目列表中不显示该栏目;</li>
|
||||
<li>设置【adminUrl:'/cms/guestbook'】表示有管理地址,在内容发布栏目列表中点击该栏目链接到该地址。</li>
|
||||
<!-- <li>管理地址参数:若设置【adminUrlParam:'fileDownload=true'】则代表链接模型为文件下载的栏目,新增链接的时候出现文件上传对话框。</li>
|
||||
<li>管理地址参数:若设置【adminUrlParam:'outlineView=true'】则代表文章模型开启大纲视图编辑,在线编辑器左侧显示大纲视图。</li> -->
|
||||
</ul>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-unit">${text('其他信息')}</div>
|
||||
<div class="row">
|
||||
<div class="col-xs-12">
|
||||
<div class="form-group">
|
||||
<label class="control-label col-sm-2" title="">
|
||||
<span class="required hide">*</span> ${text('备注信息')}:<i class="fa icon-question hide"></i></label>
|
||||
<div class="col-sm-10">
|
||||
<#form:textarea path="remarks" rows="4" maxlength="500" class="form-control" />
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<#form:extend collapsed="true" />
|
||||
<div class="box-footer">
|
||||
<div class="row">
|
||||
<div class="col-sm-offset-2 col-sm-10">
|
||||
<% if (hasPermi('cms:category:edit')){ %>
|
||||
<button type="submit" class="btn btn-sm btn-primary" id="btnSubmit"><i class="fa fa-check"></i> ${text('保 存')}</button>
|
||||
<% } %>
|
||||
<button type="button" class="btn btn-sm btn-default" id="btnCancel" onclick="js.closeCurrentTabPage()"><i class="fa fa-reply-all"></i> ${text('关 闭')}</button>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</#form:form>
|
||||
</div>
|
||||
</div>
|
||||
<% } %>
|
||||
<script>
|
||||
$("#inputForm").validate({
|
||||
submitHandler : function(form) {
|
||||
js.ajaxSubmitForm($(form), function(data) {
|
||||
js.showMessage(data.message);
|
||||
if (data.result == Global.TRUE) {
|
||||
js.closeCurrentTabPage(function(contentWindow) {
|
||||
contentWindow.$('#dataGrid').dataGrid('refreshTreeChildren',
|
||||
$('#parentCode').val(), '${category.id}');
|
||||
});
|
||||
}
|
||||
}, "json");
|
||||
}
|
||||
});
|
||||
// 选择父级回调方法
|
||||
function treeselectCallback(id, act, index, layero) {
|
||||
if (id == 'parent' && (act == 'ok' || act == 'clear')) {
|
||||
// 创建并初始化下一个节点信息,如:排序号、默认值
|
||||
$.get('${ctx}/cms/category/createNextNode?parentCode='
|
||||
+ $('#parentCode').val(), function(data) {
|
||||
$('#treeSort').val(data.treeSort);
|
||||
});
|
||||
}
|
||||
}
|
||||
</script>
|
||||
@@ -0,0 +1,111 @@
|
||||
<% layout('/layouts/default.html', {title: '栏目管理', libs: ['dataGrid']}){ %>
|
||||
<div class="main-content">
|
||||
<div class="box box-main">
|
||||
<div class="box-header">
|
||||
<div class="box-title">
|
||||
<i class="fa icon-organization"></i> ${text('栏目管理')}(
|
||||
</div>
|
||||
<div class="box-title dropdown input-inline">
|
||||
<div class="dropdown-toggle" data-hover="dropdown" data-toggle="dropdown">
|
||||
${@CmsUtils.getCurrentSite().getSiteName()}<b class="caret"></b>
|
||||
</div>
|
||||
<ul class="dropdown-menu">
|
||||
<% for(var site in @CmsUtils.getSiteList()){ %>
|
||||
<li><a href="${ctx}/cms/site/select?siteCode=${site.siteCode}&redirect=${@Global.getProperty('adminPath')}/cms/category/list"> <i
|
||||
class="fa fa-angle-right"></i> ${site.siteName}
|
||||
</a></li>
|
||||
<% } %>
|
||||
</ul>
|
||||
</div>
|
||||
<div class="box-title">)</div>
|
||||
<div class="box-tools pull-right">
|
||||
<a href="#" class="btn btn-default" id="btnSearch" title="${text('查询')}"><i class="fa fa-filter"></i>${text('查询')}</a>
|
||||
<a href="#" class="btn btn-default" id="btnRefreshTree" title="${text('刷新')}"><i class="fa fa-refresh"></i> ${text('刷新')}</a>
|
||||
<a href="#" class="btn btn-default" id="btnExpandTreeNode" title="${text('展开一级')}"><i class="fa fa-angle-double-down"></i>${text('展开')}</a>
|
||||
<a href="#" class="btn btn-default" id="btnCollapseTreeNode" title="${text('折叠全部')}"><i class="fa fa-angle-double-up"></i> ${text('折叠')}</a> <%
|
||||
if(hasPermi('cms:category:edit')){ %>
|
||||
<a href="${ctx}/cms/category/form?site.siteCode=${category.site.siteCode}" class="btn btn-default btnTool" title="${text('栏目添加')}"><i class="fa fa-plus"></i>${text('新增')}</a>
|
||||
<% } %>
|
||||
</div>
|
||||
</div>
|
||||
<div class="box-body">
|
||||
<#form:form id="searchForm" model="${category}" action="${ctx}/cms/category/listData" method="post" class="form-inline hide"
|
||||
data-page-no="${parameter.pageNo}" data-page-size="${parameter.pageSize}" data-order-by="${parameter.orderBy}">
|
||||
<#form:hidden path="site.siteCode" maxlength="64" class="form-control width-120" />
|
||||
<div class="form-group">
|
||||
<label class="control-label">${text('栏目名称')}:</label>
|
||||
<div class="control-inline">
|
||||
<#form:input path="categoryName" maxlength="100" class="form-control width-120" />
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label class="control-label">${text('模块类型')}:</label>
|
||||
<div class="control-inline">
|
||||
<#form:input path="moduleType" maxlength="50" class="form-control width-120" />
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label class="control-label">${text('状态')}:</label>
|
||||
<div class="control-inline width-120">
|
||||
<#form:select path="status" dictType="sys_search_status" blankOption="true" class="form-control" />
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label class="control-label">${text('备注信息')}:</label>
|
||||
<div class="control-inline">
|
||||
<#form:input path="remarks" maxlength="500" class="form-control width-120" />
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<button type="submit" class="btn btn-primary btn-sm">${text('查询')}</button>
|
||||
<button type="reset" class="btn btn-default btn-sm">${text('重置')}</button>
|
||||
</div>
|
||||
</#form:form>
|
||||
<table id="dataGrid"></table>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<% } %>
|
||||
<script>
|
||||
// 初始化DataGrid对象
|
||||
$('#dataGrid').dataGrid({
|
||||
searchForm: $("#searchForm"),
|
||||
columnModel: [
|
||||
{header:'${text("名称")}', name:'categoryName', index:'a.category_name', width:250, align:"left", frozen:true, formatter: function(val, obj, row, act){
|
||||
return '( '+row.categoryCode+' ) '+'<a href="${ctx}/cms/category/form?categoryCode='+row.categoryCode+'" class="btnList" data-title="${text("编辑栏目表")}">'+(val||row.id)+'</a>';
|
||||
}},
|
||||
{header:'${text("模型")}', name:'moduleType', index:'a.module_type', width:100, align:"center"},
|
||||
{header:'${text("排序")}', name:'treeSort', index:'a.tree_sort', width:50, align:"center"},
|
||||
{header:'${text("导航栏目")}', name:'inMenu', index:'a.in_menu', width:80, fixed:true, align:"center", formatter: function(val, obj, row, act){
|
||||
return js.getDictLabel(${@DictUtils.getDictListJson('sys_show_hide')}, val, '未知', true);
|
||||
}},
|
||||
{header:'${text("栏目列表")}', name:'inList', index:'a.in_list', width:80, fixed:true, align:"center", formatter: function(val, obj, row, act){
|
||||
return js.getDictLabel(${@DictUtils.getDictListJson('sys_show_hide')}, val, '未知', true);
|
||||
}},
|
||||
{header:'${text("展现方式")}', name:'showModes', index:'a.show_modes', width:150, fixed:true, align:"center", formatter: function(val, obj, row, act){
|
||||
return js.getDictLabel(${@DictUtils.getDictListJson('cms_show_modes')}, val, '未知', true);
|
||||
}},
|
||||
{header:'${text("操作")}', name:'actions', width:120, sortable:false, title:false, formatter: function(val, obj, row, act){
|
||||
var actions = [];
|
||||
<% if(hasPermi('cms:category:edit')){ %>
|
||||
actions.push('<a href="${ctx}/cms/category/form?categoryCode='+row.categoryCode+'" class="btnList" title="${text("编辑栏目表")}"><i class="fa fa-pencil"></i></a> ');
|
||||
if (row.status == Global.STATUS_NORMAL){
|
||||
actions.push('<a href="${ctx}/cms/category/disable?categoryCode='+row.categoryCode+'" class="btnList" title="${text("停用栏目表")}" data-confirm="${text("确认要停用该栏目表吗?")}"><i class="glyphicon glyphicon-ban-circle"></i></a> ');
|
||||
}
|
||||
if (row.status == Global.STATUS_DISABLE){
|
||||
actions.push('<a href="${ctx}/cms/category/enable?categoryCode='+row.categoryCode+'" class="btnList" title="${text("启用栏目表")}" data-confirm="${text("确认要启用该栏目表吗?")}"><i class="glyphicon glyphicon-ok-circle"></i></a> ');
|
||||
}
|
||||
actions.push('<a href="${ctx}/cms/category/delete?categoryCode='+row.categoryCode+'" class="btnList" title="${text("删除栏目表")}" data-confirm="${text("确认要删除该栏目表及所有子栏目表吗?")}" data-deltreenode="'+row.id+'"><i class="fa fa-trash-o"></i></a> ');
|
||||
actions.push('<a href="${ctx}/cms/category/form?parentCode='+row.id+'&site.siteCode=${category.site.siteCode}" class="btnList" title="${text("新增下级栏目表")}"><i class="fa fa-plus-square"></i></a> ');
|
||||
<% } %>
|
||||
return actions.join('');
|
||||
}}
|
||||
],
|
||||
treeGrid: true, // 启用树结构表格
|
||||
defaultExpandLevel: 0, // 默认展开的层次
|
||||
expandNodeClearPostData: 'categoryName,siteCode,moduleType,image,href,target,keywords,description,inMenu,inList,showModes,isNeedAudit,isCanComment,customListView,customContentView,viewConfig,status,remarks,', // 展开节点清理请求参数数据(一般设置查询条件的字段属性,否则在查询后,不能展开子节点数据) // 加载成功后执行事件
|
||||
ajaxSuccess: function(data){
|
||||
|
||||
}
|
||||
});
|
||||
</script>
|
||||
108
modules/cms/src/main/resources/views/modules/cms/cmsIndex.html
Normal file
108
modules/cms/src/main/resources/views/modules/cms/cmsIndex.html
Normal file
@@ -0,0 +1,108 @@
|
||||
<% layout('/layouts/default.html', {title: '内容管理', libs:['layout','zTree']}){ %>
|
||||
<div class="ui-layout-west">
|
||||
<div class="main-content">
|
||||
<div class="box box-main">
|
||||
<div class="box-header">
|
||||
<div class="box-title dropdown input-inline">
|
||||
<div class="dropdown-toggle" data-hover="dropdown" data-toggle="dropdown">
|
||||
${@CmsUtils.getCurrentSite().getSiteName()}<b class="caret"></b>
|
||||
</div>
|
||||
<ul class="dropdown-menu">
|
||||
<% for(var site in @CmsUtils.getSiteList()){ %>
|
||||
<li><a href="${ctx}/cms/site/select?siteCode=${site.siteCode}&redirect=${@Global.getProperty('adminPath')}/cms/index"> <i
|
||||
class="fa fa-angle-right"></i> ${site.siteName}
|
||||
</a></li>
|
||||
<% } %>
|
||||
</ul>
|
||||
</div>
|
||||
<div class="box-tools pull-right">
|
||||
<button type="button" class="btn btn-box-tool addTabPage" data-href="${ctx}/cms/category/list" title="${text('站点管理')}"><i class="fa fa-edit"></i></button>
|
||||
<button type="button" class="btn btn-box-tool" id="btnExpand" title="${text('展开')}" style="display:none;"><i class="fa fa-chevron-up"></i></button>
|
||||
<button type="button" class="btn btn-box-tool" id="btnCollapse" title="${text('折叠')}"><i class="fa fa-chevron-down"></i></button>
|
||||
<button type="button" class="btn btn-box-tool" id="btnRefresh" title="${text('刷新')}"><i class="fa fa-refresh"></i></button>
|
||||
</div>
|
||||
</div>
|
||||
<div class="ui-layout-content">
|
||||
<div id="tree" class="ztree"></div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="ui-layout-center">
|
||||
<iframe id="mainFrame" name="mainFrame" class="ui-layout-content p0"
|
||||
src="${ctx}/cms/article/list"></iframe>
|
||||
</div>
|
||||
<% } %>
|
||||
<script>
|
||||
// 初始化布局
|
||||
$('body').layout({
|
||||
west__size : 180
|
||||
});
|
||||
// 主页框架
|
||||
var win = $("#mainFrame")[0].contentWindow;
|
||||
// 树结构初始化加载
|
||||
var setting = {
|
||||
view : {selectedMulti : false},
|
||||
data : {key : {title : "title"}, simpleData : {enable : true}},
|
||||
callback : {
|
||||
onClick : function(event, treeId, treeNode) {
|
||||
var adminUrl = (treeNode.adminUrl && treeNode.adminUrl != '' ? treeNode.adminUrl : '');
|
||||
adminUrl += (adminUrl.indexOf('?') == -1 ? '?' : '&');
|
||||
// 如果栏目展现方式,是展现第一条内容(3:简介类栏目,栏目第一条内容),则加上显示模式条件。
|
||||
adminUrl += (treeNode.showModes == "3" && treeNode.module == "article") ? '&category.showModes=3' : '';
|
||||
// 设置刷新内容管理列表
|
||||
var ifr = $("#mainFrame"), src = ifr.attr("src");
|
||||
if (src.indexOf("://") == -1 // 不是外部链接
|
||||
&& src.indexOf("category.showModes=3") == -1 // 原地址中,不是展现的栏目第一条内容
|
||||
&& adminUrl.indexOf("category.showModes=3") == -1 // 新地址中,不是展现的栏目第一条内容
|
||||
&& ((src.indexOf("article") > 0 && adminUrl.indexOf("article") > 0)
|
||||
|| (src.indexOf("link") > 0 && adminUrl.indexOf("link") > 0))){
|
||||
var win = ifr[0].contentWindow, conts = ifr.contents();
|
||||
conts.find('input[type=reset]').click();
|
||||
conts.find('#categoryCode').val(treeNode.id);
|
||||
conts.find('#outlineView').val(adminUrl.indexOf("outlineView=true") != -1); // 文章模型是否显示大纲视图
|
||||
conts.find('#fileDownload').val(adminUrl.indexOf("fileDownload=true") != -1); // 链接模型是否是下载栏目
|
||||
var caption = conts.find('.portlet-title .caption');
|
||||
caption.html(caption.find('i').prop("outerHTML") + " " + treeNode.name);
|
||||
win.page();
|
||||
}else{
|
||||
$('#mainFrame').attr("src", adminUrl);
|
||||
}
|
||||
}
|
||||
}
|
||||
}, tree, loadTree = function() {
|
||||
js.ajaxSubmit("${ctx}/cms/category/treeData?___t="
|
||||
+ new Date().getTime(), { }, function(data) {
|
||||
tree = $.fn.zTree.init($("#tree"), setting, data);//.expandAll(true);
|
||||
// 展开第一级节点
|
||||
var nodes = tree.getNodesByParam("level", 0);
|
||||
for (var i = 0; i < nodes.length; i++) {
|
||||
tree.expandNode(nodes[i], true, false, false);
|
||||
}
|
||||
// 展开第二级节点
|
||||
// nodes = tree.getNodesByParam("level", 1);
|
||||
// for(var i=0; i<nodes.length; i++) {
|
||||
// tree.expandNode(nodes[i], true, false, false);
|
||||
// }
|
||||
}, null, null, js.text('loading.message'));
|
||||
};
|
||||
loadTree();
|
||||
// 工具栏按钮绑定
|
||||
$('#btnExpand').click(function() {
|
||||
tree.expandAll(true);
|
||||
$(this).hide();
|
||||
$('#btnCollapse').show();
|
||||
});
|
||||
$('#btnCollapse').click(function() {
|
||||
tree.expandAll(false);
|
||||
$(this).hide();
|
||||
$('#btnExpand').show();
|
||||
});
|
||||
$('#btnRefresh').click(function() {
|
||||
loadTree();
|
||||
});
|
||||
//调用子页分页函数
|
||||
function page() {
|
||||
win.page();
|
||||
}
|
||||
</script>
|
||||
@@ -0,0 +1,9 @@
|
||||
<% layout('/layouts/default.html', {title: '公共模型', libs: []}){ %>
|
||||
<div class="content pb0">
|
||||
<div class="row">
|
||||
<div class="col-xs-12">
|
||||
请在左侧选择站点栏目(公共模型不可操作)。
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<% } %>
|
||||
@@ -0,0 +1,188 @@
|
||||
<% layout('/layouts/default.html', {title: '文章评论表管理', libs: ['validate','fileupload']}){ %>
|
||||
<div class="main-content">
|
||||
<div class="box box-main">
|
||||
<div class="box-header with-border">
|
||||
<div class="box-title">
|
||||
<i class="fa fa-list-alt"></i> ${text(comment.isNewRecord ? '新增文章评论表' : '编辑文章评论表')}
|
||||
</div>
|
||||
<div class="box-tools pull-right">
|
||||
<button type="button" class="btn btn-box-tool" data-widget="collapse"><i class="fa fa-minus"></i></button>
|
||||
</div>
|
||||
</div>
|
||||
<#form:form id="inputForm" model="${comment}" action="${ctx}/cms/comment/save" method="post" class="form-horizontal">
|
||||
<div class="box-body">
|
||||
<div class="form-unit">${text('基本信息')}</div>
|
||||
<#form:hidden path="id"/>
|
||||
<div class="row">
|
||||
<div class="col-xs-6">
|
||||
<div class="form-group">
|
||||
<label class="control-label col-sm-4" title="">
|
||||
<span class="required ">*</span> ${text('栏目编码')}:<i class="fa icon-question hide"></i></label>
|
||||
<div class="col-sm-8">
|
||||
<#form:input path="categoryCode" maxlength="64" class="form-control required"/>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-xs-6">
|
||||
<div class="form-group">
|
||||
<label class="control-label col-sm-4" title="">
|
||||
<span class="required ">*</span> ${text('内容编号')}:<i class="fa icon-question hide"></i></label>
|
||||
<div class="col-sm-8">
|
||||
<#form:input path="articleId" maxlength="64" class="form-control required"/>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="row">
|
||||
<div class="col-xs-6">
|
||||
<div class="form-group">
|
||||
<label class="control-label col-sm-4" title="">
|
||||
<span class="required hide">*</span> ${text('父级评论')}:<i class="fa icon-question hide"></i></label>
|
||||
<div class="col-sm-8">
|
||||
<#form:input path="parentId" maxlength="64" class="form-control"/>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-xs-6">
|
||||
<div class="form-group">
|
||||
<label class="control-label col-sm-4" title="">
|
||||
<span class="required ">*</span> ${text('内容标题')}:<i class="fa icon-question hide"></i></label>
|
||||
<div class="col-sm-8">
|
||||
<#form:input path="articleTitle" maxlength="255" class="form-control required"/>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="row">
|
||||
<div class="col-xs-12">
|
||||
<div class="form-group">
|
||||
<label class="control-label col-sm-2" title="">
|
||||
<span class="required ">*</span> ${text('评论内容')}:<i class="fa icon-question hide"></i></label>
|
||||
<div class="col-sm-10">
|
||||
<#form:textarea path="content" rows="4" maxlength="255" class="form-control required"/>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="row">
|
||||
<div class="col-xs-6">
|
||||
<div class="form-group">
|
||||
<label class="control-label col-sm-4" title="">
|
||||
<span class="required hide">*</span> ${text('评论姓名')}:<i class="fa icon-question hide"></i></label>
|
||||
<div class="col-sm-8">
|
||||
<#form:input path="name" maxlength="50" class="form-control"/>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-xs-6">
|
||||
<div class="form-group">
|
||||
<label class="control-label col-sm-4" title="">
|
||||
<span class="required hide">*</span> ${text('评论IP')}:<i class="fa icon-question hide"></i></label>
|
||||
<div class="col-sm-8">
|
||||
<#form:input path="ip" maxlength="100" class="form-control"/>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="row">
|
||||
<div class="col-xs-6">
|
||||
<div class="form-group">
|
||||
<label class="control-label col-sm-4" title="">
|
||||
<span class="required hide">*</span> ${text('审核人')}:<i class="fa icon-question hide"></i></label>
|
||||
<div class="col-sm-8">
|
||||
<#form:input path="auditUserCode" maxlength="64" class="form-control"/>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-xs-6">
|
||||
<div class="form-group">
|
||||
<label class="control-label col-sm-4" title="">
|
||||
<span class="required hide">*</span> ${text('审核时间')}:<i class="fa icon-question hide"></i></label>
|
||||
<div class="col-sm-8">
|
||||
<#form:input path="auditDate" class="form-control"/>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="row">
|
||||
<div class="col-xs-6">
|
||||
<div class="form-group">
|
||||
<label class="control-label col-sm-4" title="">
|
||||
<span class="required hide">*</span> ${text('审核意见')}:<i class="fa icon-question hide"></i></label>
|
||||
<div class="col-sm-8">
|
||||
<#form:input path="auditComment" maxlength="200" class="form-control"/>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-xs-6">
|
||||
<div class="form-group">
|
||||
<label class="control-label col-sm-4" title="">
|
||||
<span class="required hide">*</span> ${text('支持数')}:<i class="fa icon-question hide"></i></label>
|
||||
<div class="col-sm-8">
|
||||
<#form:input path="hitsPlus" class="form-control digits"/>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="row">
|
||||
<div class="col-xs-6">
|
||||
<div class="form-group">
|
||||
<label class="control-label col-sm-4" title="">
|
||||
<span class="required hide">*</span> ${text('反对数')}:<i class="fa icon-question hide"></i></label>
|
||||
<div class="col-sm-8">
|
||||
<#form:input path="hitsMinus" class="form-control digits"/>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="row">
|
||||
<div class="col-xs-12">
|
||||
<div class="form-group">
|
||||
<label class="control-label col-sm-2">${text('图片上传')}:</label>
|
||||
<div class="col-sm-10">
|
||||
<#form:fileupload id="uploadImage" bizKey="${comment.id}" bizType="comment_image"
|
||||
uploadType="image" class="" readonly="false"/>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="row">
|
||||
<div class="col-xs-12">
|
||||
<div class="form-group">
|
||||
<label class="control-label col-sm-2">${text('附件上传')}:</label>
|
||||
<div class="col-sm-10">
|
||||
<#form:fileupload id="uploadFile" bizKey="${comment.id}" bizType="comment_file"
|
||||
uploadType="all" class="" readonly="false"/>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="box-footer">
|
||||
<div class="row">
|
||||
<div class="col-sm-offset-2 col-sm-10">
|
||||
<% if (hasPermi('cms:comment:edit')){ %>
|
||||
<button type="submit" class="btn btn-sm btn-primary" id="btnSubmit"><i class="fa fa-check"></i> ${text('保 存')}</button>
|
||||
<% } %>
|
||||
<button type="button" class="btn btn-sm btn-default" id="btnCancel" onclick="js.closeCurrentTabPage()"><i class="fa fa-reply-all"></i> ${text('关 闭')}</button>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</#form:form>
|
||||
</div>
|
||||
</div>
|
||||
<% } %>
|
||||
<script>
|
||||
$("#inputForm").validate({
|
||||
submitHandler: function(form){
|
||||
js.ajaxSubmitForm($(form), function(data){
|
||||
js.showMessage(data.message);
|
||||
if(data.result == Global.TRUE){
|
||||
js.closeCurrentTabPage(function(contentWindow){
|
||||
contentWindow.page();
|
||||
});
|
||||
}
|
||||
}, "json");
|
||||
}
|
||||
});
|
||||
</script>
|
||||
@@ -0,0 +1,150 @@
|
||||
<% layout('/layouts/default.html', {title: '文章评论表管理', libs: ['dataGrid']}){ %>
|
||||
<div class="main-content">
|
||||
<div class="box box-main">
|
||||
<div class="box-header">
|
||||
<div class="box-title">
|
||||
<i class="fa fa-list-alt"></i> ${text('文章评论表管理')}
|
||||
</div>
|
||||
<div class="box-tools pull-right">
|
||||
<a href="#" class="btn btn-default" id="btnSearch" title="${text('查询')}"><i class="fa fa-filter"></i> ${text('查询')}</a>
|
||||
<% if(hasPermi('cms:comment:edit')){ %>
|
||||
<a href="${ctx}/cms/comment/form" class="btn btn-default btnTool" title="${text('新增文章评论表')}"><i class="fa fa-plus"></i> ${text('新增')}</a>
|
||||
<% } %>
|
||||
</div>
|
||||
</div>
|
||||
<div class="box-body">
|
||||
<#form:form id="searchForm" model="${comment}" action="${ctx}/cms/comment/listData" method="post" class="form-inline hide"
|
||||
data-page-no="${parameter.pageNo}" data-page-size="${parameter.pageSize}" data-order-by="${parameter.orderBy}">
|
||||
<div class="form-group">
|
||||
<label class="control-label">${text('栏目编码')}:</label>
|
||||
<div class="control-inline">
|
||||
<#form:input path="categoryCode" maxlength="64" class="form-control width-120"/>
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label class="control-label">${text('内容编号')}:</label>
|
||||
<div class="control-inline">
|
||||
<#form:input path="articleId" maxlength="64" class="form-control width-120"/>
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label class="control-label">${text('父级评论')}:</label>
|
||||
<div class="control-inline">
|
||||
<#form:input path="parentId" maxlength="64" class="form-control width-120"/>
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label class="control-label">${text('内容标题')}:</label>
|
||||
<div class="control-inline">
|
||||
<#form:input path="articleTitle" maxlength="255" class="form-control width-120"/>
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label class="control-label">${text('评论内容')}:</label>
|
||||
<div class="control-inline">
|
||||
<#form:input path="content" maxlength="255" class="form-control width-120"/>
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label class="control-label">${text('评论姓名')}:</label>
|
||||
<div class="control-inline">
|
||||
<#form:input path="name" maxlength="50" class="form-control width-120"/>
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label class="control-label">${text('评论IP')}:</label>
|
||||
<div class="control-inline">
|
||||
<#form:input path="ip" maxlength="100" class="form-control width-120"/>
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label class="control-label">${text('审核人')}:</label>
|
||||
<div class="control-inline">
|
||||
<#form:input path="auditUserCode" maxlength="64" class="form-control width-120"/>
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label class="control-label">${text('审核时间')}:</label>
|
||||
<div class="control-inline">
|
||||
<#form:input path="auditDate" class="form-control width-120"/>
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label class="control-label">${text('审核意见')}:</label>
|
||||
<div class="control-inline">
|
||||
<#form:input path="auditComment" maxlength="200" class="form-control width-120"/>
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label class="control-label">${text('支持数')}:</label>
|
||||
<div class="control-inline">
|
||||
<#form:input path="hitsPlus" class="form-control width-120"/>
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label class="control-label">${text('反对数')}:</label>
|
||||
<div class="control-inline">
|
||||
<#form:input path="hitsMinus" class="form-control width-120"/>
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label class="control-label">${text('状态')}:</label>
|
||||
<div class="control-inline width-120">
|
||||
<#form:select path="status" dictType="sys_search_status" blankOption="true" class="form-control"/>
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<button type="submit" class="btn btn-primary btn-sm">${text('查询')}</button>
|
||||
<button type="reset" class="btn btn-default btn-sm">${text('重置')}</button>
|
||||
</div>
|
||||
</#form:form>
|
||||
<table id="dataGrid"></table>
|
||||
<div id="dataGridPage"></div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<% } %>
|
||||
<script>
|
||||
// 初始化DataGrid对象
|
||||
$('#dataGrid').dataGrid({
|
||||
searchForm: $("#searchForm"),
|
||||
columnModel: [
|
||||
{header:'${text('栏目编码')}', name:'categoryCode', index:'a.category_code', width:150, align:"left", frozen:true, formatter: function(val, obj, row, act){
|
||||
return '<a href="${ctx}/cms/comment/form?id='+row.id+'" class="btnList" data-title="${text('编辑文章评论表')}">'+(val||row.id)+'</a>';
|
||||
}},
|
||||
{header:'${text('内容编号')}', name:'articleId', index:'a.article_id', width:150, align:"left"},
|
||||
{header:'${text('父级评论')}', name:'parentId', index:'a.parent_id', width:150, align:"left"},
|
||||
{header:'${text('内容标题')}', name:'articleTitle', index:'a.article_title', width:150, align:"left"},
|
||||
{header:'${text('评论内容')}', name:'content', index:'a.content', width:150, align:"left"},
|
||||
{header:'${text('评论姓名')}', name:'name', index:'a.name', width:150, align:"left"},
|
||||
{header:'${text('评论IP')}', name:'ip', index:'a.ip', width:150, align:"left"},
|
||||
{header:'${text('创建时间')}', name:'createDate', index:'a.create_date', width:150, align:"center"},
|
||||
{header:'${text('审核人')}', name:'auditUserCode', index:'a.audit_user_code', width:150, align:"left"},
|
||||
{header:'${text('审核时间')}', name:'auditDate', index:'a.audit_date', width:150, align:"center"},
|
||||
{header:'${text('审核意见')}', name:'auditComment', index:'a.audit_comment', width:150, align:"left"},
|
||||
{header:'${text('支持数')}', name:'hitsPlus', index:'a.hits_plus', width:150, align:"center"},
|
||||
{header:'${text('反对数')}', name:'hitsMinus', index:'a.hits_minus', width:150, align:"center"},
|
||||
{header:'${text('状态')}', name:'status', index:'a.status', width:150, align:"center", formatter: function(val, obj, row, act){
|
||||
return js.getDictLabel(${@DictUtils.getDictListJson('sys_search_status')}, val, '${text('未知')}', true);
|
||||
}},
|
||||
{header:'${text('操作')}', name:'actions', width:120, sortable:false, title:false, formatter: function(val, obj, row, act){
|
||||
var actions = [];
|
||||
<% if(hasPermi('cms:comment:edit')){ %>
|
||||
actions.push('<a href="${ctx}/cms/comment/form?id='+row.id+'" class="btnList" title="${text('编辑文章评论表')}"><i class="fa fa-pencil"></i></a> ');
|
||||
if (row.status == Global.STATUS_NORMAL){
|
||||
actions.push('<a href="${ctx}/cms/comment/disable?id='+row.id+'" class="btnList" title="${text('停用文章评论表')}" data-confirm="${text('确认要停用该文章评论表吗?')}"><i class="glyphicon glyphicon-ban-circle"></i></a> ');
|
||||
}
|
||||
if (row.status == Global.STATUS_DISABLE){
|
||||
actions.push('<a href="${ctx}/cms/comment/enable?id='+row.id+'" class="btnList" title="${text('启用文章评论表')}" data-confirm="${text('确认要启用该文章评论表吗?')}"><i class="glyphicon glyphicon-ok-circle"></i></a> ');
|
||||
}
|
||||
actions.push('<a href="${ctx}/cms/comment/delete?id='+row.id+'" class="btnList" title="${text('删除文章评论表')}" data-confirm="${text('确认要删除该文章评论表吗?')}"><i class="fa fa-trash-o"></i></a> ');
|
||||
<% } %>
|
||||
return actions.join('');
|
||||
}}
|
||||
],
|
||||
// 加载成功后执行事件
|
||||
ajaxSuccess: function(data){
|
||||
|
||||
}
|
||||
});
|
||||
</script>
|
||||
122
modules/cms/src/main/resources/views/modules/cms/reportForm.html
Normal file
122
modules/cms/src/main/resources/views/modules/cms/reportForm.html
Normal file
@@ -0,0 +1,122 @@
|
||||
<% layout('/layouts/default.html', {title: '内容举报表管理', libs: ['validate','fileupload']}){ %>
|
||||
<div class="main-content">
|
||||
<div class="box box-main">
|
||||
<div class="box-header with-border">
|
||||
<div class="box-title">
|
||||
<i class="fa fa-list-alt"></i> ${text(report.isNewRecord ? '新增内容举报表' : '编辑内容举报表')}
|
||||
</div>
|
||||
<div class="box-tools pull-right">
|
||||
<button type="button" class="btn btn-box-tool" data-widget="collapse"><i class="fa fa-minus"></i></button>
|
||||
</div>
|
||||
</div>
|
||||
<#form:form id="inputForm" model="${report}" action="${ctx}/cms/report/save" method="post" class="form-horizontal">
|
||||
<div class="box-body">
|
||||
<div class="form-unit">${text('基本信息')}</div>
|
||||
<#form:hidden path="id"/>
|
||||
<div class="row">
|
||||
<div class="row">
|
||||
<div class="col-xs-12">
|
||||
<div class="form-group">
|
||||
<label class="control-label col-sm-2" title="">
|
||||
<span class="required hide">*</span> ${text('举报来源')}:<i class="fa icon-question hide"></i></label>
|
||||
<div class="col-sm-5">
|
||||
<#form:input path="reportSource" maxlength="1" class="form-control"/>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="row">
|
||||
<div class="col-xs-12">
|
||||
<div class="form-group">
|
||||
<label class="control-label col-sm-2" title="">
|
||||
<span class="required hide">*</span> ${text('举报内容')}:<i class="fa icon-question hide"></i></label>
|
||||
<div class="col-sm-5">
|
||||
<#form:input path="reportContent" maxlength="500" class="form-control"/>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="row">
|
||||
<div class="col-xs-12">
|
||||
<div class="form-group">
|
||||
<label class="control-label col-sm-2" title="">
|
||||
<span class="required hide">*</span> ${text('举报的URL')}:<i class="fa icon-question hide"></i></label>
|
||||
<div class="col-sm-5">
|
||||
<#form:input path="reportUrl" maxlength="1000" class="form-control"/>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="row">
|
||||
<div class="col-xs-12">
|
||||
<div class="form-group">
|
||||
<label class="control-label col-sm-2" title="">
|
||||
<span class="required hide">*</span> ${text('举报类型')}:<i class="fa icon-question hide"></i></label>
|
||||
<div class="col-sm-5">
|
||||
<#form:input path="reportType" maxlength="1" class="form-control"/>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="row">
|
||||
<div class="col-xs-12">
|
||||
<div class="form-group">
|
||||
<label class="control-label col-sm-2" title="">
|
||||
<span class="required hide">*</span> ${text('举报原因')}:<i class="fa icon-question hide"></i></label>
|
||||
<div class="col-sm-5">
|
||||
<#form:input path="reportCause" maxlength="500" class="form-control"/>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="row">
|
||||
<div class="col-xs-12">
|
||||
<div class="form-group">
|
||||
<label class="control-label col-sm-2">${text('图片上传')}:</label>
|
||||
<div class="col-sm-10">
|
||||
<#form:fileupload id="uploadImage" bizKey="${report.id}" bizType="report_image"
|
||||
uploadType="image" class="" readonly="false"/>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="row">
|
||||
<div class="col-xs-12">
|
||||
<div class="form-group">
|
||||
<label class="control-label col-sm-2">${text('附件上传')}:</label>
|
||||
<div class="col-sm-10">
|
||||
<#form:fileupload id="uploadFile" bizKey="${report.id}" bizType="report_file"
|
||||
uploadType="all" class="" readonly="false"/>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="box-footer">
|
||||
<div class="row">
|
||||
<div class="col-sm-offset-2 col-sm-10">
|
||||
<% if (hasPermi('cms:report:edit')){ %>
|
||||
<button type="submit" class="btn btn-sm btn-primary" id="btnSubmit"><i class="fa fa-check"></i> ${text('保 存')}</button>
|
||||
<% } %>
|
||||
<button type="button" class="btn btn-sm btn-default" id="btnCancel" onclick="js.closeCurrentTabPage()"><i class="fa fa-reply-all"></i> ${text('关 闭')}</button>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</#form:form>
|
||||
</div>
|
||||
</div>
|
||||
<% } %>
|
||||
<script>
|
||||
$("#inputForm").validate({
|
||||
submitHandler: function(form){
|
||||
js.ajaxSubmitForm($(form), function(data){
|
||||
js.showMessage(data.message);
|
||||
if(data.result == Global.TRUE){
|
||||
js.closeCurrentTabPage(function(contentWindow){
|
||||
contentWindow.page();
|
||||
});
|
||||
}
|
||||
}, "json");
|
||||
}
|
||||
});
|
||||
</script>
|
||||
@@ -0,0 +1,91 @@
|
||||
<% layout('/layouts/default.html', {title: '内容举报表管理', libs: ['dataGrid']}){ %>
|
||||
<div class="main-content">
|
||||
<div class="box box-main">
|
||||
<div class="box-header">
|
||||
<div class="box-title">
|
||||
<i class="fa fa-list-alt"></i> ${text('内容举报表管理')}
|
||||
</div>
|
||||
<div class="box-tools pull-right">
|
||||
<a href="#" class="btn btn-default" id="btnSearch" title="${text('查询')}"><i class="fa fa-filter"></i> ${text('查询')}</a>
|
||||
<% if(hasPermi('cms:report:edit')){ %>
|
||||
<a href="${ctx}/cms/report/form" class="btn btn-default btnTool" title="${text('新增内容举报表')}"><i class="fa fa-plus"></i> ${text('新增')}</a>
|
||||
<% } %>
|
||||
</div>
|
||||
</div>
|
||||
<div class="box-body">
|
||||
<#form:form id="searchForm" model="${report}" action="${ctx}/cms/report/listData" method="post" class="form-inline hide"
|
||||
data-page-no="${parameter.pageNo}" data-page-size="${parameter.pageSize}" data-order-by="${parameter.orderBy}">
|
||||
<div class="form-group">
|
||||
<label class="control-label">${text('举报来源')}:</label>
|
||||
<div class="control-inline">
|
||||
<#form:input path="reportSource" maxlength="1" class="form-control width-120"/>
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label class="control-label">${text('举报内容')}:</label>
|
||||
<div class="control-inline">
|
||||
<#form:input path="reportContent" maxlength="500" class="form-control width-120"/>
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label class="control-label">${text('举报的URL')}:</label>
|
||||
<div class="control-inline">
|
||||
<#form:input path="reportUrl" maxlength="1000" class="form-control width-120"/>
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label class="control-label">${text('举报类型')}:</label>
|
||||
<div class="control-inline">
|
||||
<#form:input path="reportType" maxlength="1" class="form-control width-120"/>
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label class="control-label">${text('举报原因')}:</label>
|
||||
<div class="control-inline">
|
||||
<#form:input path="reportCause" maxlength="500" class="form-control width-120"/>
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<button type="submit" class="btn btn-primary btn-sm">${text('查询')}</button>
|
||||
<button type="reset" class="btn btn-default btn-sm">${text('重置')}</button>
|
||||
</div>
|
||||
</#form:form>
|
||||
<table id="dataGrid"></table>
|
||||
<div id="dataGridPage"></div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<% } %>
|
||||
<script>
|
||||
// 初始化DataGrid对象
|
||||
$('#dataGrid').dataGrid({
|
||||
searchForm: $("#searchForm"),
|
||||
columnModel: [
|
||||
{header:'${text('举报来源')}', name:'reportSource', index:'a.report_source', width:150, align:"left", frozen:true, formatter: function(val, obj, row, act){
|
||||
return '<a href="${ctx}/cms/report/form?id='+row.id+'" class="btnList" data-title="${text('编辑内容举报表')}">'+(val||row.id)+'</a>';
|
||||
}},
|
||||
{header:'${text('举报内容')}', name:'reportContent', index:'a.report_content', width:150, align:"left"},
|
||||
{header:'${text('举报的URL')}', name:'reportUrl', index:'a.report_url', width:150, align:"left"},
|
||||
{header:'${text('举报类型')}', name:'reportType', index:'a.report_type', width:150, align:"left"},
|
||||
{header:'${text('举报原因')}', name:'reportCause', index:'a.report_cause', width:150, align:"left"},
|
||||
{header:'${text('操作')}', name:'actions', width:120, sortable:false, title:false, formatter: function(val, obj, row, act){
|
||||
var actions = [];
|
||||
<% if(hasPermi('cms:report:edit')){ %>
|
||||
actions.push('<a href="${ctx}/cms/report/form?id='+row.id+'" class="btnList" title="${text('编辑内容举报表')}"><i class="fa fa-pencil"></i></a> ');
|
||||
if (row.status == Global.STATUS_NORMAL){
|
||||
actions.push('<a href="${ctx}/cms/report/disable?id='+row.id+'" class="btnList" title="${text('停用内容举报表')}" data-confirm="${text('确认要停用该内容举报表吗?')}"><i class="glyphicon glyphicon-ban-circle"></i></a> ');
|
||||
}
|
||||
if (row.status == Global.STATUS_DISABLE){
|
||||
actions.push('<a href="${ctx}/cms/report/enable?id='+row.id+'" class="btnList" title="${text('启用内容举报表')}" data-confirm="${text('确认要启用该内容举报表吗?')}"><i class="glyphicon glyphicon-ok-circle"></i></a> ');
|
||||
}
|
||||
actions.push('<a href="${ctx}/cms/report/delete?id='+row.id+'" class="btnList" title="${text('删除内容举报表')}" data-confirm="${text('确认要删除该内容举报表吗?')}"><i class="fa fa-trash-o"></i></a> ');
|
||||
<% } %>
|
||||
return actions.join('');
|
||||
}}
|
||||
],
|
||||
// 加载成功后执行事件
|
||||
ajaxSuccess: function(data){
|
||||
|
||||
}
|
||||
});
|
||||
</script>
|
||||
185
modules/cms/src/main/resources/views/modules/cms/siteForm.html
Normal file
185
modules/cms/src/main/resources/views/modules/cms/siteForm.html
Normal file
@@ -0,0 +1,185 @@
|
||||
<% layout('/layouts/default.html', {title: '站点管理', libs: ['validate','fileupload','ueditor','dataGrid']}){ %>
|
||||
|
||||
<div class="main-content">
|
||||
<div class="box box-main">
|
||||
<div class="box-header with-border">
|
||||
<div class="box-title">
|
||||
<i class="fa fa-list-alt"></i> ${text(site.isNewRecord ? '新增站点' : '编辑站点')}
|
||||
</div>
|
||||
<div class="box-tools pull-right">
|
||||
<button type="button" class="btn btn-box-tool" data-widget="collapse"><i class="fa fa-minus"></i></button>
|
||||
</div>
|
||||
</div>
|
||||
<#form:form id="inputForm" model="${site}" action="${ctx}/cms/site/save" method="post" class="form-horizontal">
|
||||
<div class="box-body">
|
||||
<div class="form-unit">${text('基本信息')}</div>
|
||||
<div class="row">
|
||||
<div class="col-xs-6">
|
||||
<div class="form-group">
|
||||
<label class="control-label col-sm-4" title="">
|
||||
<span class="required ">*</span> ${text('站点名称')}:<i class="fa icon-question hide"></i></label>
|
||||
<div class="col-sm-8">
|
||||
<#form:input path="siteName" maxlength="100" placeholder="默认站点" class="form-control required"/>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-xs-6">
|
||||
<div class="form-group">
|
||||
<label class="control-label col-sm-4" title="">
|
||||
<span class="required ">*</span> ${text('站点编码')}:<i class="fa icon-question hide"></i></label>
|
||||
<div class="col-sm-8">
|
||||
<#form:hidden path="isNewRecord" />
|
||||
<#form:input path="siteCode" maxlength="64" readonly="${!site.isNewRecord}"
|
||||
class="form-control required abc" />
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="row">
|
||||
<div class="col-xs-6">
|
||||
<div class="form-group">
|
||||
<label class="control-label col-sm-4" title="">
|
||||
<span class="required hide">*</span> ${text('站点域名')}:<i class="fa icon-question hide"></i></label>
|
||||
<div class="col-sm-8">
|
||||
<#form:input path="domain" maxlength="500" class="form-control" placeholder="www.jeesite.com"/>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-xs-6">
|
||||
<div class="form-group">
|
||||
<label class="control-label col-sm-4" title="">
|
||||
<span class="required hide">*</span> ${text('站点排序')}:<i class="fa icon-question hide"></i></label>
|
||||
<div class="col-sm-8">
|
||||
<#form:input path="siteSort" maxlength="500" class="form-control required digits"/>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="row">
|
||||
<div class="col-xs-12">
|
||||
<div class="form-group">
|
||||
<label class="control-label col-sm-2" title="">
|
||||
<span class="required ">*</span> ${text('站点标题')}:<i class="fa icon-question hide"></i></label>
|
||||
<div class="col-sm-10">
|
||||
<#form:input path="title" maxlength="100" placeholder="演示站点" class="form-control required"/>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="row">
|
||||
<div class="col-xs-12">
|
||||
<div class="form-group">
|
||||
<label class="control-label col-sm-2">${text('站点logo')}</label>
|
||||
<div class="col-sm-10">
|
||||
<#form:fileupload id="uploadLogo" bizKey="${site.id}" bizType="site_logo" returnPath="true"
|
||||
filePathInputId="logo"
|
||||
uploadType="image" readonly="false" maxUploadNum="1" isMini="false"/>
|
||||
<#form:input path="logo" class="form-control"/>
|
||||
|
||||
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-unit">${text('详细信息')}</div>
|
||||
<div class="row">
|
||||
<div class="col-xs-12">
|
||||
<div class="form-group">
|
||||
<label class="control-label col-sm-2" title="">
|
||||
<span class="required hide">*</span> ${text('描述')}:<i class="fa icon-question hide"></i></label>
|
||||
<div class="col-sm-10">
|
||||
<#form:textarea path="description" maxlength="500" rows="3" placeholder="填写描述,有助于搜索引擎优化" class="form-control"/>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="row">
|
||||
<div class="col-xs-12">
|
||||
<div class="form-group">
|
||||
<label class="control-label col-sm-2" title="">
|
||||
<span class="required hide">*</span> ${text('关键字')}:<i class="fa icon-question hide"></i></label>
|
||||
<div class="col-sm-10">
|
||||
<#form:input path="keywords" maxlength="500" placeholder="填写关键词,通过,或|分割,有助于搜索引擎优化" class="form-control"/>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="row">
|
||||
<div class="col-xs-6">
|
||||
<div class="form-group">
|
||||
<label class="control-label col-sm-4" title="">
|
||||
<span class="required hide">*</span> ${text('主题风格')}:<i class="fa icon-question hide"></i></label>
|
||||
<div class="col-sm-8">
|
||||
<#form:select path="theme" dictType="cms_theme" class="form-control" />
|
||||
|
||||
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-xs-6">
|
||||
<div class="form-group">
|
||||
<label class="control-label col-sm-4" title="">
|
||||
<span class="required hide">*</span> ${text('首页视图')}:<i class="fa icon-question " title='自定义首页视图名称必须以"index"开始'></i></label>
|
||||
<div class="col-sm-8">
|
||||
<#form:select path="customIndexView" items="${indexViewList}" itemLabel="id" itemValue="id" class="form-control required" />
|
||||
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="row">
|
||||
<div class="col-xs-12">
|
||||
<div class="form-group">
|
||||
<label class="control-label col-sm-2" title="">
|
||||
<span class="required ">*</span> ${text('版权信息')}:<i class="fa icon-question hide"></i></label>
|
||||
<div class="col-sm-10">
|
||||
|
||||
<#form:ueditor name="copyright" path="copyright" maxlength="10000" height="200" class="required"
|
||||
simpleToolbars="false" readonly="false" outline="false"/>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-unit">${text('其他信息')}</div>
|
||||
<div class="row">
|
||||
<div class="col-xs-12">
|
||||
<div class="form-group">
|
||||
<label class="control-label col-sm-2" title="">
|
||||
<span class="required hide">*</span> ${text('备注信息')}:<i class="fa icon-question hide"></i></label>
|
||||
<div class="col-sm-10">
|
||||
<#form:textarea path="remarks" rows="4" maxlength="500" class="form-control"/>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
</div>
|
||||
<div class="box-footer">
|
||||
<div class="row">
|
||||
<div class="col-sm-offset-2 col-sm-10">
|
||||
<% if (hasPermi('cms:site:edit')){ %>
|
||||
<button type="submit" class="btn btn-sm btn-primary" id="btnSubmit"><i class="fa fa-check"></i> ${text('保 存')}</button>
|
||||
<% } %>
|
||||
<button type="button" class="btn btn-sm btn-default" id="btnCancel" onclick="js.closeCurrentTabPage()"><i class="fa fa-reply-all"></i> ${text('关 闭')}</button>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</#form:form>
|
||||
</div>
|
||||
</div>
|
||||
<% } %>
|
||||
<script>
|
||||
$("#inputForm").validate({
|
||||
submitHandler: function(form){
|
||||
js.ajaxSubmitForm($(form), function(data){
|
||||
js.showMessage(data.message);
|
||||
if(data.result == Global.TRUE){
|
||||
js.closeCurrentTabPage(function(contentWindow){
|
||||
contentWindow.page();
|
||||
});
|
||||
}
|
||||
}, "json");
|
||||
}
|
||||
});
|
||||
</script>
|
||||
@@ -0,0 +1,90 @@
|
||||
<% layout('/layouts/default.html', {title: '站点管理', libs: ['dataGrid']}){ %>
|
||||
<div class="main-content">
|
||||
<div class="box box-main">
|
||||
<div class="box-header">
|
||||
<div class="box-title">
|
||||
<i class="fa fa-list-alt"></i> ${text('站点管理')}
|
||||
</div>
|
||||
<div class="box-tools pull-right">
|
||||
<a href="#" class="btn btn-default" id="btnSearch" title="${text('查询')}"><i class="fa fa-filter"></i> ${text('查询')}</a>
|
||||
<% if(hasPermi('cms:site:edit')){ %>
|
||||
<a href="${ctx}/cms/site/form" class="btn btn-default btnTool" title="${text('新增站点')}"><i class="fa fa-plus"></i> ${text('新增')}</a>
|
||||
<% } %>
|
||||
</div>
|
||||
</div>
|
||||
<div class="box-body">
|
||||
<#form:form id="searchForm" model="${site}" action="${ctx}/cms/site/listData" method="post" class="form-inline hide"
|
||||
data-page-no="${parameter.pageNo}" data-page-size="${parameter.pageSize}" data-order-by="${parameter.orderBy}">
|
||||
<div class="form-group">
|
||||
<label class="control-label">${text('站点名称')}:</label>
|
||||
<div class="control-inline">
|
||||
<#form:input path="siteName" maxlength="100" class="form-control width-120"/>
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label class="control-label">${text('站点标题')}:</label>
|
||||
<div class="control-inline">
|
||||
<#form:input path="title" maxlength="100" class="form-control width-120"/>
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label class="control-label">${text('站点域名')}:</label>
|
||||
<div class="control-inline">
|
||||
<#form:input path="domain" maxlength="500" class="form-control width-120"/>
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label class="control-label">${text('状态')}:</label>
|
||||
<div class="control-inline width-90">
|
||||
<#form:select path="status" dictType="sys_search_status" blankOption="true" class="form-control"/>
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<button type="submit" class="btn btn-primary btn-sm">${text('查询')}</button>
|
||||
<button type="reset" class="btn btn-default btn-sm">${text('重置')}</button>
|
||||
</div>
|
||||
</#form:form>
|
||||
<table id="dataGrid"></table>
|
||||
<div id="dataGridPage"></div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<% } %>
|
||||
<script>
|
||||
// 初始化DataGrid对象
|
||||
$('#dataGrid').dataGrid({
|
||||
searchForm: $("#searchForm"),
|
||||
columnModel: [
|
||||
{header:'${text('站点名称')}', name:'siteName', index:'a.site_name', width:150, align:"left", frozen:true, formatter: function(val, obj, row, act){
|
||||
return '<a href="${ctx}/cms/site/form?siteCode='+row.siteCode+'" class="btnList" data-title="${text('编辑站点')}">'+(val||row.id)+'</a>';
|
||||
}},
|
||||
{header:'${text('站点标题')}', name:'title', index:'a.title', width:150, align:"left"},
|
||||
// {header:'${text('站点Logo')}', name:'logo', index:'a.logo', width:150, align:"left"},
|
||||
{header:'${text('站点域名')}', name:'domain', index:'a.domain', width:150, align:"center"},
|
||||
{header:'${text('描述')}', name:'description', index:'a.description', width:150, align:"left"},
|
||||
{header:'${text('主题')}', name:'theme', index:'a.theme', width:150, align:"center"},
|
||||
{header:'${text('状态')}', name:'status', index:'a.status', width:90, align:"center", formatter: function(val, obj, row, act){
|
||||
return js.getDictLabel(${@DictUtils.getDictListJson('sys_search_status')}, val, '${text('未知')}', true);
|
||||
}},
|
||||
{header:'${text('创建时间')}', name:'createDate', index:'a.create_date', width:150, align:"center"},
|
||||
{header:'${text('操作')}', name:'actions', width:120, sortable:false, title:false, formatter: function(val, obj, row, act){
|
||||
var actions = [];
|
||||
<% if(hasPermi('cms:site:edit')){ %>
|
||||
actions.push('<a href="${ctx}/cms/site/form?siteCode='+row.siteCode+'" class="btnList" title="${text('编辑站点')}"><i class="fa fa-pencil"></i></a> ');
|
||||
if (row.status == Global.STATUS_NORMAL){
|
||||
actions.push('<a href="${ctx}/cms/site/disable?siteCode='+row.siteCode+'" class="btnList" title="${text('停用站点')}" data-confirm="${text('确认要停用该站点吗?')}"><i class="glyphicon glyphicon-ban-circle"></i></a> ');
|
||||
}
|
||||
if (row.status == Global.STATUS_DISABLE){
|
||||
actions.push('<a href="${ctx}/cms/site/enable?siteCode='+row.siteCode+'" class="btnList" title="${text('启用站点')}" data-confirm="${text('确认要启用该站点吗?')}"><i class="glyphicon glyphicon-ok-circle"></i></a> ');
|
||||
}
|
||||
actions.push('<a href="${ctx}/cms/site/delete?siteCode='+row.siteCode+'" class="btnList" title="${text('删除站点')}" data-confirm="${text('确认要删除该站点吗?')}"><i class="fa fa-trash-o"></i></a> ');
|
||||
<% } %>
|
||||
return actions.join('');
|
||||
}}
|
||||
],
|
||||
// 加载成功后执行事件
|
||||
ajaxSuccess: function(data){
|
||||
|
||||
}
|
||||
});
|
||||
</script>
|
||||
@@ -0,0 +1,57 @@
|
||||
<% layout('/layouts/default.html', {title: '模板内容', libs: ['validate','ueditor']}){%>
|
||||
<div class="main-content">
|
||||
<div class="box box-main">
|
||||
<div class="box-header with-border">
|
||||
<div class="box-title">
|
||||
<i class="fa fa-list-alt"></i> ${text('模板内容')}
|
||||
</div>
|
||||
<div class="box-tools pull-right">
|
||||
<button type="button" class="btn btn-box-tool"
|
||||
data-widget="collapse">
|
||||
<i class="fa fa-minus"></i>
|
||||
</button>
|
||||
</div>
|
||||
</div>
|
||||
<#form:form id="inputForm" model="${template}" class="form-horizontal2">
|
||||
<div class="box-body">
|
||||
<div class="row">
|
||||
<div class="col-xs-12">
|
||||
<div class="input-group mb10">
|
||||
<span class="input-group-addon text-right"> ${text('文件名')}:</span>
|
||||
<#form:input value="${template.filePath}/${template.fileName}"
|
||||
name="fileName" maxlength="255" class="form-control required nofocus" />
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="row">
|
||||
<div class="col-xs-12">
|
||||
<#form:textarea path="fileContent" rows="23"
|
||||
encodeHtml="true" maxlength="990000"
|
||||
class="form-control autoHeight" />
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="box-footer">
|
||||
<div class="row">
|
||||
<div class="col-sm-offset-2 col-sm-10">
|
||||
<% if (hasPermi('cms:template:edit')){ %>
|
||||
<!-- <button type="submit" class="btn btn-sm btn-primary" id="btnSubmit" onclick="saveFile()"><i class="fa fa-check"></i> ${text('保 存')}</button> -->
|
||||
<% } %>
|
||||
<button type="button" class="btn btn-sm btn-default" id="btnCancel" onclick="js.closeCurrentTabPage()"><i class="fa fa-reply-all"></i> ${text('关 闭')}</button>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</#form:form>
|
||||
</div>
|
||||
</div>
|
||||
<% } %>
|
||||
<script>
|
||||
function saveFile() {
|
||||
js.ajaxSubmit("${ctx}/cms/template/saveFileTemplate", {filePath: "${template.fileName}",fileName:$("#file_name").val(),fileSource:$("#fileSource").val()}, function(data) {
|
||||
if(data.result=='1'){
|
||||
window.self.parent.loadTree();
|
||||
}
|
||||
js.showMessage(data.message);
|
||||
});
|
||||
}
|
||||
</script>
|
||||
@@ -0,0 +1,9 @@
|
||||
<% layout('/layouts/default.html', {title: '模板帮助文档', libs: []}){ %>
|
||||
<div class="content pb0">
|
||||
<div class="row">
|
||||
<div class="col-xs-12">
|
||||
左侧点击,查看模板内容。
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<% } %>
|
||||
@@ -0,0 +1,90 @@
|
||||
<% layout('/layouts/default.html', {title: '站点模版',libs:['dataGrid','layout','zTree']}){ %>
|
||||
|
||||
<div class="ui-layout-west">
|
||||
<div class="main-content">
|
||||
<div class="box box-main">
|
||||
<div class="box-header">
|
||||
<div class="box-title">
|
||||
<i class="fa icon-grid"></i> ${text('模板目录')}
|
||||
</div>
|
||||
<div class="box-tools pull-right">
|
||||
<button type="button" class="btn btn-box-tool" id="btnExpand"
|
||||
title="${text('展开')}" style="display: none;">
|
||||
<i class="fa fa-chevron-up"></i>
|
||||
</button>
|
||||
<button type="button" class="btn btn-box-tool" id="btnCollapse"
|
||||
title="${text('折叠')}">
|
||||
<i class="fa fa-chevron-down"></i>
|
||||
</button>
|
||||
<button type="button" class="btn btn-box-tool" id="btnRefresh"
|
||||
title="${text('刷新')}">
|
||||
<i class="fa fa-refresh"></i>
|
||||
</button>
|
||||
</div>
|
||||
</div>
|
||||
<div class="ui-layout-content">
|
||||
<div id="tree" class="ztree"></div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="ui-layout-center">
|
||||
<iframe id="mainFrame" name="mainFrame" class="ui-layout-content p0"
|
||||
src="${ctx}/cms/template/help"></iframe>
|
||||
</div>
|
||||
<% } %>
|
||||
<script>
|
||||
// 初始化布局
|
||||
$('body').layout({
|
||||
west__size : 300
|
||||
});
|
||||
// 主页框架
|
||||
var win = $("#mainFrame")[0].contentWindow;
|
||||
// 树结构初始化加载
|
||||
var setting = {
|
||||
view : { selectedMulti : false },
|
||||
data : { key : { title : "title" }, simpleData : { enable : true } },
|
||||
callback : {
|
||||
onClick : function(event, treeId, treeNode) {
|
||||
tree.expandNode(treeNode);
|
||||
if (!treeNode.isDirectory) {
|
||||
window.open("${ctx}/cms/template/form?name=" + treeNode.id, "mainFrame");
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
}, tree, loadTree = function() {
|
||||
js.ajaxSubmit("${ctx}/cms/template/treeData?___t=" + new Date().getTime(), function(data) {
|
||||
tree = $.fn.zTree.init($("#tree"), setting, data);//.expandAll(true);
|
||||
// 展开第一级节点
|
||||
var nodes = tree.getNodesByParam("level", 0);
|
||||
for (var i = 0; i < nodes.length; i++) {
|
||||
tree.expandNode(nodes[i], true, false, false);
|
||||
}
|
||||
// 展开第二级节点
|
||||
nodes = tree.getNodesByParam("level", 1);
|
||||
for (var i = 0; i < nodes.length; i++) {
|
||||
tree.expandNode(nodes[i], true, false, false);
|
||||
}
|
||||
}, null, null, js.text('loading.message'));
|
||||
};
|
||||
loadTree();
|
||||
// 工具栏按钮绑定
|
||||
$('#btnExpand').click(function() {
|
||||
tree.expandAll(true);
|
||||
$(this).hide();
|
||||
$('#btnCollapse').show();
|
||||
});
|
||||
$('#btnCollapse').click(function() {
|
||||
tree.expandAll(false);
|
||||
$(this).hide();
|
||||
$('#btnExpand').show();
|
||||
});
|
||||
$('#btnRefresh').click(function() {
|
||||
loadTree();
|
||||
});
|
||||
//调用子页分页函数
|
||||
function page() {
|
||||
win.page();
|
||||
}
|
||||
</script>
|
||||
@@ -0,0 +1,366 @@
|
||||
<% layout('/layouts/default.html', {title: '访问日志表管理', libs: ['validate','fileupload']}){ %>
|
||||
<div class="main-content">
|
||||
<div class="box box-main">
|
||||
<div class="box-header with-border">
|
||||
<div class="box-title">
|
||||
<i class="fa fa-list-alt"></i> ${text(visitLog.isNewRecord ? '新增访问日志表' : '编辑访问日志表')}
|
||||
</div>
|
||||
<div class="box-tools pull-right">
|
||||
<button type="button" class="btn btn-box-tool" data-widget="collapse"><i class="fa fa-minus"></i></button>
|
||||
</div>
|
||||
</div>
|
||||
<#form:form id="inputForm" model="${visitLog}" action="${ctx}/cms/visitLog/save" method="post" class="form-horizontal">
|
||||
<div class="box-body">
|
||||
<div class="form-unit">${text('基本信息')}</div>
|
||||
<#form:hidden path="id"/>
|
||||
<div class="row">
|
||||
<div class="col-xs-6">
|
||||
<div class="form-group">
|
||||
<label class="control-label col-sm-4" title="">
|
||||
<span class="required hide">*</span> ${text('请求的URL地址')}:<i class="fa icon-question hide"></i></label>
|
||||
<div class="col-sm-8">
|
||||
<#form:input path="requestUrl" maxlength="1000" class="form-control"/>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-xs-6">
|
||||
<div class="form-group">
|
||||
<label class="control-label col-sm-4" title="">
|
||||
<span class="required hide">*</span> ${text('受访域名')}:<i class="fa icon-question hide"></i></label>
|
||||
<div class="col-sm-8">
|
||||
<#form:input path="requestUrlHost" maxlength="128" class="form-control"/>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="row">
|
||||
<div class="col-xs-6">
|
||||
<div class="form-group">
|
||||
<label class="control-label col-sm-4" title="">
|
||||
<span class="required hide">*</span> ${text('来源页面/上一个页面')}:<i class="fa icon-question hide"></i></label>
|
||||
<div class="col-sm-8">
|
||||
<#form:input path="sourceReferer" maxlength="1000" class="form-control"/>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-xs-6">
|
||||
<div class="form-group">
|
||||
<label class="control-label col-sm-4" title="">
|
||||
<span class="required hide">*</span> ${text('来源域名')}:<i class="fa icon-question hide"></i></label>
|
||||
<div class="col-sm-8">
|
||||
<#form:input path="sourceRefererHost" maxlength="128" class="form-control"/>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="row">
|
||||
<div class="col-xs-6">
|
||||
<div class="form-group">
|
||||
<label class="control-label col-sm-4" title="">
|
||||
<span class="required hide">*</span> ${text('访问来源类型')}:<i class="fa icon-question hide"></i></label>
|
||||
<div class="col-sm-8">
|
||||
<#form:input path="sourceType" maxlength="1" class="form-control"/>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-xs-6">
|
||||
<div class="form-group">
|
||||
<label class="control-label col-sm-4" title="">
|
||||
<span class="required hide">*</span> ${text('使用的搜索引擎')}:<i class="fa icon-question hide"></i></label>
|
||||
<div class="col-sm-8">
|
||||
<#form:input path="searchEngine" maxlength="200" class="form-control"/>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="row">
|
||||
<div class="col-xs-6">
|
||||
<div class="form-group">
|
||||
<label class="control-label col-sm-4" title="">
|
||||
<span class="required hide">*</span> ${text('搜索的关键词')}:<i class="fa icon-question hide"></i></label>
|
||||
<div class="col-sm-8">
|
||||
<#form:input path="searchWord" maxlength="200" class="form-control"/>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-xs-6">
|
||||
<div class="form-group">
|
||||
<label class="control-label col-sm-4" title="">
|
||||
<span class="required hide">*</span> ${text('客户IP地址')}:<i class="fa icon-question hide"></i></label>
|
||||
<div class="col-sm-8">
|
||||
<#form:input path="remoteAddr" maxlength="50" class="form-control"/>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="row">
|
||||
<div class="col-xs-6">
|
||||
<div class="form-group">
|
||||
<label class="control-label col-sm-4" title="">
|
||||
<span class="required hide">*</span> ${text('用户代理字符串')}:<i class="fa icon-question hide"></i></label>
|
||||
<div class="col-sm-8">
|
||||
<#form:input path="userAgent" maxlength="500" class="form-control"/>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-xs-6">
|
||||
<div class="form-group">
|
||||
<label class="control-label col-sm-4" title="">
|
||||
<span class="required hide">*</span> ${text('客户机语言')}:<i class="fa icon-question hide"></i></label>
|
||||
<div class="col-sm-8">
|
||||
<#form:input path="userLanguage" maxlength="32" class="form-control"/>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="row">
|
||||
<div class="col-xs-6">
|
||||
<div class="form-group">
|
||||
<label class="control-label col-sm-4" title="">
|
||||
<span class="required hide">*</span> ${text('客户机屏幕大小0x0')}:<i class="fa icon-question hide"></i></label>
|
||||
<div class="col-sm-8">
|
||||
<#form:input path="userScreenSize" maxlength="32" class="form-control"/>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-xs-6">
|
||||
<div class="form-group">
|
||||
<label class="control-label col-sm-4" title="">
|
||||
<span class="required hide">*</span> ${text('客户机设备类型')}:<i class="fa icon-question hide"></i></label>
|
||||
<div class="col-sm-8">
|
||||
<#form:input path="userDevice" maxlength="32" class="form-control"/>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="row">
|
||||
<div class="col-xs-6">
|
||||
<div class="form-group">
|
||||
<label class="control-label col-sm-4" title="">
|
||||
<span class="required hide">*</span> ${text('客户机操作系统')}:<i class="fa icon-question hide"></i></label>
|
||||
<div class="col-sm-8">
|
||||
<#form:input path="userOsName" maxlength="32" class="form-control"/>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-xs-6">
|
||||
<div class="form-group">
|
||||
<label class="control-label col-sm-4" title="">
|
||||
<span class="required hide">*</span> ${text('客户机浏览器')}:<i class="fa icon-question hide"></i></label>
|
||||
<div class="col-sm-8">
|
||||
<#form:input path="userBrowser" maxlength="32" class="form-control"/>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="row">
|
||||
<div class="col-xs-6">
|
||||
<div class="form-group">
|
||||
<label class="control-label col-sm-4" title="">
|
||||
<span class="required hide">*</span> ${text('浏览器版本')}:<i class="fa icon-question hide"></i></label>
|
||||
<div class="col-sm-8">
|
||||
<#form:input path="userBrowserVersion" maxlength="16" class="form-control"/>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-xs-6">
|
||||
<div class="form-group">
|
||||
<label class="control-label col-sm-4" title="">
|
||||
<span class="required hide">*</span> ${text('唯一访问标识')}:<i class="fa icon-question hide"></i></label>
|
||||
<div class="col-sm-8">
|
||||
<#form:input path="uniqueVisitId" maxlength="64" class="form-control"/>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="row">
|
||||
<div class="col-xs-6">
|
||||
<div class="form-group">
|
||||
<label class="control-label col-sm-4" title="">
|
||||
<span class="required hide">*</span> ${text('本次访问日期')}:<i class="fa icon-question hide"></i></label>
|
||||
<div class="col-sm-8">
|
||||
<#form:input path="visitDate" maxlength="8" class="form-control"/>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-xs-6">
|
||||
<div class="form-group">
|
||||
<label class="control-label col-sm-4" title="">
|
||||
<span class="required hide">*</span> ${text('本次访问时间')}:<i class="fa icon-question hide"></i></label>
|
||||
<div class="col-sm-8">
|
||||
<#form:input path="visitTime" class="form-control"/>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="row">
|
||||
<div class="col-xs-6">
|
||||
<div class="form-group">
|
||||
<label class="control-label col-sm-4" title="">
|
||||
<span class="required hide">*</span> ${text('是否新访问')}:<i class="fa icon-question hide"></i></label>
|
||||
<div class="col-sm-8">
|
||||
<#form:input path="isNewVisit" maxlength="1" class="form-control"/>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-xs-6">
|
||||
<div class="form-group">
|
||||
<label class="control-label col-sm-4" title="">
|
||||
<span class="required hide">*</span> ${text('首次访问时间戳')}:<i class="fa icon-question hide"></i></label>
|
||||
<div class="col-sm-8">
|
||||
<#form:input path="firstVisitTime" class="form-control digits"/>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="row">
|
||||
<div class="col-xs-6">
|
||||
<div class="form-group">
|
||||
<label class="control-label col-sm-4" title="">
|
||||
<span class="required hide">*</span> ${text('上页面停留时间')}:<i class="fa icon-question hide"></i></label>
|
||||
<div class="col-sm-8">
|
||||
<#form:input path="prevRemainTime" class="form-control digits"/>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-xs-6">
|
||||
<div class="form-group">
|
||||
<label class="control-label col-sm-4" title="">
|
||||
<span class="required hide">*</span> ${text('本次访问总停留时间')}:<i class="fa icon-question hide"></i></label>
|
||||
<div class="col-sm-8">
|
||||
<#form:input path="totalRemainTime" class="form-control digits"/>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="row">
|
||||
<div class="col-xs-6">
|
||||
<div class="form-group">
|
||||
<label class="control-label col-sm-4" title="">
|
||||
<span class="required hide">*</span> ${text('站点编码')}:<i class="fa icon-question hide"></i></label>
|
||||
<div class="col-sm-8">
|
||||
<#form:input path="siteCode" maxlength="64" class="form-control"/>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-xs-6">
|
||||
<div class="form-group">
|
||||
<label class="control-label col-sm-4" title="">
|
||||
<span class="required hide">*</span> ${text('站点名称')}:<i class="fa icon-question hide"></i></label>
|
||||
<div class="col-sm-8">
|
||||
<#form:input path="siteName" maxlength="100" class="form-control"/>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="row">
|
||||
<div class="col-xs-6">
|
||||
<div class="form-group">
|
||||
<label class="control-label col-sm-4" title="">
|
||||
<span class="required hide">*</span> ${text('栏目编码')}:<i class="fa icon-question hide"></i></label>
|
||||
<div class="col-sm-8">
|
||||
<#form:input path="categoryCode" maxlength="64" class="form-control"/>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-xs-6">
|
||||
<div class="form-group">
|
||||
<label class="control-label col-sm-4" title="">
|
||||
<span class="required hide">*</span> ${text('栏目名称')}:<i class="fa icon-question hide"></i></label>
|
||||
<div class="col-sm-8">
|
||||
<#form:input path="categoryName" maxlength="100" class="form-control"/>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="row">
|
||||
<div class="col-xs-6">
|
||||
<div class="form-group">
|
||||
<label class="control-label col-sm-4" title="">
|
||||
<span class="required hide">*</span> ${text('栏目内容编号')}:<i class="fa icon-question hide"></i></label>
|
||||
<div class="col-sm-8">
|
||||
<#form:input path="contentId" maxlength="64" class="form-control"/>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-xs-6">
|
||||
<div class="form-group">
|
||||
<label class="control-label col-sm-4" title="">
|
||||
<span class="required hide">*</span> ${text('访问页面标题')}:<i class="fa icon-question hide"></i></label>
|
||||
<div class="col-sm-8">
|
||||
<#form:input path="contentTitle" maxlength="255" class="form-control"/>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="row">
|
||||
<div class="col-xs-6">
|
||||
<div class="form-group">
|
||||
<label class="control-label col-sm-4" title="">
|
||||
<span class="required hide">*</span> ${text('访问用户编码')}:<i class="fa icon-question hide"></i></label>
|
||||
<div class="col-sm-8">
|
||||
<#form:input path="visitUserCode" maxlength="100" class="form-control"/>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-xs-6">
|
||||
<div class="form-group">
|
||||
<label class="control-label col-sm-4" title="">
|
||||
<span class="required hide">*</span> ${text('访问用户姓名')}:<i class="fa icon-question hide"></i></label>
|
||||
<div class="col-sm-8">
|
||||
<#form:input path="visitUserName" maxlength="100" class="form-control"/>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="row">
|
||||
<div class="col-xs-12">
|
||||
<div class="form-group">
|
||||
<label class="control-label col-sm-2">${text('图片上传')}:</label>
|
||||
<div class="col-sm-10">
|
||||
<#form:fileupload id="uploadImage" bizKey="${visitLog.id}" bizType="visitLog_image"
|
||||
uploadType="image" class="" readonly="false"/>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="row">
|
||||
<div class="col-xs-12">
|
||||
<div class="form-group">
|
||||
<label class="control-label col-sm-2">${text('附件上传')}:</label>
|
||||
<div class="col-sm-10">
|
||||
<#form:fileupload id="uploadFile" bizKey="${visitLog.id}" bizType="visitLog_file"
|
||||
uploadType="all" class="" readonly="false"/>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="box-footer">
|
||||
<div class="row">
|
||||
<div class="col-sm-offset-2 col-sm-10">
|
||||
<% if (hasPermi('cms:visitLog:edit')){ %>
|
||||
<button type="submit" class="btn btn-sm btn-primary" id="btnSubmit"><i class="fa fa-check"></i> ${text('保 存')}</button>
|
||||
<% } %>
|
||||
<button type="button" class="btn btn-sm btn-default" id="btnCancel" onclick="js.closeCurrentTabPage()"><i class="fa fa-reply-all"></i> ${text('关 闭')}</button>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</#form:form>
|
||||
</div>
|
||||
</div>
|
||||
<% } %>
|
||||
<script>
|
||||
$("#inputForm").validate({
|
||||
submitHandler: function(form){
|
||||
js.ajaxSubmitForm($(form), function(data){
|
||||
js.showMessage(data.message);
|
||||
if(data.result == Global.TRUE){
|
||||
js.closeCurrentTabPage(function(contentWindow){
|
||||
contentWindow.page();
|
||||
});
|
||||
}
|
||||
}, "json");
|
||||
}
|
||||
});
|
||||
</script>
|
||||
@@ -0,0 +1,112 @@
|
||||
<% layout('/layouts/default.html', {title: '访问日志表管理', libs: ['dataGrid']}){ %>
|
||||
<div class="main-content">
|
||||
<div class="box box-main">
|
||||
<div class="box-header">
|
||||
<div class="box-title">
|
||||
<i class="fa fa-list-alt"></i> ${text('访问日志表管理')}
|
||||
</div>
|
||||
<div class="box-tools pull-right">
|
||||
<a href="#" class="btn btn-default" id="btnSearch" title="${text('查询')}"><i class="fa fa-filter"></i> ${text('查询')}</a>
|
||||
<!-- <% if(hasPermi('cms:visitLog:edit')){ %>
|
||||
<a href="${ctx}/cms/visitLog/form" class="btn btn-default btnTool" title="${text('新增访问日志表')}"><i class="fa fa-plus"></i> ${text('新增')}</a>
|
||||
<% } %> -->
|
||||
</div>
|
||||
</div>
|
||||
<div class="box-body">
|
||||
<#form:form id="searchForm" model="${visitLog}" action="${ctx}/cms/visitLog/listData" method="post" class="form-inline hide"
|
||||
data-page-no="${parameter.pageNo}" data-page-size="${parameter.pageSize}" data-order-by="${parameter.orderBy}">
|
||||
<div class="form-group">
|
||||
<label class="control-label">${text('请求的URL地址')}:</label>
|
||||
<div class="control-inline">
|
||||
<#form:input path="requestUrl" maxlength="1000" class="form-control width-120"/>
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label class="control-label">${text('受访域名')}:</label>
|
||||
<div class="control-inline">
|
||||
<#form:input path="requestUrlHost" maxlength="128" class="form-control width-120"/>
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label class="control-label">${text('来源页面/上一个页面')}:</label>
|
||||
<div class="control-inline">
|
||||
<#form:input path="sourceReferer" maxlength="1000" class="form-control width-120"/>
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label class="control-label">${text('来源域名')}:</label>
|
||||
<div class="control-inline">
|
||||
<#form:input path="sourceRefererHost" maxlength="128" class="form-control width-120"/>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="form-group">
|
||||
<label class="control-label">${text('搜索的关键词')}:</label>
|
||||
<div class="control-inline">
|
||||
<#form:input path="searchWord" maxlength="200" class="form-control width-120"/>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
<div class="form-group">
|
||||
<button type="submit" class="btn btn-primary btn-sm">${text('查询')}</button>
|
||||
<button type="reset" class="btn btn-default btn-sm">${text('重置')}</button>
|
||||
</div>
|
||||
</#form:form>
|
||||
<table id="dataGrid"></table>
|
||||
<div id="dataGridPage"></div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<% } %>
|
||||
<script>
|
||||
// 初始化DataGrid对象
|
||||
$('#dataGrid').dataGrid({
|
||||
searchForm: $("#searchForm"),
|
||||
columnModel: [
|
||||
{header:'${text('请求的URL地址')}', name:'requestUrl', index:'a.request_url', width:150, align:"left", frozen:true, formatter: function(val, obj, row, act){
|
||||
return '<a href="${ctx}/cms/visitLog/form?id='+row.id+'" class="btnList" data-title="${text('编辑访问日志表')}">'+(val||row.id)+'</a>';
|
||||
}},
|
||||
{header:'${text('受访域名')}', name:'requestUrlHost', index:'a.request_url_host', width:150, align:"left"},
|
||||
{header:'${text('来源页面')}', name:'sourceReferer', index:'a.source_referer', width:150, align:"left"},
|
||||
|
||||
{header:'${text('客户IP地址')}', name:'remoteAddr', index:'a.remote_addr', width:150, align:"left"},
|
||||
|
||||
{header:'${text('客户机设备类型')}', name:'userDevice', index:'a.user_device', width:150, align:"left"},
|
||||
{header:'${text('客户机操作系统')}', name:'userOsName', index:'a.user_os_name', width:150, align:"left"},
|
||||
{header:'${text('客户机浏览器')}', name:'userBrowser', index:'a.user_browser', width:150, align:"left"},
|
||||
{header:'${text('浏览器版本')}', name:'userBrowserVersion', index:'a.user_browser_version', width:150, align:"left"},
|
||||
|
||||
{header:'${text('站点编码')}', name:'siteCode', index:'a.site_code', width:150, align:"left"},
|
||||
{header:'${text('站点名称')}', name:'siteName', index:'a.site_name', width:150, align:"left"},
|
||||
{header:'${text('栏目编码')}', name:'categoryCode', index:'a.category_code', width:150, align:"left"},
|
||||
{header:'${text('栏目名称')}', name:'categoryName', index:'a.category_name', width:150, align:"left"},
|
||||
{header:'${text('栏目内容编号')}', name:'contentId', index:'a.content_id', width:150, align:"left"},
|
||||
{header:'${text('访问页面标题')}', name:'contentTitle', index:'a.content_title', width:150, align:"left"},
|
||||
{header:'${text('访问用户编码')}', name:'visitUserCode', index:'a.visit_user_code', width:150, align:"left"},
|
||||
|
||||
{header:'${text('操作')}', name:'actions', width:120, sortable:false, title:false, formatter: function(val, obj, row, act){
|
||||
var actions = [];
|
||||
<% if(hasPermi('cms:visitLog:edit')){ %>
|
||||
actions.push('<a href="${ctx}/cms/visitLog/form?id='+row.id+'" class="btnList" title="${text('编辑访问日志表')}"><i class="fa fa-pencil"></i></a> ');
|
||||
if (row.status == Global.STATUS_NORMAL){
|
||||
actions.push('<a href="${ctx}/cms/visitLog/disable?id='+row.id+'" class="btnList" title="${text('停用访问日志表')}" data-confirm="${text('确认要停用该访问日志表吗?')}"><i class="glyphicon glyphicon-ban-circle"></i></a> ');
|
||||
}
|
||||
if (row.status == Global.STATUS_DISABLE){
|
||||
actions.push('<a href="${ctx}/cms/visitLog/enable?id='+row.id+'" class="btnList" title="${text('启用访问日志表')}" data-confirm="${text('确认要启用该访问日志表吗?')}"><i class="glyphicon glyphicon-ok-circle"></i></a> ');
|
||||
}
|
||||
actions.push('<a href="${ctx}/cms/visitLog/delete?id='+row.id+'" class="btnList" title="${text('删除访问日志表')}" data-confirm="${text('确认要删除该访问日志表吗?')}"><i class="fa fa-trash-o"></i></a> ');
|
||||
<% } %>
|
||||
return actions.join('');
|
||||
}}
|
||||
],
|
||||
// 加载成功后执行事件
|
||||
ajaxSuccess: function(data){
|
||||
|
||||
}
|
||||
});
|
||||
</script>
|
||||
@@ -0,0 +1,7 @@
|
||||
<% layout('layouts/default.html', {title: '留言', libs: []}){ %>
|
||||
|
||||
|
||||
留言
|
||||
|
||||
|
||||
<% } %>
|
||||
@@ -0,0 +1,15 @@
|
||||
<div class="row"><br/>
|
||||
<ul class="breadcrumb">
|
||||
<li><span style="color:#999;">当前位置:</span><a href="${ctx}/index-${site.siteCode}">首页</a></li>
|
||||
<%
|
||||
var pcs = @StringUtils.split(category.parentCodes, ',');
|
||||
var tns = @StringUtils.split(category.treeNames, '/');
|
||||
for(var i = 0; i < pcs.~size - 1; i++){
|
||||
%>
|
||||
<li><a href="${ctx}/list-${pcs[i+1]}">${tns[i]}</a></li>
|
||||
<%
|
||||
}
|
||||
%>
|
||||
<li><a href="${ctx}/list-${category.categoryCode}">${category.categoryName}</a></li>
|
||||
</ul>
|
||||
</div>
|
||||
@@ -0,0 +1,16 @@
|
||||
<footer>
|
||||
<div class="row">
|
||||
<div class="col-lg-12">
|
||||
<ul class="list-unstyled">
|
||||
<li class="pull-right"><a href="#top">回到顶部</a></li>
|
||||
<li><a href="${ctx}/search" target="_blank">全站搜索</a></li>
|
||||
<li><a href="${ctx}/map-${site.id}" target="_blank">站点地图</a></li>
|
||||
<li><a href="http://s.jeesite.com" target="_blank">技术支持</a></li>
|
||||
<li><a href="${ctxPath}" target="_blank">后台管理</a></li>
|
||||
</ul>
|
||||
<p>${site.copyright}</p>
|
||||
</div>
|
||||
</div>
|
||||
</footer>
|
||||
<script src="${ctxStatic}/modules/cmsfront/themes/js/bootstrap.min.js?${_version}"></script>
|
||||
<script src="${ctxStatic}/modules/cmsfront/themes/js/custom.js?${_version}"></script>
|
||||
@@ -0,0 +1,14 @@
|
||||
<%/* Copyright (c) 2013-Now http://jeesite.com All rights reserved. */%>
|
||||
<meta charset="utf-8">
|
||||
<meta content="webkit" name="renderer"/>
|
||||
<meta http-equiv="X-UA-Compatible" content="IE=edge">
|
||||
<meta name="keywords" content="Powered By JeeSiteV4.0"/>
|
||||
<meta http-equiv="Cache-Control" content="no-cache, no-store, must-revalidate"/>
|
||||
<meta name="description" content="Powered By JeeSiteV4.0"/>
|
||||
<meta content="no-cache" http-equiv="Pragma"/>
|
||||
<meta http-equiv="Expires" content="0"/>
|
||||
<meta content="width=device-width, initial-scale=1, user-scalable=1" name="viewport"/>
|
||||
<title>${(isNotBlank(title!) ? title! + ' - ' : '') + @Global.getConfig('productName')}</title>
|
||||
<script src="${ctxPath}/global.min.js?ctx=${ctx}"></script>
|
||||
<script src="${ctxStatic}/jquery/jquery-1.12.4.min.js"></script>
|
||||
<script src="${ctxStatic}/jquery/jquery-migrate-1.4.1.min.js"></script>
|
||||
@@ -0,0 +1,49 @@
|
||||
<link rel="stylesheet" href="${ctxStatic}/modules/cmsfront/themes/default/bootstrap.min.css?${_version}" media="screen">
|
||||
<link rel="stylesheet" href="${ctxStatic}/modules/cmsfront/themes/css/custom.css?${_version}">
|
||||
<link rel="stylesheet" href="${ctxStatic}/fonts/font-icons.min.css?${_version}">
|
||||
<div class="navbar navbar-inverse navbar-fixed-top">
|
||||
<div class="container">
|
||||
<div class="navbar-header">
|
||||
<a href="${ctx}/index-${site.siteCode}" class="navbar-brand">${site.title}</a>
|
||||
<button class="navbar-toggle" type="button" data-toggle="collapse" data-target="#navbar-main">
|
||||
<span class="icon-bar"></span>
|
||||
<span class="icon-bar"></span>
|
||||
<span class="icon-bar"></span>
|
||||
</button>
|
||||
</div>
|
||||
<div class="navbar-collapse collapse" id="navbar-main">
|
||||
<ul class="nav navbar-nav mr-auto">
|
||||
<#html:foreach items="${categoryList(site.siteCode, '0', 4, '')}" var="c">
|
||||
<li class="${c.categoryCode == category.categoryCode! ? 'active' : ''}"><a
|
||||
href="${ctx}/list-${c.categoryCode}">${c.categoryName}</a></li>
|
||||
</#html:foreach>
|
||||
<li><a href="http://jeesite.com" target="_blank">官方网站</a></li>
|
||||
<li><a href="http://s.jeesite.com" target="_blank">技术服务</a></li>
|
||||
<li id="siteSwitch" class="dropdown">
|
||||
<a class="dropdown-toggle" data-toggle="dropdown" href="#" title="站点">子站切换 <span class="caret"></span></a>
|
||||
<ul class="dropdown-menu">
|
||||
<#html:foreach items="${siteList()}" var="site,status">
|
||||
<li><a href="#" onclick="location='${ctx}/index-${site.id}'">${site.title}</a></li>
|
||||
</#html:foreach>
|
||||
</ul>
|
||||
</li>
|
||||
<!-- <li id="themeSwitch" class="dropdown">
|
||||
<a class="dropdown-toggle" data-toggle="dropdown" href="#" title="主题切换"><i class="glyphicon glyphicon-th-large"></i></a>
|
||||
<ul class="dropdown-menu">
|
||||
<li><a href="#" onclick="location='?url='+location.href">字典</a></li>
|
||||
</ul>
|
||||
</li> -->
|
||||
</ul>
|
||||
<ul class="nav navbar-nav navbar-right">
|
||||
<form class="navbar-form navbar-left nav-search" action="${ctx}/search">
|
||||
<div class="form-group">
|
||||
<input type="text" name="q" class="form-control" placeholder="全站搜索...">
|
||||
</div>
|
||||
<button type="submit" class="btn btn-primary hide">搜索</button>
|
||||
</form>
|
||||
</ul>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
@@ -0,0 +1,35 @@
|
||||
<% layout('layouts/default.html', {title:site.siteName+'-首页', libs: []}){ %>
|
||||
<div class="row">
|
||||
<div class="col-lg-12">
|
||||
<div class="jumbotron">
|
||||
<h1>JeeSite平台简介</h1>
|
||||
<p>${site.description}</p>
|
||||
<p><a class="btn btn-primary btn-sm" href="http://www.jeesite.com" target="_blank">更多...</a></p>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="row">
|
||||
<#html:foreach items="${categoryList(site.siteCode, '0', 3, '')}" var="category,status">
|
||||
<#html:if test="${category.moduleType == 'article'}">
|
||||
<div class="col-lg-4">
|
||||
<div class="bs-component">
|
||||
<div class="panel panel-default">
|
||||
<div class="panel-heading">
|
||||
<h3 class="panel-title"><small><a href="${ctx}/list-${category.categoryCode}" class="pull-right more">更多>></a></small>${category.categoryName}</h3>
|
||||
</div>
|
||||
<div class="panel-body">
|
||||
<ul class="article-list">
|
||||
<#html:foreach items="${articleList(site.siteCode, category.categoryCode, 5)}" var="article,status">
|
||||
<li>${status.index}. <span class="pull-right">${article.updateDate,'yyyy-MM-dd'}</span>
|
||||
<a href="${article.url}" style="color:${article.color}">${abbr(article.title,28)}</a> </li>
|
||||
</#html:foreach>
|
||||
</ul>
|
||||
</div>
|
||||
<div class="panel-footer"></div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</#html:if>
|
||||
</#html:foreach>
|
||||
</div>
|
||||
<% } %>
|
||||
@@ -0,0 +1,15 @@
|
||||
<%/* Copyright (c) 2013-Now http://jeesite.com All rights reserved. */
|
||||
/*
|
||||
* 默认布局文件
|
||||
* @param title 页面标题
|
||||
* @param bodyClass body标签的class内容
|
||||
*/
|
||||
%>
|
||||
<!DOCTYPE html><html><head>
|
||||
<% include('../include/head.html', {title: text(title!)}){} %>
|
||||
</head><body class="${bodyClass!}">
|
||||
<div class="container">
|
||||
<% include('../include/header.html'){} %>
|
||||
${layoutContent}
|
||||
<% include('../include/footer.html'){} %>
|
||||
</div>
|
||||
@@ -0,0 +1,31 @@
|
||||
<% layout('layouts/default.html', {title: '列表页面', libs: []}){ %>
|
||||
<% include('include/banner.html'){} %>
|
||||
<div class="row">
|
||||
<div class="col-xs-2">
|
||||
<h4>栏目列表</h4>
|
||||
<ul class="article-list">
|
||||
<#html:foreach items="${qmark(categoryList! != null, categoryList!, categoryList(site.siteCode, category.parentCode, 50, ''))}" var="category,status">
|
||||
<li><a href="${category.url}" target="${category.target}" >${category.categoryName}</a></li>
|
||||
</#html:foreach>
|
||||
</ul>
|
||||
</div>
|
||||
<div class="col-xs-10">
|
||||
<h4>${category.categoryName}</h4>
|
||||
<#html:if test="${page! != null && category.moduleType == 'article'}">
|
||||
<ul class="article-list">
|
||||
<#html:foreach items="${page.list}" var="article,status">
|
||||
<li><span class="pull-right">${article.updateDate,'yyyy-MM-dd'}</span>
|
||||
<a href="${article.url}" style="color:${article.color}">${abbr(article.title,96)}</a></li>
|
||||
</#html:foreach>
|
||||
</ul>
|
||||
<div class="pagination">${@page.toHtml()}</div>
|
||||
<script type="text/javascript">
|
||||
function page(n,s){
|
||||
location="${ctx}/list-${category.categoryCode}?pageNo="+n+"&pageSize="+s;
|
||||
}
|
||||
</script>
|
||||
</#html:if>
|
||||
</div>
|
||||
</div>
|
||||
<% } %>
|
||||
|
||||
@@ -0,0 +1,41 @@
|
||||
<% layout('layouts/default.html', {title: '列表页面', libs: []}){ %>
|
||||
<% include('include/banner.html'){} %>
|
||||
<div class="row">
|
||||
<div class="col-xs-2">
|
||||
<h4>栏目列表</h4>
|
||||
<ul class="article-list">
|
||||
<#html:foreach items="${qmark(categoryList! != null, categoryList!, categoryList(site.siteCode, category.parentCode, 50, ''))}" var="category,status">
|
||||
<li><a href="${category.url}" target="${category.target}" >${category.categoryName}</a></li>
|
||||
</#html:foreach>
|
||||
</ul>
|
||||
</div>
|
||||
<div class="col-xs-10">
|
||||
<h4>${category.categoryName}</h4>
|
||||
<div class="row"><br/>
|
||||
<#html:foreach items="${qmark(categoryList! != null, categoryList!, [])}" var="category,status">
|
||||
<#html:if test="${category.moduleType == 'article'}">
|
||||
<div class="col-lg-6">
|
||||
<div class="bs-component">
|
||||
<div class="panel panel-default">
|
||||
<div class="panel-heading">
|
||||
<h3 class="panel-title"><small><a href="${ctx}/list-${category.categoryCode}" class="pull-right more">更多>></a></small>${category.categoryName}</h3>
|
||||
</div>
|
||||
<div class="panel-body">
|
||||
<ul class="article-list">
|
||||
<#html:foreach items="${articleList(site.siteCode, category.categoryCode, 5)}" var="article,status">
|
||||
<li>${status.index}. <span class="pull-right">${article.updateDate,'yyyy-MM-dd'}</span>
|
||||
<a href="${article.url}" style="color:${article.color}">${abbr(article.title,28)}</a> </li>
|
||||
</#html:foreach>
|
||||
</ul>
|
||||
</div>
|
||||
<div class="panel-footer"></div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</#html:if>
|
||||
</#html:foreach>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<% } %>
|
||||
|
||||
@@ -0,0 +1,32 @@
|
||||
<% layout('layouts/default.html', {title: '站点地图', libs: []}){ %>
|
||||
<style type="text/css">
|
||||
h2 {padding-left:10px;}
|
||||
h3.title {padding:5px 5px;margin:15px 8px 10px;}
|
||||
dl.map{border:1px solid #ddd;border-top:0;margin:10px 8px 8px;}
|
||||
dl.map dt{border-top:1px solid #ddd;padding:10px 15px;} dl.map dd{margin:20px 30px 30px;}
|
||||
dl.map span{border:1px solid #ddd;padding:8px 15px;margin-right:10px;border-radius:5px;}
|
||||
dl.map span:hover{border:1px solid #bbb;background:#f1f1f1;}
|
||||
dl.map span a:hover{text-decoration:none;color:#333;}
|
||||
</style>
|
||||
<div class="row">
|
||||
<h2>站点地图</h2>
|
||||
<#html:foreach items="${siteList()}" var="site">
|
||||
<h3 class="title breadcrumb">${site.siteName}</h3>
|
||||
<dl class="map">
|
||||
<#html:foreach items="${categoryList(site.siteCode, '0', -1, '')}" var="category">
|
||||
<dt>
|
||||
<a href="${category.url}" target="_blank">${category.categoryName}</a>
|
||||
</dt>
|
||||
<#html:set value="${categoryList(site.siteCode, category.categoryCode, -1, '')}" export="categoryList" />
|
||||
<#html:if test="${isNotEmpty(categoryList)}">
|
||||
<dd>
|
||||
<#html:foreach items="${categoryList}" var="category">
|
||||
<span><a href="${category.url}" target="_blank">${category.categoryName}</a></span>
|
||||
</#html:foreach>
|
||||
</dd>
|
||||
</#html:if>
|
||||
</#html:foreach>
|
||||
</dl>
|
||||
</#html:foreach>
|
||||
</div>
|
||||
<% } %>
|
||||
@@ -0,0 +1,98 @@
|
||||
<% layout('layouts/default.html', {title: '全站搜索', libs: []}){ %>
|
||||
<script src="${ctxStatic}/laydate/5.0/laydate.js?${_version}"></script>
|
||||
<style type="text/css">
|
||||
form.search {margin:12px 20px 5px;}
|
||||
form.search input.txt {padding:4px 8px;font-size:16px;width:300px;margin:5px;border:1px solid #bbb;border-radius:3px;}
|
||||
form.search input.txt.date {width:133px;}
|
||||
form.search .sel {margin:15px 0;padding:10px 5px;border-bottom:1px solid #efefef;font-size:16px;}
|
||||
form.search .act {font-weight:bold;}
|
||||
form.search .btn {padding:4px 18px;font-size:16px;margin-top:-3px;margin-right:5px;border:1px solid #bbb;border-radius:3px;}
|
||||
form.search .btn:hover {color:#333;background:#d1d1d1}
|
||||
dl.search {line-height:25px;border-bottom:1px solid #efefef;margin:10px 20px 15px 20px;}
|
||||
dl.search dt {border-top:1px solid #efefef;padding:13px 5px 5px;font-size:16px;}
|
||||
dl.search dt a {color:#0000cc;text-decoration:underline;}
|
||||
dl.search dd {margin:0 5px 13px;font-size:13px;color:#333;word-break:break-all;word-wrap:break-word;}
|
||||
dl.search dd .info, dl.search dd .info a {margin-top:3px;font-size:12px;color:#008000;}
|
||||
dl.search .highlight {color:#DF0037;}
|
||||
.pagination{margin:0 0 10px 10px;}
|
||||
</style>
|
||||
<script type="text/javascript">
|
||||
var message = "${message!}";
|
||||
if (message != ''){
|
||||
alert(message);
|
||||
}
|
||||
function page(n,s){
|
||||
$("#pageNo").val(n);
|
||||
$("#pageSize").val(s);
|
||||
$("#searchForm").submit();
|
||||
return false;
|
||||
}
|
||||
function sel(th, val){
|
||||
$('#t').val(val);
|
||||
$('.sel a').removeClass('act');
|
||||
$(th).addClass('act');
|
||||
}
|
||||
$(function(){
|
||||
laydate.render({elem:'#bd', type:'date', format:'yyyy-MM-dd'});
|
||||
laydate.render({elem:'#ed', type:'date', format:'yyyy-MM-dd'});
|
||||
});
|
||||
</script>
|
||||
<div class="row">
|
||||
<form id="searchForm" method="get" class="search">
|
||||
<input type="hidden" id="pageNo" name="pageNo" value="${page.pageNo!}"/>
|
||||
<input type="hidden" id="t" name="t" value="${isNotBlank(t)?t:'article'}"/>
|
||||
<input type="hidden" id="a" name="a" value="${isNotBlank(t)?t:'0'}"/>
|
||||
<div class="sel">
|
||||
<a href="javascript:" onclick="sel(this, 'article')" class="${isBlank(t) || t == 'article'?'act':''}">文章搜索</a>
|
||||
<!-- <a href="javascript:" onclick="sel(this, 'link')" class="${t == 'link'?'act':''}">链接搜索</a> -->
|
||||
</div>
|
||||
<% if (parameter.a == '1'){ %>
|
||||
<table>
|
||||
<tr><td>包含以下<strong>任意一个</strong>关键词</td><td><input type="text" name="q" value="${q}" class="txt"/>
|
||||
<input type="submit" value="搜 索" class="btn" onclick="$('#a').val('1')"/>
|
||||
<input type="submit" value="简单搜索" class="btn" onclick="$('#a').val('0')"/></td></tr>
|
||||
<tr><td>包含以下<strong>全部</strong>的关键词</td><td><input type="text" name="qand" value="${qand}" class="txt"/></td></tr>
|
||||
<tr><td><strong>不包含</strong>以下关键词</td><td><input type="text" name="qnot" value="${qnot}" class="txt"/></td></tr>
|
||||
<tr><td>最后更新日期范围</td><td>
|
||||
<input id="bd" name="bd" type="text" readonly="readonly" maxlength="20" class="txt date" value="${parameter.bd}"/> ~
|
||||
<input id="ed" name="ed" type="text" readonly="readonly" maxlength="20" class="txt date" value="${parameter.ed}"/>
|
||||
</td></tr>
|
||||
</table>
|
||||
<% }else{ %>
|
||||
<input type="hidden" id="pageSize" name="pageSize" value="${page.pageSize!}"/>
|
||||
<input type="text" name="q" value="${q}" class="txt"/>
|
||||
<input type="submit" value="搜 索" class="btn" onclick="$('#a').val('0')"/>
|
||||
<input type="submit" value="高级搜索" class="btn" onclick="$('#a').val('1')"/>
|
||||
<% } %>
|
||||
</form>
|
||||
<dl class="search">
|
||||
<#html:if test="${page! != null && (isBlank(t) || t == 'article')}">
|
||||
<#html:foreach items="${page.list}" var="article">
|
||||
<dt><a href="${article.url}" target="_blank">${article.title}</a></dt>
|
||||
<dd>${article.content}
|
||||
<div class="info">
|
||||
发布者:${article.createBy} 点击数:${article.hits}
|
||||
发布时间:${article.createDateStr} 更新时间:${article.updateDateStr}
|
||||
<a href="${article.url}" target="_blank">查看全文</a><br/>
|
||||
</div>
|
||||
</dd>
|
||||
</#html:foreach>
|
||||
</#html:if>
|
||||
<#html:if test="${page! != null && t == 'link'}">
|
||||
<#html:forEach items="${page.list}" var="link">
|
||||
<dt><a href="${link.url}" target="_blank">${link.title}</a></dt>
|
||||
<dd><div class="info">
|
||||
发布者:${link.createBy} 发布时间:${link.createDateStr} 更新时间:${link.updateDateStr}
|
||||
<a href="${link.url}" target="_blank">打开链接</a><br/>
|
||||
</div>
|
||||
</dd>
|
||||
</#html:forEach>
|
||||
</#html:if>
|
||||
<#html:if test="${page! == null || page.list.~size == 0}">
|
||||
<dt><#html:if test="${isBlank(q)}">请键入要查找的关键字。</#html:if><#html:if test="${isNotBlank(q)}">抱歉,没有找到与“${q}”相关内容。</#html:if><br/><br/>建议:</dt>
|
||||
<dd><ul><li>检查输入是否正确;</li><li>简化输入词;</li><li>尝试其他相关词,如同义、近义词等。</li></ul></dd>
|
||||
</#html:if>
|
||||
</dl>
|
||||
<div class="pagination">${page! == null ? '' : @page.toHtml()}</div>
|
||||
</div>
|
||||
<% } %>
|
||||
@@ -0,0 +1,9 @@
|
||||
<% layout('layouts/default.html', {title:'文章查看',libs: []}){ %>
|
||||
<% include('include/banner.html'){} %>
|
||||
<div class="row article-view">
|
||||
<h3 class="article-title">${article.title}</h3>
|
||||
<blockquote class="article-desc">摘要:${article.description}</blockquote>
|
||||
<div class="article-content uparse">${article.articleData.content}</div>
|
||||
<div class="article-info">发布者:${article.createBy} 点击数:${article.hits} 发布时间:${article.createDate,"yyyy-MM-dd HH:mm"} 更新时间:${article.updateDate,"yyyy-MM-dd HH:mm"}</div>
|
||||
</div>
|
||||
<% } %>
|
||||
Reference in New Issue
Block a user