Author: jleroux
Date: Tue Sep 13 12:53:19 2016
New Revision: 1760535
URL: http://svn.apache.org/viewvc?rev=1760535&view=rev
Log:
Fixes: postalAddressHtmlFormatter in PartyScreens.xml does not work properly.
OFBIZ-8242
When I added a postal address template into application [party] for Japan, it
does not work properly.
I found the value of addressTemplatePath in the screen of
postalAddressHtmlFormatter
is wrong in file PartyScreens.xml.
jleroux; this also adds Japanese Postal Address formating files
PostalAddress_JPN.fo.ftl and PostalAddress_JPN.ftl
Thanks: fumiyoshi.to for report and patch
Added:
ofbiz/trunk/applications/party/template/party/contactmechtemplates/PostalAddress_JPN.fo.ftl
(with props)
ofbiz/trunk/applications/party/template/party/contactmechtemplates/PostalAddress_JPN.ftl
(with props)
Modified:
ofbiz/trunk/applications/party/widget/partymgr/PartyScreens.xml
Added:
ofbiz/trunk/applications/party/template/party/contactmechtemplates/PostalAddress_JPN.fo.ftl
URL:
http://svn.apache.org/viewvc/ofbiz/trunk/applications/party/template/party/contactmechtemplates/PostalAddress_JPN.fo.ftl?rev=1760535&view=auto
==============================================================================
---
ofbiz/trunk/applications/party/template/party/contactmechtemplates/PostalAddress_JPN.fo.ftl
(added)
+++
ofbiz/trunk/applications/party/template/party/contactmechtemplates/PostalAddress_JPN.fo.ftl
Tue Sep 13 12:53:19 2016
@@ -0,0 +1,36 @@
+<#--
+Licensed to the Apache Software Foundation (ASF) under one
+or more contributor license agreements. See the NOTICE file
+distributed with this work for additional information
+regarding copyright ownership. The ASF licenses this file
+to you under the Apache License, Version 2.0 (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.apache.org/licenses/LICENSE-2.0
+
+Unless required by applicable law or agreed to in writing,
+software distributed under the License is distributed on an
+"AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+KIND, either express or implied. See the License for the
+specific language governing permissions and limitations
+under the License.
+-->
+<#escape x as x?xml>
+ <fo:block>${postalAddress.address1!}</fo:block>
+ <#if
postalAddress.address2?has_content><fo:block>${postalAddress.address2}</fo:block></#if>
+ <fo:block>
+ ${postalAddress.city!}
+ <#if postalAddress.stateProvinceGeoId?has_content>
+ <#assign stateProvince = postalAddress.getRelatedOne("StateProvinceGeo",
true)>
+ , ${stateProvince.geoName}
+ </#if>
+ ${postalAddress.postalCode!}
+ </fo:block>
+ <#if postalAddress.countryGeoId?has_content>
+ <fo:block>
+ <#assign country = postalAddress.getRelatedOne("CountryGeo", true)>
+ ${country.get("geoName", locale)?default(country.geoId)}
+ </fo:block>
+ </#if>
+</#escape>
Propchange:
ofbiz/trunk/applications/party/template/party/contactmechtemplates/PostalAddress_JPN.fo.ftl
------------------------------------------------------------------------------
svn:eol-style = native
Propchange:
ofbiz/trunk/applications/party/template/party/contactmechtemplates/PostalAddress_JPN.fo.ftl
------------------------------------------------------------------------------
svn:keywords = Date Rev Author URL Id
Propchange:
ofbiz/trunk/applications/party/template/party/contactmechtemplates/PostalAddress_JPN.fo.ftl
------------------------------------------------------------------------------
svn:mime-type = text/plain
Added:
ofbiz/trunk/applications/party/template/party/contactmechtemplates/PostalAddress_JPN.ftl
URL:
http://svn.apache.org/viewvc/ofbiz/trunk/applications/party/template/party/contactmechtemplates/PostalAddress_JPN.ftl?rev=1760535&view=auto
==============================================================================
---
ofbiz/trunk/applications/party/template/party/contactmechtemplates/PostalAddress_JPN.ftl
(added)
+++
ofbiz/trunk/applications/party/template/party/contactmechtemplates/PostalAddress_JPN.ftl
Tue Sep 13 12:53:19 2016
@@ -0,0 +1,48 @@
+<#--
+Licensed to the Apache Software Foundation (ASF) under one
+or more contributor license agreements. See the NOTICE file
+distributed with this work for additional information
+regarding copyright ownership. The ASF licenses this file
+to you under the Apache License, Version 2.0 (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.apache.org/licenses/LICENSE-2.0
+
+Unless required by applicable law or agreed to in writing,
+software distributed under the License is distributed on an
+"AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+KIND, either express or implied. See the License for the
+specific language governing permissions and limitations
+under the License.
+-->
+ <div>
+ <#if
postalAddress.toName?has_content><b>${uiLabelMap.PartyAddrToName}:</b>
${postalAddress.toName}<br /></#if>
+ <#if
postalAddress.attnName?has_content><b>${uiLabelMap.PartyAddrAttnName}:</b>
${postalAddress.attnName}<br /></#if>
+ ${postalAddress.address1!}<br />
+ <#if postalAddress.address2?has_content>${postalAddress.address2}<br
/></#if>
+ ${postalAddress.city!},
+ <#if postalAddress.stateProvinceGeoId?has_content>
+ <#assign stateProvince = postalAddress.getRelatedOne("StateProvinceGeo",
true)>
+ ${stateProvince.geoName?default(stateProvince.abbreviation)}
+ </#if>
+ <#if postalAddress.postalCodeGeoId?has_content>
+ <#assign postalCodeGeo = postalAddress.getRelatedOne("PostalCodeGeo",
true)>
+ ${postalCodeGeo.geoName}
+ <#else>
+ ${postalAddress.postalCode!}
+ </#if>
+ <#if postalAddress.countryGeoId?has_content><br />
+ <#assign country = postalAddress.getRelatedOne("CountryGeo", true)>
+ ${country.get("geoName", locale)?default(country.geoId)}
+ </#if>
+ </div>
+ <#if !postalAddress.countryGeoId?has_content>
+ <#assign addr1 = postalAddress.address1!>
+ <#if addr1?has_content && (addr1.indexOf(" ") > 0)>
+ <#assign addressNum = addr1.substring(0, addr1.indexOf(" "))>
+ <#assign addressOther = addr1.substring(addr1.indexOf(" ")+1)>
+ <a target="_blank"
href="${uiLabelMap.CommonLookupWhitepagesAddressLink}"
class="buttontext">${uiLabelMap.CommonLookupWhitepages}</a>
+ </#if>
+ </#if>
+
Propchange:
ofbiz/trunk/applications/party/template/party/contactmechtemplates/PostalAddress_JPN.ftl
------------------------------------------------------------------------------
svn:eol-style = native
Propchange:
ofbiz/trunk/applications/party/template/party/contactmechtemplates/PostalAddress_JPN.ftl
------------------------------------------------------------------------------
svn:keywords = Date Rev Author URL Id
Propchange:
ofbiz/trunk/applications/party/template/party/contactmechtemplates/PostalAddress_JPN.ftl
------------------------------------------------------------------------------
svn:mime-type = text/plain
Modified: ofbiz/trunk/applications/party/widget/partymgr/PartyScreens.xml
URL:
http://svn.apache.org/viewvc/ofbiz/trunk/applications/party/widget/partymgr/PartyScreens.xml?rev=1760535&r1=1760534&r2=1760535&view=diff
==============================================================================
--- ofbiz/trunk/applications/party/widget/partymgr/PartyScreens.xml (original)
+++ ofbiz/trunk/applications/party/widget/partymgr/PartyScreens.xml Tue Sep 13
12:53:19 2016
@@ -1273,7 +1273,7 @@ under the License.
<actions>
<property-map resource="PartyUiLabels" map-name="uiLabelMap"
global="true"/>
<set field="postalAddressTemplateSuffix" value=".ftl"/>
- <set field="addressTemplatePath"
value="${sys:getProperty('ofbiz.home')}/applications/party/webapp/partymgr/party/contactmechtemplates/"/>
+ <set field="addressTemplatePath"
value="${sys:getProperty('ofbiz.home')}/applications/party/template/party/contactmechtemplates/"/>
<script
location="component://party/groovyScripts/party/GetPostalAddressTemplate.groovy"/>
</actions>
<widgets>