A patch from Gil Portenseigne for "Add a mean to untie geo associations" https://issues.apache.org/jira/browse/OFBIZ-6528
In the Webtools we can asociate Geos but we have yet no means to untie them This patch adds a new grid in EditGeoScreen to see/delete GeoAssoc and CommonEntityLabels default-resource-name on GeoAssocType for translation purpose. jleroux: On Pierre's Smits suggestion Gil also added a clickable link to open the associated Geo and a column to show the geoTypeId of the associated Geo. git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@1687259 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
@@ -5885,6 +5885,26 @@
|
||||
<value xml:lang="zh">格鲁吉亚</value>
|
||||
<value xml:lang="zh-TW">格魯吉亞</value>
|
||||
</property>
|
||||
<property key="GeoAssocType.description.COUNTY_CITY">
|
||||
<value xml:lang="en">City in a county</value>
|
||||
<value xml:lang="fr">Ville du département</value>
|
||||
</property>
|
||||
<property key="GeoAssocType.description.COUNTY_SEAT">
|
||||
<value xml:lang="en">Administrative Main City of a County</value>
|
||||
<value xml:lang="fr">Chef-lieu du département</value>
|
||||
</property>
|
||||
<property key="GeoAssocType.description.GROUP_MEMBER">
|
||||
<value xml:lang="en">Geo Group Member</value>
|
||||
<value xml:lang="fr">Membre de la zone Géographique</value>
|
||||
</property>
|
||||
<property key="GeoAssocType.description.POSTAL_CODE">
|
||||
<value xml:lang="en">Postal code associated to a GeoType</value>
|
||||
<value xml:lang="fr">Code Postal associé au type Géographique</value>
|
||||
</property>
|
||||
<property key="GeoAssocType.description.REGIONS">
|
||||
<value xml:lang="en">For a region of a larger Geo, i.e. states, counties, provinces...</value>
|
||||
<value xml:lang="fr">Région d'une zone géographique plus large</value>
|
||||
</property>
|
||||
<property key="Geo.geoName.GHA">
|
||||
<value xml:lang="ar">غانا</value>
|
||||
<value xml:lang="de">Ghana</value>
|
||||
|
||||
@@ -275,7 +275,7 @@ under the License.
|
||||
</view-link>
|
||||
</view-entity>
|
||||
<entity entity-name="GeoAssocType" package-name="org.ofbiz.common.geo"
|
||||
title="Geographic Boundary Association Entity">
|
||||
title="Geographic Boundary Association Entity" default-resource-name="CommonEntityLabels">
|
||||
<field name="geoAssocTypeId" type="id-ne"></field>
|
||||
<field name="description" type="description"></field>
|
||||
<prim-key field="geoAssocTypeId"/>
|
||||
|
||||
@@ -724,6 +724,11 @@ under the License.
|
||||
<permission-service service-name="commonGenericPermission" main-action="DELETE"/>
|
||||
<auto-attributes include="pk" mode="IN" optional="false"/>
|
||||
</service>
|
||||
<service name="deleteGeoAssoc" default-entity-name="GeoAssoc" engine="entity-auto" invoke="delete" auth="true">
|
||||
<description>Delete a Geo</description>
|
||||
<permission-service service-name="commonGenericPermission" main-action="DELETE"/>
|
||||
<auto-attributes include="pk" mode="IN" optional="false"/>
|
||||
</service>
|
||||
<service name="linkGeos" engine="simple" auth="true"
|
||||
location="component://common/script/org/ofbiz/common/CommonServices.xml" invoke="linkGeos">
|
||||
<description>Link Geos to another Geo</description>
|
||||
|
||||
@@ -2395,6 +2395,10 @@
|
||||
<value xml:lang="zh">通用Java线程</value>
|
||||
<value xml:lang="zh-TW">通用JAVA執行緒</value>
|
||||
</property>
|
||||
<property key="WebtoolsGeoAssocList">
|
||||
<value xml:lang="en">List GeoAssoc</value>
|
||||
<value xml:lang="fr">Lister les relations de zone géographique</value>
|
||||
</property>
|
||||
<property key="WebtoolsGeoCreateNew">
|
||||
<value xml:lang="en">Create/Edit Geo</value>
|
||||
<value xml:lang="fr">Créer/Modifier une zone géographique</value>
|
||||
|
||||
@@ -567,6 +567,12 @@ under the License.
|
||||
</response>
|
||||
<response name="error" type="view" value="FindGeo"/>
|
||||
</request-map>
|
||||
<request-map uri="deleteGeoAssoc">
|
||||
<security https="true" auth="true"/>
|
||||
<event type="service" invoke="deleteGeoAssoc"/>
|
||||
<response name="success" type="view" value="EditGeo"/>
|
||||
<response name="error" type="view" value="EditGeo"/>
|
||||
</request-map>
|
||||
<request-map uri="linkGeos">
|
||||
<security https="true" auth="true"/>
|
||||
<event type="service" path="" invoke="linkGeos"/>
|
||||
|
||||
@@ -132,5 +132,33 @@
|
||||
</field>
|
||||
<field name="submitButton" title="${uiLabelMap.CommonSubmit}" widget-style="smallSubmit"><submit button-type="button"/></field>
|
||||
</form>
|
||||
|
||||
<grid name="ListGeoAssoc" list-name="listIt" paginate-target="EditGeo" target="deleteGeoAssoc"
|
||||
odd-row-style="alternate-row" header-row-style="header-row-2" default-table-style="basic-table hover-bar">
|
||||
<actions>
|
||||
<entity-and entity-name="GeoAssoc" list="listIt">
|
||||
<field-map field-name="geoId"/>
|
||||
</entity-and>
|
||||
</actions>
|
||||
<row-actions>
|
||||
<entity-one entity-name="Geo" value-field="geoTo">
|
||||
<field-map field-name="geoId" from-field="geoIdTo"/>
|
||||
</entity-one>
|
||||
</row-actions>
|
||||
<field name="geoId"><hidden/></field>
|
||||
<field name="geoIdTo" title="${uiLabelMap.CommonGeo}">
|
||||
<display-entity entity-name="Geo" key-field-name="geoId" description="${geoName}">
|
||||
<sub-hyperlink target="EditGeo" description="[${geoIdTo}]">
|
||||
<parameter param-name="geoId" from-field="geoIdTo"/>
|
||||
</sub-hyperlink>
|
||||
</display-entity>
|
||||
</field>
|
||||
<field name="geoTypeId" map-name="geoTo" title="${uiLabelMap.CommonGeoTypeId}">
|
||||
<display-entity entity-name="GeoType"/>
|
||||
</field>
|
||||
<field name="geoAssocTypeId" title="${uiLabelMap.CommonGeoAssocTypeId}">
|
||||
<display-entity entity-name="GeoAssocType" key-field-name="geoAssocTypeId"/>
|
||||
</field>
|
||||
<field name="delete" title="${uiLabelMap.CommonDelete}"><submit/></field>
|
||||
</grid>
|
||||
|
||||
</forms>
|
||||
|
||||
@@ -90,6 +90,9 @@
|
||||
<screenlet title="${uiLabelMap.WebtoolsGeoEdit}">
|
||||
<include-form name="EditGeo" location="component://webtools/widget/GeoManagementForms.xml"/>
|
||||
</screenlet>
|
||||
<screenlet title="${uiLabelMap.WebtoolsGeoAssocList}">
|
||||
<include-grid name="ListGeoAssoc" location="component://webtools/widget/GeoManagementForms.xml"/>
|
||||
</screenlet>
|
||||
</decorator-section>
|
||||
</decorator-screen>
|
||||
</widgets>
|
||||
|
||||
Reference in New Issue
Block a user