You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@ofbiz.apache.org by jl...@apache.org on 2015/06/24 15:10:00 UTC

svn commit: r1687259 - in /ofbiz/trunk/framework: common/config/ common/entitydef/ common/servicedef/ webtools/config/ webtools/webapp/webtools/WEB-INF/ webtools/widget/

Author: jleroux
Date: Wed Jun 24 13:10:00 2015
New Revision: 1687259

URL: http://svn.apache.org/r1687259
Log:
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.

Modified:
    ofbiz/trunk/framework/common/config/CommonEntityLabels.xml
    ofbiz/trunk/framework/common/entitydef/entitymodel.xml
    ofbiz/trunk/framework/common/servicedef/services.xml
    ofbiz/trunk/framework/webtools/config/WebtoolsUiLabels.xml
    ofbiz/trunk/framework/webtools/webapp/webtools/WEB-INF/controller.xml
    ofbiz/trunk/framework/webtools/widget/GeoManagementForms.xml
    ofbiz/trunk/framework/webtools/widget/GeoManagementScreens.xml

Modified: ofbiz/trunk/framework/common/config/CommonEntityLabels.xml
URL: http://svn.apache.org/viewvc/ofbiz/trunk/framework/common/config/CommonEntityLabels.xml?rev=1687259&r1=1687258&r2=1687259&view=diff
==============================================================================
--- ofbiz/trunk/framework/common/config/CommonEntityLabels.xml (original)
+++ ofbiz/trunk/framework/common/config/CommonEntityLabels.xml Wed Jun 24 13:10:00 2015
@@ -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>

Modified: ofbiz/trunk/framework/common/entitydef/entitymodel.xml
URL: http://svn.apache.org/viewvc/ofbiz/trunk/framework/common/entitydef/entitymodel.xml?rev=1687259&r1=1687258&r2=1687259&view=diff
==============================================================================
--- ofbiz/trunk/framework/common/entitydef/entitymodel.xml (original)
+++ ofbiz/trunk/framework/common/entitydef/entitymodel.xml Wed Jun 24 13:10:00 2015
@@ -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"/>

Modified: ofbiz/trunk/framework/common/servicedef/services.xml
URL: http://svn.apache.org/viewvc/ofbiz/trunk/framework/common/servicedef/services.xml?rev=1687259&r1=1687258&r2=1687259&view=diff
==============================================================================
--- ofbiz/trunk/framework/common/servicedef/services.xml (original)
+++ ofbiz/trunk/framework/common/servicedef/services.xml Wed Jun 24 13:10:00 2015
@@ -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>

Modified: ofbiz/trunk/framework/webtools/config/WebtoolsUiLabels.xml
URL: http://svn.apache.org/viewvc/ofbiz/trunk/framework/webtools/config/WebtoolsUiLabels.xml?rev=1687259&r1=1687258&r2=1687259&view=diff
==============================================================================
--- ofbiz/trunk/framework/webtools/config/WebtoolsUiLabels.xml (original)
+++ ofbiz/trunk/framework/webtools/config/WebtoolsUiLabels.xml Wed Jun 24 13:10:00 2015
@@ -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>

Modified: ofbiz/trunk/framework/webtools/webapp/webtools/WEB-INF/controller.xml
URL: http://svn.apache.org/viewvc/ofbiz/trunk/framework/webtools/webapp/webtools/WEB-INF/controller.xml?rev=1687259&r1=1687258&r2=1687259&view=diff
==============================================================================
--- ofbiz/trunk/framework/webtools/webapp/webtools/WEB-INF/controller.xml (original)
+++ ofbiz/trunk/framework/webtools/webapp/webtools/WEB-INF/controller.xml Wed Jun 24 13:10:00 2015
@@ -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"/>

Modified: ofbiz/trunk/framework/webtools/widget/GeoManagementForms.xml
URL: http://svn.apache.org/viewvc/ofbiz/trunk/framework/webtools/widget/GeoManagementForms.xml?rev=1687259&r1=1687258&r2=1687259&view=diff
==============================================================================
--- ofbiz/trunk/framework/webtools/widget/GeoManagementForms.xml (original)
+++ ofbiz/trunk/framework/webtools/widget/GeoManagementForms.xml Wed Jun 24 13:10:00 2015
@@ -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>

Modified: ofbiz/trunk/framework/webtools/widget/GeoManagementScreens.xml
URL: http://svn.apache.org/viewvc/ofbiz/trunk/framework/webtools/widget/GeoManagementScreens.xml?rev=1687259&r1=1687258&r2=1687259&view=diff
==============================================================================
--- ofbiz/trunk/framework/webtools/widget/GeoManagementScreens.xml (original)
+++ ofbiz/trunk/framework/webtools/widget/GeoManagementScreens.xml Wed Jun 24 13:10:00 2015
@@ -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>