showpersons.jsp

来自「开源项目CRM之OpenCustomer」· JSP 代码 · 共 194 行

JSP
194
字号
<%-- ***** BEGIN LICENSE BLOCK *****
   - Version: MPL 1.1
   -
   - The contents of this file are subject to the Mozilla Public License Version
   - 1.1 (the "License"); you may not use this file except in compliance with
   - the License. You may obtain a copy of the License at
   - http://www.mozilla.org/MPL/
   -
   - Software distributed under the License is distributed on an "AS IS" basis,
   - WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
   - for the specific language governing rights and limitations under the
   - License.
   -
   - The Original Code is the OpenCustomer CRM.
   -
   - The Initial Developer of the Original Code is
   - Thomas Bader (Bader & Jene Software-Ingenieurb黵o).
   - Portions created by the Initial Developer are Copyright (C) 2005
   - the Initial Developer. All Rights Reserved.
   -
   - Contributor(s):
   -   Thomas Bader <thomas.bader@bader-jene.de>
   -
   - ***** END LICENSE BLOCK ***** --%>
   
<%@ include file="/tiles/page.jsp" %>

<%@ page import="org.opencustomer.application.db.dao.crm.custom.PersonListDAO" %>
<%@ page import="org.opencustomer.application.auth.Right" %>

<tiles:insert definition="standard">
	<tiles:put name="page.title"><bean:message key="domain.crm.showPersons.headLine"/></tiles:put>
	<tiles:put name="page.content">
		
	<script language="JavaScript" type="text/javascript">
	<!--
		function edit(i) {
			document.location="<%=response.encodeURL(request.getContextPath()+"/crm/person/edit.do?id=")%>"+i;
		}
	//-->
	</script>
	
	<html:form action="/crm/person/showPersons" styleClass="list">
		<html:hidden property="sort"/>
		<fieldset class="search">
			<legend><bean:message key="default.group.search"/></legend>
			<table class="search">
				<colgroup>
					<col width="20"/>
					<col width="1*"/>
					<col width="1*"/>
					<col width="1*"/>
					<col width="1*"/>
					<col width="1*"/>
					<col width="1*"/>
					<col width="1*"/>
				</colgroup>
				<tr class="search">
					<td>&nbsp;</td>
					<td>
						<buj:label property="lastName" errorStyleId="error"><bean:message key="entity.crm.person.lastName"/></buj:label>
						<html:text property="lastName" styleId="lastName"/>
					</td>
					<td>
						<buj:label property="firstName" errorStyleId="error"><bean:message key="entity.crm.person.firstName"/></buj:label>
						<html:text property="firstName" styleId="firstName"/>
					</td>
					<td>
						<buj:label property="phone" errorStyleId="error"><bean:message key="entity.crm.person.phone"/></buj:label>
						<html:text property="phone" styleId="phone"/>
					</td>
					<td>
						<buj:label property="fax" errorStyleId="error"><bean:message key="entity.crm.person.fax"/></buj:label>
						<html:text property="fax" styleId="fax"/>
					</td>
					<td>
						<buj:label property="mobile" errorStyleId="error"><bean:message key="entity.crm.person.mobile"/></buj:label>
						<html:text property="mobile" styleId="mobile"/>
					</td>
					<td>
						<buj:label property="email" errorStyleId="error"><bean:message key="entity.crm.person.email"/></buj:label>
						<html:text property="email" styleId="email"/>
					</td>
					<td>
						<buj:label property="companyName" errorStyleId="error"><bean:message key="entity.crm.company.companyName"/></buj:label>
						<html:text property="companyName" styleId="companyName"/>
					</td>
				</tr>
			</table>
			<div class="action">
				<html:image property="doSearch" pageKey="icon.search.url" styleClass="default"/>
				<html:image property="doResetSearch" pageKey="icon.searchClean.url" titleKey="icon.searchClean.text" altKey="icon.searchClean.text"/>
				<html:image property="doSearch" pageKey="icon.search.url" titleKey="icon.search.text" altKey="icon.search.text"/>
			</div>
		</fieldset>
		<buj:authenticate right="<%=Right.CRM_PERSONS_WRITE.getLabel()%>">
		<fieldset class="listAction">
			<html:link action="/crm/person/edit" titleKey="icon.add.text">
				<html:img styleClass="action" altKey="icon.add.text" titleKey="icon.add.text" pageKey="icon.add.url"/>
			</html:link>
		</fieldset>		
		</buj:authenticate>
		<fieldset class="list">
			<legend>
				<buj:paginationInfo 
					textKey="domain.crm.person.showPersons.pagination" 
					name="crm.person.listScroll" 
					scope="request"/>
			</legend>
			<div class="pagination">
				<buj:paginationMenu 
					name="crm.person.listScroll" 
					scope="request"/>
			</div>
		<table class="result">
			<colgroup>
				<col width="20"/>
				<col width="1*"/>
				<col width="1*"/>
				<col width="1*"/>
				<col width="1*"/>
				<col width="1*"/>
				<col width="1*"/>
				<col width="1*"/>
			</colgroup>
			<tr>
				<th>&nbsp;</th>
				<th>
					<buj:sort
  					 	messageKey="entity.crm.person.lastName"
						property="<%=String.valueOf(PersonListDAO.SORT_LASTNAME)%>"/>
				</th>
				<th>
					<buj:sort
  					 	messageKey="entity.crm.person.firstName"
						property="<%=String.valueOf(PersonListDAO.SORT_FIRSTNAME)%>"/>
				</th>
				<th>
					<buj:sort
  					 	messageKey="entity.crm.person.phone"
						property="<%=String.valueOf(PersonListDAO.SORT_PHONE)%>"/>
				</th>
				<th>
					<buj:sort
  					 	messageKey="entity.crm.person.fax"
						property="<%=String.valueOf(PersonListDAO.SORT_FAX)%>"/>
				</th>
				<th>
					<buj:sort
  					 	messageKey="entity.crm.person.mobile"
						property="<%=String.valueOf(PersonListDAO.SORT_MOBILE)%>"/>
				</th>
				<th>
					<buj:sort
  					 	messageKey="entity.crm.person.email"
						property="<%=String.valueOf(PersonListDAO.SORT_EMAIL)%>"/>
				</th>
				<th>
					<buj:sort
  					 	messageKey="entity.crm.company.companyName"
						property="<%=String.valueOf(PersonListDAO.SORT_COMPANY_NAME)%>"/>
				</th>
			</tr>
			<logic:iterate id="data" indexId="index" name="crm.person.list" scope="request">
			<tr class="<buj:rowSwap name="index" number="3" odd="rowOdd" even="rowEven"/>" onmouseover="this.className='rowActive';" onmouseout="this.className='<buj:rowSwap name="index" number="3" odd="rowOdd" even="rowEven"/>'">
				<td onclick="edit(<bean:write name="data" property="personId" scope="page"/>);">
					<logic:equal name="data" property="user" scope="page" value="true">
						<html:img altKey="image.crm.person.personUser.text" titleKey="image.crm.person.personUser.text" pageKey="image.crm.person.personUser.url"/>
					</logic:equal>
					<logic:notEqual name="data" property="user" scope="page" value="true">
						<html:img altKey="image.crm.person.person.text" titleKey="image.crm.person.person.text" pageKey="image.crm.person.person.url"/>
					</logic:notEqual>
				</td>
				<td onclick="edit(<bean:write name="data" property="personId" scope="page"/>);"><bean:write name="data" property="lastName" scope="page"/></td>
				<td onclick="edit(<bean:write name="data" property="personId" scope="page"/>);"><bean:write name="data" property="firstName" scope="page"/></td>
				<td onclick="edit(<bean:write name="data" property="personId" scope="page"/>);"><bean:write name="data" property="phone" scope="page"/></td>
				<td onclick="edit(<bean:write name="data" property="personId" scope="page"/>);"><bean:write name="data" property="fax" scope="page"/></td>
				<td onclick="edit(<bean:write name="data" property="personId" scope="page"/>);"><bean:write name="data" property="mobile" scope="page"/></td>
				<td onclick="edit(<bean:write name="data" property="personId" scope="page"/>);"><bean:write name="data" property="email" scope="page"/></td>
				<td onclick="edit(<bean:write name="data" property="personId" scope="page"/>);"><bean:write name="data" property="companyName" scope="page"/></td>
			</tr>
			</logic:iterate>
			<logic:notPresent name="index" scope="page">
			<tr class="noRow">
				<td colspan="8"><bean:message key="default.message.noEntries"/></td>
			</tr>
			</logic:notPresent>
		</table>
		</fieldset>
	</html:form>
		
	</tiles:put>
</tiles:insert>

⌨️ 快捷键说明

复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?