first commit
This commit is contained in:
@@ -0,0 +1,44 @@
|
||||
|
||||
|
||||
<#-- 导航 -->
|
||||
<div data-role="z-tabnav" class="z-tabnav-main z-mg-b20 ${zmr_color_class}">
|
||||
<nav>
|
||||
<ul>
|
||||
<li onclick="Z.L.href('category.htm');">知识库分类</li>
|
||||
<li class="z-active">知识库内容</li>
|
||||
</ul>
|
||||
<div class="z-float-left z-mg10">
|
||||
<form name="theForm" method="post">
|
||||
<input name="articleKey" class="z-float-left z-input z-w300 zi-bd-r-none" value="${articleKey}" maxlength="64" placeholder="文章标题">
|
||||
<button class="z-float-left z-button z-w80 zi-bd-rd0 ${zmr_color_class}"><i class="z-font z-query"></i>查询</button>
|
||||
</form>
|
||||
</div>
|
||||
<div class="z-text-right z-mg-t10 z-mg-r5">
|
||||
<button class="z-button ${zmr_color_class}" onclick="Z.L.href('articleAdd.htm');"><i class="z-font z-add"></i>增加文章</button>
|
||||
<button class="z-button ${zmr_color_class}" onclick="Z.L.check('articleModify.htm', 'articleId');"><i class="z-font z-modify"></i>修改文章</button>
|
||||
<button class="z-button z-red" onclick="Z.L.confirm('articleDelete.htm', '确认要删除该文章?', 'articleId');"><i class="z-font z-delete"></i>删除文章</button>
|
||||
</div>
|
||||
</nav>
|
||||
</div>
|
||||
|
||||
<#-- 列表 -->
|
||||
<table class="z-table z-bordered z-h40-tr z-pd6 z-bg-white z-text-center">
|
||||
<tr bgcolor="${zmr_thead_bgcolor}">
|
||||
<td width="50">选择</td>
|
||||
<td width="10%">文章状态</td>
|
||||
<td width="10%">文章所属分类</td>
|
||||
<td width="*">文章标题</td>
|
||||
<td width="15%">发表时间</td>
|
||||
</tr>
|
||||
${zhiqim_manager_tr_no_record(articlePage, 5, "暂时没有文章信息")}
|
||||
<#for item : articlePage.list()>
|
||||
<tr class="z-h40 z-pointer" ${zhiqim_manager_tr_onmouse()} ${zhiqim_manager_tr_click_radio()}>
|
||||
<td><input name="articleId" type="radio" data-role="z-radio" data-class="${zmr_color_class}" value="${item.getArticleId()}"></td>
|
||||
<td><#if item.getArticleStatus()==0>正常<#else><span class="z-color-red">停用</span></#if></td>
|
||||
<td>${item.getCategoryName()}</td>
|
||||
<td>${item.getArticleTitle()}</td>
|
||||
<td>${Sqls.toDateTimeString(item.getArticleTime())}</td>
|
||||
</tr>
|
||||
</#for>
|
||||
</table>
|
||||
${zhiqim_manager_paging(articlePage, "article.htm")}
|
||||
@@ -0,0 +1,65 @@
|
||||
<#def designatedPath="/category.htm"/>
|
||||
${request.getValidateScript()}
|
||||
${zhiqim_manager_history ("article.htm")}
|
||||
|
||||
${zhiqim_manager_breadcrumb_parent ("article.htm", "知识库内容", "增加文章")}
|
||||
${zhiqim_manager_content()}
|
||||
<form name="theForm" action="articleInsert.htm" method="post" onsubmit="return validateForm(this);" data-role="z-call-frame">
|
||||
<table class="z-table z-bordered z-h50-tr z-pd10 z-bg-white">
|
||||
<tr class="zi-h40 z-bg-gray z-bold">
|
||||
<td colspan="2">增加文章</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td width="40%">所属分类:<span class="z-color-999">(请选择)</span></td>
|
||||
<td width="*">
|
||||
<select name="categoryId" class="z-select z-w300 ${zmr_color_class}" data-role="z-select" data-class="${zmr_color_class}">
|
||||
<#for item : categoryList>
|
||||
<option value="${item.getCategoryId()}">${item.getCategoryName()}</option>
|
||||
</#for>
|
||||
</select><span class="z-color-red"> *</span>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>分类状态:<span class="z-color-999">(请选择)</span></td>
|
||||
<td>
|
||||
<select name="articleStatus" class="z-select z-w300 ${zmr_color_class}" data-role="z-select" data-class="${zmr_color_class}">
|
||||
<option value="0">正常</option>
|
||||
<option value="1">停用</option>
|
||||
</select><span class="z-color-red"> *</span>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>文章标题:<span class="z-color-999">(32位不定长字符)</span></td>
|
||||
<td><input name="articleTitle" class="z-input z-w300 ${zmr_color_class}" maxlength="32"><span class="z-color-red"> *</span></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td colspan="2">
|
||||
<div class="z-mg-t20">文章内容:<span class="z-color-999">(不能超过25000个字符)</span><span class="z-color-red"> *</span></div>
|
||||
<div class="z-pd-t20 z-pd-b20" style="margin-top:20px">
|
||||
<textarea id="articleContent" name="articleContent" class="z-textarea ckeditor z-w100p ${zmr_color_class}" rows="15" size="30" maxlength="25000"></textarea>
|
||||
</div>
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
${zhiqim_manager_submit()}
|
||||
</form>
|
||||
${zhiqim_manager_content_end()}
|
||||
<!--
|
||||
<script charset="utz-8" src="/inc/ckeditor/ckeditor.js"></script>
|
||||
-->
|
||||
<link rel="stylesheet" type="text/css" href="/zres/zteditor/zteditor.css">
|
||||
<script type="text/javascript" src="/zres/zteditor/zteditor.js"></script>
|
||||
<script>
|
||||
//CKEDITOR.replace("articleContent");
|
||||
Z.onload(function()
|
||||
{
|
||||
var editor = new Z.ZhiqimEditor();
|
||||
editor.setId("articleContent");
|
||||
editor.execute();
|
||||
});
|
||||
function validateForm2(form)
|
||||
{
|
||||
Z("#articleContent").val(CKEDITOR.instances.articleContent.getData());
|
||||
return validateForm(form);
|
||||
}
|
||||
</script>
|
||||
@@ -0,0 +1,61 @@
|
||||
<#def designatedPath="/category.htm"/>
|
||||
${request.getValidateScript()}
|
||||
${zhiqim_manager_history ("article.htm")}
|
||||
|
||||
${zhiqim_manager_breadcrumb_parent ("article.htm", "知识库内容", "修改文章")}
|
||||
${zhiqim_manager_content()}
|
||||
<form name="theForm" action="articleUpdate.htm" method="post" onsubmit="return validateForm(this);" data-role="z-call-frame">
|
||||
<input name="articleId" type="hidden" value="${article.articleId}">
|
||||
<table class="z-table z-bordered z-h50-tr z-pd10 z-bg-white">
|
||||
<tr class="zi-h40 z-bg-gray z-bold">
|
||||
<td colspan="2">修改文章</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td width="40%">所属分类:<span class="z-color-999">(请选择)</span></td>
|
||||
<td width="*">
|
||||
<select name="categoryId" class="z-select z-w300 ${zmr_color_class}" data-role="z-select" data-class="${zmr_color_class}">
|
||||
<#for item : categoryList>
|
||||
<option value="${item.getCategoryId()}" <#if item.getCategoryId() == article.getCategoryId()>selected</#if>>${item.getCategoryName()}</option>
|
||||
</#for>
|
||||
</select><span class="z-color-red"> *</span>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>分类状态:<span class="z-color-999">(请选择)</span></td>
|
||||
<td>
|
||||
<select name="articleStatus" class="z-select z-w300 ${zmr_color_class}" data-role="z-select" data-class="${zmr_color_class}">
|
||||
<option <#if article.getArticleStatus() == 0>selected</#if> value="0">正常</option>
|
||||
<option <#if article.getArticleStatus() == 1>selected</#if> value="1">停用</option>
|
||||
</select><span class="z-color-red"> *</span>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>文章标题:<span class="z-color-999">(32位不定长字符)</span></td>
|
||||
<td><input name="articleTitle" class="z-input z-w300 ${zmr_color_class}" value="${article.getArticleTitle()}" maxlength="32"><span class="z-color-red"> *</span></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td colspan="2">
|
||||
<div class="z-mg-t20">文章内容:<span class="z-color-999">(不能超过25000个字符)</span><span class="z-color-red"> *</span></div>
|
||||
<div class="z-pd-t20 z-pd-t20">
|
||||
<textarea id="articleContent" name="articleContent" class="z-textarea z-w100p ${zmr_color_class}" rows="15" size="30" maxlength="25000">${article.getArticleContent()}</textarea>
|
||||
</div>
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
${zhiqim_manager_submit()}
|
||||
</form>
|
||||
${zhiqim_manager_content_end()}
|
||||
<!--
|
||||
<script charset="utz-8" src="/inc/ckeditor/ckeditor.js"></script>
|
||||
-->
|
||||
<link rel="stylesheet" type="text/css" href="/zres/zteditor/zteditor.css">
|
||||
<script type="text/javascript" src="/zres/zteditor/zteditor.js"></script>
|
||||
<script>
|
||||
//CKEDITOR.replace("articleContent");
|
||||
Z.onload(function()
|
||||
{
|
||||
var editor = new Z.ZhiqimEditor();
|
||||
editor.setId("articleContent");
|
||||
editor.execute();
|
||||
});
|
||||
</script>
|
||||
@@ -0,0 +1,78 @@
|
||||
${zhiqim_manager_content()}
|
||||
<#-- 显示子分类,并递归显示下级子分类 -->
|
||||
<#function showChildCategory(self, parent)>
|
||||
<tr class="z-h30" ${zhiqim_manager_tr_onmouse()} ${zhiqim_manager_tr_click_radio()}>
|
||||
<td><input name="categoryId" type="radio" data-role="z-radio" data-class="${zmr_color_class}" value="${self.self().getCategoryId()}"></td>
|
||||
<td>${self.self().getCategoryId()}</td>
|
||||
<td align="left" class="zi-pd-l6">
|
||||
<#var level = self.self().getCategoryLevel()/>
|
||||
<#if level == 0>
|
||||
<i class="z-ico z-tree z-30 z-normal z-root z-mg-r3"></i>
|
||||
<#else>
|
||||
<#for i : 1..(level-1)>
|
||||
<#if self.isLastNode(level-i)>
|
||||
<i class="z-ico z-tree z-30 z-normal z-blank"></i>
|
||||
<#else>
|
||||
<i class="z-ico z-tree z-30 z-normal z-vertline"></i>
|
||||
</#if>
|
||||
</#for>
|
||||
<#if self.isLastNode()>
|
||||
<i class="z-ico z-tree z-30 z-normal z-lastnode"></i>
|
||||
<#else>
|
||||
<i class="z-ico z-tree z-30 z-normal z-node"></i>
|
||||
</#if>
|
||||
<i class="z-ico z-tree z-item z-mg-r3"></i>
|
||||
</#if>
|
||||
#{self.self().getCategoryName()}
|
||||
</td>
|
||||
<td><#if self.self().getCategoryStatus() == 0>正常<#else><span class="z-color-red">停用</span></#if></td>
|
||||
<td>${self.self().getCategoryLevel()}</td>
|
||||
</tr>
|
||||
<#for child : self.children()>
|
||||
${showChildCategory(child, self)}
|
||||
</#for>
|
||||
</#function>
|
||||
|
||||
${zhiqim_manager_breadcrumb ("知识库分类")}
|
||||
|
||||
<#-- 导航 -->
|
||||
<div data-role="z-tabnav" class="z-tabnav-main z-mg-b20 ${zmr_color_class}">
|
||||
<nav>
|
||||
<ul>
|
||||
<li class="z-active">知识库分类</li>
|
||||
<li onclick="Z.L.href('article.htm');">知识库内容</li>
|
||||
</ul>
|
||||
<div class="z-text-right z-mg-t10 z-mg-r5">
|
||||
<button class="z-button ${zmr_color_class}" onclick="Z.L.check('/categoryAdd.htm', 'categoryId');"><i class="z-font z-add"></i>增加下级分类</button>
|
||||
<button class="z-button ${zmr_color_class}" onclick="Z.L.check('/categoryModify.htm', 'categoryId');"><i class="z-font z-modify"></i>修改分类</button>
|
||||
<button class="z-button z-red" onclick="Z.L.confirm('/categoryDelete.htm', '确认要删除该分类及分类下文章?', 'categoryId', zCallFrame);"><i class="z-font z-delete"></i>删除分类</button>
|
||||
</div>
|
||||
</nav>
|
||||
</div>
|
||||
|
||||
<#-- 列表 -->
|
||||
<table class="z-table z-bordered z-h40-tr z-pd6 z-bg-white z-text-center" >
|
||||
<tr bgcolor="${zmr_thead_bgcolor}">
|
||||
<td width="50">选择</td>
|
||||
<td width="200">分类编号</td>
|
||||
<td width="*">分类名称</td>
|
||||
<td width="20%">分类状态</td>
|
||||
<td width="15%">分类级别</td>
|
||||
</tr>
|
||||
<#if size == 0>
|
||||
${zhiqim_manager_no_record(5, "暂时没有分类信息")}
|
||||
<#else>
|
||||
<tr class="z-pointer" ${zhiqim_manager_tr_onmouse()} ${zhiqim_manager_tr_click_radio()}>
|
||||
<td><input name="categoryId" type="radio" data-role="z-radio" data-class="${zmr_color_class}" value="${tree.self().getCategoryId()}" ></td>
|
||||
<td>${tree.self().getCategoryId()}</td>
|
||||
<td align="left" class="zi-pd-l6"><i class="z-ico z-tree z-normal z-30 z-root z-mg-r3"></i>#{tree.self().getCategoryName()}</td>
|
||||
<td><#if tree.self().getCategoryStatus() == 0>正常<#else><span class="z-color-red">停用</span></#if></td>
|
||||
<td>${tree.self().getCategoryLevel()}</td>
|
||||
</tr>
|
||||
<#for child : tree.children()>
|
||||
${showChildCategory(child, tree)}
|
||||
</#for>
|
||||
</#if>
|
||||
</table>
|
||||
${zhiqim_manager_list(size)}
|
||||
${zhiqim_manager_content_end()}
|
||||
@@ -0,0 +1,37 @@
|
||||
<#def designatedPath="/category.htm"/>
|
||||
${request.getValidateScript()}
|
||||
${zhiqim_manager_history ("category.htm")}
|
||||
|
||||
${zhiqim_manager_breadcrumb_parent ("category.htm", "知识库分类", "增加分类")}
|
||||
${zhiqim_manager_content()}
|
||||
<form name="theForm" action="categoryInsert.htm" method="post" onsubmit="return validateForm(this);" data-role="z-call-frame">
|
||||
<input name="parentLevel" type="hidden" value="${category.getCategoryLevel()}">
|
||||
<input name="parentId" type="hidden" value="${category.getCategoryId()}">
|
||||
<table class="z-table z-bordered z-h50-tr z-pd10 z-bg-white">
|
||||
<tr class="zi-h40 z-bg-gray z-bold">
|
||||
<td colspan="2">增加分类</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td width="40%">上级分类:<span class="z-color-999">(32位不定长字符)</span></td>
|
||||
<td width="*">${category.getCategoryName()}</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>分类名称:<span class="z-color-999">(32位不定长字符)</span></td>
|
||||
<td><input name="categoryName" class="z-input z-w300 ${zmr_color_class}" maxlength="32"><span class="z-color-red"> *</span></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>分类状态:<span class="z-color-999">(请选择)</span></td>
|
||||
<td>
|
||||
<select name="categoryStatus" class="z-select z-w300 ${zmr_color_class}" data-role="z-select" data-class="${zmr_color_class}">
|
||||
<option value="0">正常</option><option value="1">停用</option>
|
||||
</select><span class="z-color-red"> *</span>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>分类排序数:<span class="z-color-999">(填整型)</span></td>
|
||||
<td><input name="categorySeq" class="z-input z-w300 ${zmr_color_class}" data-options="type:Integer;" value="100" maxlength="8"><span class="z-color-red"> *</span></td>
|
||||
</tr>
|
||||
</table>
|
||||
${zhiqim_manager_submit()}
|
||||
</form>
|
||||
${zhiqim_manager_content_end()}
|
||||
@@ -0,0 +1,41 @@
|
||||
<#def designatedPath="/category.htm"/>
|
||||
${request.getValidateScript()}
|
||||
${zhiqim_manager_history ("category.htm")}
|
||||
|
||||
${zhiqim_manager_breadcrumb_parent ("category.htm", "知识库分类", "修改分类")}
|
||||
${zhiqim_manager_content()}
|
||||
<form name="theForm" action="categoryUpdate.htm" method="post" onsubmit="return validateForm(this);" data-role="z-call-frame">
|
||||
<input name="categoryId" type="hidden" value="${category.getCategoryId()}">
|
||||
<table class="z-table z-bordered z-h50-tr z-pd10 z-bg-white">
|
||||
<tr class="zi-h40 z-bg-gray z-bold">
|
||||
<td colspan="2">修改分类</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td width="40%">分类编号:<span class="z-color-999">(自定义)</span></td>
|
||||
<td width="*">${category.getCategoryId()}</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>上级分类:<span class="z-color-999">(32位不定长字符)</span></td>
|
||||
<td>${parent.getCategoryName()}</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>分类名称:<span class="z-color-999">(32位不定长字符)</span></td>
|
||||
<td><input name="categoryName" class="z-input z-w300 ${zmr_color_class}" value="${category.getCategoryName()}" maxlength="32"><span class="z-color-red"> *</span></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>分类状态:<span class="z-color-999">(请选择)</span></td>
|
||||
<td>
|
||||
<select name="categoryStatus" class="z-select z-w300 ${zmr_color_class}" data-role="z-select" data-class="${zmr_color_class}">
|
||||
<option <#if category.getCategoryStatus() == 0>selected</#if> value="0">正常</option><option <#if category.getCategoryStatus() == 1>selected</#if> value="1">停用</option>
|
||||
</select><span class="z-color-red"> *</span>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>分类排序数:<span class="z-color-999">(填整型)</span></td>
|
||||
<td><input name="categorySeq" class="z-input z-w300 ${zmr_color_class}" data-options="type:Integer;" value="${category.getCategorySeq()}" maxlength="8"><span class="z-color-red"> *</span></td>
|
||||
</tr>
|
||||
|
||||
</table>
|
||||
${zhiqim_manager_submit()}
|
||||
</form>
|
||||
${zhiqim_manager_content_end()}
|
||||
@@ -0,0 +1,125 @@
|
||||
<#def title = "扬彩帮助中心"/>
|
||||
<#def keywords = "帮助中心"/>
|
||||
<#def desc = "扬彩帮助中心"/>
|
||||
<#--头部起始-->
|
||||
<!DOCTYPE html>
|
||||
<html>
|
||||
<head>
|
||||
<title>扬彩知识库</title>
|
||||
<meta charset="UTF-8">
|
||||
<meta http-equiv="X-UA-Compatible" content="IE=edge">
|
||||
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8"/>
|
||||
<meta name="viewport" content="width=device-width,initial-scale=1"/>
|
||||
<meta name="Keywords" content="知识库" />
|
||||
<meta name="Description" content="扬彩知识库" />
|
||||
<link rel="shortcut icon" type="image/ico" href="/favicon.ico">
|
||||
${Styles.src(zhiqim.css)}
|
||||
${Scripts.src(zhiqim.js)}
|
||||
${Styles.src(context.getRootPath("/zinc/css/yangcai_question_main_v1.4.0R2018031701.css"))}
|
||||
${Scripts.src(context.getRootPath("/zinc/css/zhiqim_search_auto_list_v1.4.0R2018031701.js"))}
|
||||
</head>
|
||||
|
||||
</div>
|
||||
<!--固定的111margin-->
|
||||
<div style="margin-top:10px"></div>
|
||||
<script>
|
||||
Z.onload(function()
|
||||
{
|
||||
//左侧分类列表点击事件
|
||||
Z(".sidebar p").click(function()
|
||||
{
|
||||
var $thisUl = Z(this).next("ul");
|
||||
var hasChild = ($thisUl.find("li").length > 0)?(1):(0);
|
||||
if (hasChild)
|
||||
{
|
||||
var $ulDisplay = $thisUl.css("display");
|
||||
var $thisIcon = Z(this).find(".z-font");
|
||||
$thisUl.slideToggle().siblings("ul").slideUp();
|
||||
if ($ulDisplay == "block")
|
||||
return Z(".sidebar p>.z-font").removeClass("z-arrowhead-up").addClass("z-arrowhead-down");
|
||||
Z(".sidebar p>.z-font").removeClass("z-arrowhead-up").addClass("z-arrowhead-down");
|
||||
$thisIcon.removeClass("z-arrowhead-down").addClass("z-arrowhead-up");
|
||||
}
|
||||
else
|
||||
selectCategory(Z(this).attr("data-id"));
|
||||
});
|
||||
|
||||
//定义搜索框
|
||||
var search = new Z.SearchAutoList();
|
||||
search.elem = "searchinput";
|
||||
search.className = "SearchPresenter";
|
||||
search.methodName = "search";
|
||||
search.callback = function(){doSearchAjax(this.value);};
|
||||
search.execute();
|
||||
})
|
||||
|
||||
//分类选择
|
||||
function selectCategory(id){
|
||||
window.location.href = "/question.htm?categoryId=" + id;
|
||||
}
|
||||
|
||||
//文章显示
|
||||
function getArticle(categoryId,articleId)
|
||||
{
|
||||
window.location.href = "/question.htm?categoryId=" + categoryId + "&articleId=" + articleId;
|
||||
}
|
||||
|
||||
//执行搜索
|
||||
function doSearchAjax(str)
|
||||
{
|
||||
window.location.href = "/search.htm?keyword=" + str;
|
||||
}
|
||||
|
||||
</script>
|
||||
|
||||
<#--容器开始-->
|
||||
<!-- 左边导航 -->
|
||||
<div class="sidebar" style="position: fixed;left: 0;top:0;bottom: 0;width:15%;margin-top:10px">
|
||||
<p data-id="0" class="<#if categoryId == 0>z-selected</#if>">热门问题</p>
|
||||
<#for category : categoryList>
|
||||
<#if category.getCategoryLevel() == 2>
|
||||
<p data-id="${category.getCategoryId()}" class="<#if category.getCategoryId()==categoryId>z-selected</#if>">
|
||||
<#if parentList.get(categoryList.indexOf(category))><i class="z-font <#if selectedList.get(categoryList.indexOf(category))>z-arrowhead-up<#else>z-arrowhead-down</#if> z-float-left z-mg-r10"></i></#if>${category.getCategoryName()}
|
||||
</p>
|
||||
<ul style="display:<#if selectedList.get(categoryList.indexOf(category))>block<#else>none</#if>;">
|
||||
<#for child : childrenList>
|
||||
<#if child.getParentId() == category.getCategoryId()>
|
||||
<li <#if categoryId == child.getCategoryId()>class="z-selected"</#if> onclick="selectCategory(${child.getCategoryId()})">${child.getCategoryName()}</li>
|
||||
</#if>
|
||||
</#for>
|
||||
</ul>
|
||||
</#if>
|
||||
</#for>
|
||||
</div>
|
||||
|
||||
<!-- 右边主体 -->
|
||||
<div class="mainbody" style="width:84%;" >
|
||||
<!-- 搜索框 -->
|
||||
<div class="mainsearch">
|
||||
<span class="z-show-ib" id="search_wrap">
|
||||
<input id="searchinput" placeholder="输入问题关键词" type="text" class="z-input z-xlarge"><button onclick="doSearchAjax(searchinput.value)" class="z-button"></button>
|
||||
</span>
|
||||
</div>
|
||||
<div class="questionbody" id="questionbody">
|
||||
<!-- 显示文章 -->
|
||||
<#if articleStr != null>
|
||||
<div class="article">
|
||||
${articleStr}</br>
|
||||
</div>
|
||||
<div class="article" >
|
||||
${content}
|
||||
</div>
|
||||
<!-- 显示列表 -->
|
||||
<#elseif !articleList.isEmpty()>
|
||||
<dl class="article-list">
|
||||
<#for article : articleList>
|
||||
<dd><a href="javascript:{getArticle(${article.getCategoryId()},${article.getArticleId()})}">${article.getArticleTitle()}</a><span style="float:right">${article.getArticleTime().toString().substring(0, article.getArticleTime().toString().length() - 2)}</span></dd>
|
||||
</#for>
|
||||
</dl>
|
||||
<#else>
|
||||
<h2 style="font-weight:normal;">没有找到相关项目</h2>
|
||||
</#if>
|
||||
</div>
|
||||
</div>
|
||||
</body>
|
||||
</html>
|
||||
@@ -0,0 +1,120 @@
|
||||
<#def title = "扬彩知识库"/>
|
||||
<#def keywords = "知识库"/>
|
||||
<#def desc = "扬彩知识库"/>
|
||||
<#--头部起始-->
|
||||
<!DOCTYPE html>
|
||||
<html>
|
||||
<head>
|
||||
<title>扬彩知识库</title>
|
||||
<meta charset="UTF-8">
|
||||
<meta http-equiv="X-UA-Compatible" content="IE=edge">
|
||||
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8"/>
|
||||
<meta name="viewport" content="width=device-width,initial-scale=1"/>
|
||||
<meta name="Keywords" content="知识库" />
|
||||
<meta name="Description" content="扬彩知识库" />
|
||||
<link rel="shortcut icon" type="image/ico" href="/favicon.ico">
|
||||
${Styles.src(zhiqim.css)}
|
||||
${Scripts.src(zhiqim.js)}
|
||||
${Styles.src(context.getRootPath("/zinc/css/yangcai_question_main_v1.4.0R2018031701.css"))}
|
||||
${Scripts.src(context.getRootPath("/zinc/css/zhiqim_search_auto_list_v1.4.0R2018031701.js"))}
|
||||
</head>
|
||||
|
||||
<script>
|
||||
Z.onload(function()
|
||||
{
|
||||
//左侧分类列表点击事件
|
||||
Z(".sidebar p").click(function()
|
||||
{
|
||||
var $thisUl = Z(this).next("ul");
|
||||
var hasChild = ($thisUl.find("li").length > 0)?(1):(0);
|
||||
if (hasChild)
|
||||
{
|
||||
var $ulDisplay = $thisUl.css("display");
|
||||
var $thisIcon = Z(this).find(".z-font");
|
||||
$thisUl.slideToggle().siblings("ul").slideUp();
|
||||
if ($ulDisplay == "block")
|
||||
return Z(".sidebar p>.z-font").removeClass("z-arrowhead-up").addClass("z-arrowhead-down");
|
||||
Z(".sidebar p>.z-font").removeClass("z-arrowhead-up").addClass("z-arrowhead-down");
|
||||
$thisIcon.removeClass("z-arrowhead-down").addClass("z-arrowhead-up");
|
||||
}
|
||||
else
|
||||
selectCategory(Z(this).attr("data-id"));
|
||||
});
|
||||
|
||||
//定义搜索框
|
||||
var search = new Z.SearchAutoList();
|
||||
search.elem = "searchinput";
|
||||
search.className = "SearchPresenter";
|
||||
search.methodName = "search";
|
||||
search.callback = function(){doSearchAjax(this.value);};
|
||||
search.execute();
|
||||
})
|
||||
|
||||
//分类选择
|
||||
function selectCategory(id)
|
||||
{
|
||||
window.location.href = "/question.htm?categoryId=" + id;
|
||||
}
|
||||
|
||||
//文章显示
|
||||
function getArticle(categoryId,articleId)
|
||||
{
|
||||
window.location.href = "/question.htm?categoryId=" + categoryId + "&articleId=" + articleId;
|
||||
}
|
||||
|
||||
//执行搜索
|
||||
function doSearchAjax(str)
|
||||
{
|
||||
window.location.href = "/search.htm?keyword=" + str;
|
||||
}
|
||||
|
||||
</script>
|
||||
<#--容器开始-->
|
||||
<div id="container" class="container">
|
||||
<!-- 左边导航 -->
|
||||
<div class="sidebar">
|
||||
<main<#if menu=="index"> class="selected"</#if> onclick="location.href='${context.getRootPath("/question.htm")}'"><img width="150" height="40" src="${context.getRootPath("/inc/images/logo.png")}" alt="扬彩印刷" title="扬彩印刷"></a></main>
|
||||
<p data-id="0">热门问题</p>
|
||||
<#for category : categoryList>
|
||||
<#if category.getCategoryLevel() == 2>
|
||||
<p data-id="${category.getCategoryId()}" class="<#if category.getCategoryId()==categoryId>z-selected</#if>">
|
||||
<#if isParent.get(categoryList.indexOf(category))><i class="z-font z-arrowhead-down z-float-left z-mg-r10"></i></#if>${category.getCategoryName()}
|
||||
</p>
|
||||
<ul style="display:none;">
|
||||
<#for child : childrenList>
|
||||
<#if child.getParentId() == category.getCategoryId()>
|
||||
<li <#if categoryId == child.getCategoryId()>class="z-selected"</#if> onclick="selectCategory(${child.getCategoryId()})">${child.getCategoryName()}</li>
|
||||
</#if>
|
||||
</#for>
|
||||
</ul>
|
||||
</#if>
|
||||
</#for>
|
||||
</div>
|
||||
|
||||
<!-- 右边主体 -->
|
||||
<div class="mainbody">
|
||||
<!-- 搜索框 -->
|
||||
<div class="mainsearch">
|
||||
<span class="z-show-ib" id="search_wrap">
|
||||
<input id="searchinput" placeholder="输入问题关键词" value="${keyword}" type="text" class="z-input z-xlarge"><button onclick="doSearchAjax(searchinput.value)" class="z-button"></button>
|
||||
</span>
|
||||
</div>
|
||||
<div class="questionbody" id="questionbody">
|
||||
<div class="search-resultBar z-lh30">搜索结果:
|
||||
<span>${keyword}</span> 共找到
|
||||
<span>${articleList.size()}</span> 个结果
|
||||
</div>
|
||||
<dl class="search-resultList">
|
||||
<#for article : articleList>
|
||||
<dt><a href="javascript:{getArticle(${article.getCategoryId()},${article.getArticleId()})}">${article.getArticleTitle()}</a></dt>
|
||||
<dd>${contentList.get(articleList.indexOf(article))}</dd>
|
||||
</#for>
|
||||
<#if articleList.size()==0>
|
||||
<h2 style="font-weight:normal;">没有找到相关项目</h2>
|
||||
</#if>
|
||||
</dl>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</body>
|
||||
</html>
|
||||
Reference in New Issue
Block a user