<%@ page language="java" contentType="text/html; charset=UTF-8" pageEncoding="UTF-8"%>
<%@ taglib prefix="sec" uri="http://www.springframework.org/security/tags" %>
<%@ include file="../language.jsp" %>
<%
String keyWord="";
if(request.getParameter("keyWord")!=null){
	keyWord=new String(request.getParameter("keyWord").getBytes("iso8859-1"),"utf-8"); 
}
%>
<script>
var sec_saveKnowledgeInfo="0";
var sec_removeKnowledgeItems="0";
</script>
<sec:authorize url="/pages/knowledgeInfo!saveKnowledgeInfo.action">
<script>sec_saveKnowledgeInfo="1";</script>
</sec:authorize>
<sec:authorize url="/pages/knowledgeInfo!removeKnowledgeItems.action">
<script>sec_removeKnowledgeItems="1";</script>
</sec:authorize>
<script src="../scripts/itsm/knowledge/knowledgeGrid.js?random=<%=new java.util.Date().getTime()%>"></script>
<script>var keyWord="<%=keyWord%>";
</script>
<div class="loading" id="knowledge_loading"><img src="../images/icons/loading.gif" /></div>
<div id="knowledge_contentPanel" class="easyui-panel content" fit="true" border="none">
<div class="easyui-layout" fit="true">
<!-- 分类树-->
<div id="knowledgeCategoryDiv" region="east" title="<fmt:message key="knowledge.label.knowledgeSort" />" split="true" style="width:200px;padding:5px">
<div id="knowledgeCategoryTree"></div>
</div>
<!-- 知识列表 -->
<div region="center" id="knowledgeMain" style="padding:3px">

	<table id="knowledgeGrid" width="100%"></table>
	<div id="knowledgeGridPager"></div>
	<div id="knowledgeGridToolbar" style="display:none">
	<!-- 操作项 -->
	<div id="knowledgeGridACT" style="display: none;"><a href="javascript:itsm.knowledge.knowledgeGrid.showKnowledge()" title="<fmt:message key="common.detailInfo" />"><img src="../images/icons/pencil.png" border="0" /></a>&nbsp;&nbsp;<a href="javascript:itsm.knowledge.knowledgeGrid.showEditKnowledge()" title="<fmt:message key="common.edit" />"><img src="../images/icons/edit.gif" border="0"/></a>&nbsp;&nbsp;<a href="javascript:itsm.knowledge.knowledgeGrid.deleteKnowledge()" title="<fmt:message key="common.delete" />"><img src="../images/icons/delete.gif" border="0"/></a></div>	
	<table>
	<tr>
	<td>
	
	<sec:authorize url="/pages/knowledgeInfo!saveKnowledgeInfo.action">
	<a class="easyui-linkbutton"  plain="true" icon="icon-add" onClick="itsm.knowledge.knowledgeGrid.showAddKnowledge()"><fmt:message key="common.add" /></a> 
	</sec:authorize>
	
	<sec:authorize url="/pages/knowledgeInfo!updateKnowledgeInfo.action">
	<a class="easyui-linkbutton"  plain="true" icon="icon-edit" onClick="itsm.knowledge.knowledgeGrid.showEditKnowledge()"><fmt:message key="common.edit" /></a> 
	</sec:authorize>
	
	<sec:authorize url="/pages/knowledgeInfo!removeKnowledgeItems.action">
	<a class="easyui-linkbutton" plain="true" icon="icon-cancel" onClick="itsm.knowledge.knowledgeGrid.deleteKnowledge()"><fmt:message key="common.delete" /></a> 
	</sec:authorize>
	<a class="easyui-linkbutton" plain="true" icon="icon-search" onClick="itsm.knowledge.knowledgeGrid.search_konwledge_openwindow()"><fmt:message key="common.search" /></a>
	
	
	<!--  
	&nbsp;&nbsp; | <fmt:message key="label.dc.export"/>：
	<select onchange="itsm.knowledge.knowledgeGrid.exportKnowledgeData()" id="exportKnowledge">
	<option value="chooseExportType">--<fmt:message key="label.dc.chooseExportStyle"/>--</option>
	<option value="view"><fmt:message key="label.dc.exportCurrentView"/></option>
	</select>
	
	
	&nbsp;&nbsp; | <fmt:message key="label.dc.import"/>：
	<select onchange="itsm.knowledge.knowledgeGrid.importKnowledgeData_openWindow()" id="importKnowledge">
	<option value="chooseImportType">--<fmt:message key="label.dc.chooseImportStyle"/>--</option>
	<option value="excel"><fmt:message key="label.dc.importFromExcel"/></option>
	</select>
	-->
	
	
	</td>

	</tr>
	</table>
	</div>   	

</div>
        <!-- 搜索知识库 -->
        <div id="knowledgeSearchDiv" class="easyui-window"  closed="true" modal="false" title="<fmt:message key="common.search" />" style="width:350px;height:auto" collapsible="false" minimizable="false" maximizable="false">
          <form>
         	<div class="lineTableBgDiv">
				<table style="width:100%" class="lineTable" cellspacing="1">
	          	<tr>
	          		<td><fmt:message key="knowledge.label.knowledgeSort" /></td>
	          		<td>

	          			<input name="knowledgeQueryDto.category" id="search_knCategory" class="choose" readonly />
	          			
	          		</td>
	          	</tr>
	          	<tr>
	          		<td><fmt:message key="knowledge.label.knowledgeTitle" /></td>
	          		<td><input id="search_knTitle" name="knowledgeQueryDto.title"  style="width:96%"/></td>
	          	</tr>
	  			<tr>
	  				<td><fmt:message key="label.dateRange" /></td>
	  				<td>
	  					<input id="know_search_startTime"  name="knowledgeQueryDto.startTime" class="easyui-datebox"  style="width:80px"/>&nbsp;<fmt:message key="setting.label.to" />
	            		&nbsp;<input id="know_search_endTime" name="knowledgeQueryDto.endTime" class="easyui-datebox easyui-validatebox"  style="width:80px" validType="DateComparison['know_search_startTime']"/>
	  				</td>
	  			</tr>
				<tr >
				   <td colspan="2">
				    <div style="padding-top:8px;">
				    	<input type="hidden" id="knowledgeQueryDto_keyWord" name="knowledgeQueryDto.keyWord" />
	                	<a id="knowledge_search_ok" class="easyui-linkbutton" icon="icon-search" ><fmt:message key="common.search" /></a>
	                </div>
	                </td>
				</tr>
	          </table>
          </div>
          </form>
        </div>
        
        
        
<!-- 导入 -->
<div id="importKnowledgeDataWindow"  class="easyui-window" closed="true" collapsible="false" minimizable="false" maximizable="false" modal="true" title="<fmt:message key="label.dc.import"/>" style="width:400px;height:auto">
	<form>
   <div class="lineTableBgDiv" >
    <table  class="lineTable"  width="100%" cellspacing="1"> 
        <tr>
            <td width="100px">
            <fmt:message key="label.dc.filePath"/>
        
            </td>
            <td>
           <input type="file" class="input" onchange="$('importKB_importPath').val(this.value)"/>
            </td>
        </tr>

        <tr>
            <td colspan="2">
                <div style="padding-top:8px;">
                	<input type="hidden" id="importKB_importPath" name="knowledgeQueryDto.importPath">
                	<a class="easyui-linkbutton" onclick="importKnowledgeData()" icon="icon-ok"><fmt:message key="label.dc.import"/></a>
                </div>
        </td>
        </tr>
    </table>
    </div>
    </form>
</div>

</div>




<!-- 知识分类 -->
<div id="search_select_knowledgeCategory_window" class="easyui-window"  closed="true" collapsible="false" minimizable="false" maximizable="false" modal="true" title="<fmt:message key="knowledge.label.knowledgeSort" />" style="width:200px;height:400px;padding:2px;">
	<div id="search_select_knowledgeCategory_tree"></div>
</div>








</div>