page1.jsp
来自「开源项目CRM之OpenCustomer」· JSP 代码 · 共 216 行
JSP
216 行
<%-- ***** 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.web.Globals" %>
<%@ page import="org.opencustomer.application.web.module.crm.contact.Constants" %>
<%@ page import="org.opencustomer.application.db.vo.crm.ContactVO" %>
<%@ page import="org.opencustomer.application.db.vo.crm.PersonContactVO" %>
<%@ page import="org.opencustomer.application.db.vo.crm.PersonVO" %>
<%@ page import="org.opencustomer.application.db.vo.system.UserVO" %>
<%@ page import="org.opencustomer.application.auth.Right" %>
<%@ page import="java.util.List" %>
<tiles:insert definition="crm.contact.edit">
<tiles:put name="page.content">
<html:form action="/crm/contact/edit/processPage1" focus="subject" styleClass="default">
<html:errors/>
<div class="page">
<fieldset class="unit">
<table>
<tr>
<td class="label">
<buj:label property="subject" errorStyleId="error"><bean:message key="entity.crm.contact.subject"/></buj:label>
</td>
<td>
<html:text property="subject" styleId="subject" maxlength="255" styleClass="full"/>
</td>
</tr>
<tr>
<td class="label">
<buj:label property="contactDate" errorStyleId="error"><bean:message key="entity.crm.contact.contactTimestamp.date"/></buj:label>
</td>
<td>
<html:text property="contactDate" styleId="contactDate" maxlength="255" styleClass="full"/>
</td>
</tr>
<tr>
<td class="label">
<buj:label property="contactTime" errorStyleId="error"><bean:message key="entity.crm.contact.contactTimestamp.time"/></buj:label>
</td>
<td>
<html:text property="contactTime" styleId="contactTime" maxlength="255" styleClass="full"/>
</td>
</tr>
</table>
</fieldset>
<fieldset class="unit">
<table>
<tr>
<td class="label">
<buj:label property="boundType" errorStyleId="error"><bean:message key="entity.crm.contact.boundType"/></buj:label>
</td>
<td>
<html:select property="boundType" styleId="boundType">
<html:option value="">---</html:option>
<html:option key="entity.crm.contact.boundType.in" value="<%=ContactVO.BoundType.IN.toString()%>"/>
<html:option key="entity.crm.contact.boundType.out" value="<%=ContactVO.BoundType.OUT.toString()%>"/>
</html:select>
</td>
</tr>
<tr>
<td class="label">
<buj:label property="contactType" errorStyleId="error"><bean:message key="entity.crm.contact.contactType"/></buj:label>
</td>
<td>
<html:select property="contactType" styleId="contactType">
<html:option value="">---</html:option>
<html:option key="entity.crm.contact.contactType.phone" value="<%=ContactVO.ContactType.TELEPHONE.toString()%>"/>
<html:option key="entity.crm.contact.contactType.fax" value="<%=ContactVO.ContactType.FAX.toString()%>"/>
<html:option key="entity.crm.contact.contactType.email" value="<%=ContactVO.ContactType.EMAIL.toString()%>"/>
<html:option key="entity.crm.contact.contactType.letter" value="<%=ContactVO.ContactType.LETTER.toString()%>"/>
<html:option key="entity.crm.contact.contactType.personal" value="<%=ContactVO.ContactType.PERSONAL.toString()%>"/>
</html:select>
</td>
</tr>
</table>
</fieldset>
<fieldset class="unit">
<table><%
ContactVO contact = (ContactVO)session.getAttribute(Constants.CONTACT_CONTACT);
%>
<tr>
<td class="label">
<buj:label property="person" errorStyleId="error"><bean:message key="entity.crm.person"/></buj:label>
</td>
<td colspan="2">
<table class="inner">
<tr>
<td colspan="2" class="action">
<buj:authenticate right="<%=Right.CRM_CONTACTS_WRITE.getLabel()%>">
<logic:present name="<%=Globals.USER_KEY%>" property="person" scope="session"><%
PersonVO ownPerson = ((UserVO)session.getAttribute(Globals.USER_KEY)).getPerson();
List<PersonContactVO> pcList = (List<PersonContactVO>)session.getAttribute(Constants.CONTACT_PERSONS);
if(!pcList.contains(new PersonContactVO(ownPerson, contact))) { %>
<html:image property="doAddOwnPerson" pageKey="icon.addOwnPerson.url" titleKey="icon.addOwnPerson.text" altKey="icon.addOwnPerson.text"/><%
} else { %>
<html:image property="doAddOwnPerson" pageKey="icon.addOwnPerson_grey.url" titleKey="icon.addOwnPerson_grey.text" altKey="icon.addOwnPerson_grey.text" disabled="true"/><%
} %>
</logic:present>
<html:image property="doAddPerson" pageKey="icon.add.url" titleKey="icon.add.text" altKey="icon.add.text"/>
</buj:authenticate>
</td>
</tr>
<logic:present name="<%=Constants.CONTACT_CONTACT%>" property="personContacts" scope="session">
<logic:iterate id="data" name="<%=Constants.CONTACT_PERSONS%>" scope="session" indexId="index"><%
PersonVO person = ((PersonContactVO)pageContext.getAttribute("data")).getPerson();
%>
<tr>
<td>
<bean:write name="data" property="person.firstName" scope="page"/>
<bean:write name="data" property="person.lastName" scope="page"/>
<logic:present name="data" property="person.company" scope="page">
[<bean:write name="data" property="person.company.companyName" scope="page"/>]
</logic:present>
</td>
<td class="action">
<buj:authenticate right="<%=Right.CRM_CONTACTS_WRITE.getLabel()%>"><%
if(contact.getPersonContacts().size() > 1 || contact.getCompany() != null) { %>
<html:image property="<%="doDeletePerson_"+person.getId()%>" pageKey="icon.delete.url" titleKey="icon.delete.text" altKey="icon.delete.text"/><%
} else {%>
<html:image property="<%="doDeletePerson_"+person.getId()%>" pageKey="icon.delete_grey.url" titleKey="icon.delete_grey.text" altKey="icon.delete_grey.text" disabled="true"/><%
} %>
</buj:authenticate>
<html:image property="<%="doJumpPerson_"+person.getId()%>" pageKey="icon.jump.url" titleKey="icon.jump.text" altKey="icon.jump.text"/>
</td>
</tr>
</logic:iterate>
</logic:present>
</table>
</td>
</tr>
<tr>
<td class="label">
<buj:label property="company" errorStyleId="error"><bean:message key="entity.crm.company"/></buj:label>
</td>
<td>
<logic:present name="<%=Constants.CONTACT_CONTACT%>" property="company" scope="session">
<bean:write name="<%=Constants.CONTACT_CONTACT%>" property="company.companyName" scope="session"/>
</logic:present>
<logic:notPresent name="<%=Constants.CONTACT_CONTACT%>" property="company" scope="session">
---
</logic:notPresent>
</td>
<td class="action">
<buj:authenticate right="<%=Right.CRM_CONTACTS_WRITE.getLabel()%>">
<html:image property="doAddCompany" pageKey="icon.add.url" titleKey="icon.add.text" altKey="icon.add.text"/>
</buj:authenticate>
<logic:present name="<%=Constants.CONTACT_CONTACT%>" property="company" scope="session">
<html:image property="doJumpCompany" pageKey="icon.jump.url" titleKey="icon.jump.text" altKey="icon.jump.text"/>
</logic:present>
<logic:notPresent name="<%=Constants.CONTACT_CONTACT%>" property="company" scope="session">
<html:img styleClass="action" pageKey="icon.jump_grey.url" titleKey="icon.jump_grey.text" altKey="icon.jump_grey.text"/>
</logic:notPresent>
</td>
</tr>
<tr>
<td class="label">
<buj:label property="contactName" errorStyleId="error"><bean:message key="entity.crm.contact.contactName"/></buj:label>
</td>
<td colspan="2">
<html:text property="contactName" styleId="contactName" maxlength="255" styleClass="full"/>
</td>
</tr>
</table>
</fieldset>
<fieldset class="unit">
<legend>
<buj:label property="content" errorStyleId="error"><bean:message key="entity.crm.contact.content"/></buj:label>
</legend>
<html:textarea property="content" styleId="content" style="height: 250px;"/>
</fieldset>
<fieldset class="action">
<buj:authenticate right="<%=Right.CRM_CONTACTS_WRITE.getLabel()%>">
<logic:present name="<%=Constants.CONTACT_CONTACT%>" property="id" scope="session">
<html:submit property="doDelete" styleClass="left"><bean:message key="image.button.delete.text"/></html:submit>
</logic:present>
<logic:notPresent name="<%=Constants.CONTACT_CONTACT%>" property="id" scope="session">
<html:submit property="doDelete" styleClass="left" disabled="true"><bean:message key="image.button.delete.text"/></html:submit>
</logic:notPresent>
</buj:authenticate>
<html:submit property="doCancel"><bean:message key="image.button.cancel.text"/></html:submit>
<buj:authenticate right="<%=Right.CRM_CONTACTS_WRITE.getLabel()%>">
<html:submit property="doSave"><bean:message key="image.button.save.text"/></html:submit>
</buj:authenticate>
</fieldset>
</div>
</html:form>
</tiles:put>
</tiles:insert>
⌨️ 快捷键说明
复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?