svn commit: r1682295 - in /ofbiz/trunk/applications/content: config/ContentUiLabels.xml webapp/content/WEB-INF/controller.xml widget/CommonScreens.xml widget/WebSiteScreens.xml widget/content/ContentMenus.xml widget/website/WebSiteForms.xml

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
1 message Options
Reply | Threaded
Open this post in threaded view
|

svn commit: r1682295 - in /ofbiz/trunk/applications/content: config/ContentUiLabels.xml webapp/content/WEB-INF/controller.xml widget/CommonScreens.xml widget/WebSiteScreens.xml widget/content/ContentMenus.xml widget/website/WebSiteForms.xml

mbrohl
Author: mbrohl
Date: Thu May 28 18:10:51 2015
New Revision: 1682295

URL: http://svn.apache.org/r1682295
Log:
Manually applied patch from jira issue OFBIZ-5679: Functionality to add WebSitePathAlias records is missing.
This adds a "Create Website Path Alias" menu item to the WebSiteAliases view and allows to edit/delete teh entries.

Thanks Pierre Smits for reporting the issue and Willem Janssen for providing the patch.

Modified:
    ofbiz/trunk/applications/content/config/ContentUiLabels.xml
    ofbiz/trunk/applications/content/webapp/content/WEB-INF/controller.xml
    ofbiz/trunk/applications/content/widget/CommonScreens.xml
    ofbiz/trunk/applications/content/widget/WebSiteScreens.xml
    ofbiz/trunk/applications/content/widget/content/ContentMenus.xml
    ofbiz/trunk/applications/content/widget/website/WebSiteForms.xml

Modified: ofbiz/trunk/applications/content/config/ContentUiLabels.xml
URL: http://svn.apache.org/viewvc/ofbiz/trunk/applications/content/config/ContentUiLabels.xml?rev=1682295&r1=1682294&r2=1682295&view=diff
==============================================================================
--- ofbiz/trunk/applications/content/config/ContentUiLabels.xml (original)
+++ ofbiz/trunk/applications/content/config/ContentUiLabels.xml Thu May 28 18:10:51 2015
@@ -3696,6 +3696,11 @@
         <value xml:lang="zh">联系方式列表视图</value>
         <value xml:lang="zh-TW">聯絡清單檢視</value>
     </property>
+    <property key="ContentWebSitePathAliasCreate">
+        <value xml:lang="de">Neuen Pfad Alias erstellen</value>
+        <value xml:lang="en">Create New Path Alias</value>
+        <value xml:lang="nl">Aanmaken Nieuwe Path Alias</value>
+    </property>  
     <property key="ContentWebSiteContent">
         <value xml:lang="da">Webside indhold</value>
         <value xml:lang="de">Webseite Inhalt</value>
@@ -7382,6 +7387,11 @@
         <value xml:lang="zh">站点列表</value>
         <value xml:lang="zh-TW">網站清單</value>
     </property>
+    <property key="PageTitleEditWebSitePathAlias">
+        <value xml:lang="de">WebSite Pfad Alias bearbeiten</value>
+        <value xml:lang="en">Edit WebSite Path Alias</value>
+        <value xml:lang="nl">Wijzigen WebSite Path Alias</value>
+    </property>
     <property key="PageTitleLookupContent">
         <value xml:lang="ar">البحث عن المحتوى</value>
         <value xml:lang="da">Søg indhold</value>

Modified: ofbiz/trunk/applications/content/webapp/content/WEB-INF/controller.xml
URL: http://svn.apache.org/viewvc/ofbiz/trunk/applications/content/webapp/content/WEB-INF/controller.xml?rev=1682295&r1=1682294&r2=1682295&view=diff
==============================================================================
--- ofbiz/trunk/applications/content/webapp/content/WEB-INF/controller.xml (original)
+++ ofbiz/trunk/applications/content/webapp/content/WEB-INF/controller.xml Thu May 28 18:10:51 2015
@@ -355,6 +355,28 @@ under the License.
         <security https="true" auth="true"/>
         <response name="success" type="view" value="WebSiteAliasesSearchResults"/>
     </request-map>
+    <request-map uri="EditWebSitePathAlias">
+        <security https="true" auth="true"/>
+        <response name="success" type="view" value="EditWebSitePathAlias"/>
+    </request-map>
+    <request-map uri="createWebSitePathAlias">
+        <security https="true" auth="true"/>
+        <event type="service" path="" invoke="createWebSitePathAlias"/>
+        <response name="success" type="view" value="WebSiteAliases"/>
+        <response name="error" type="view" value="EditWebSitePathAlias"/>
+    </request-map>
+    <request-map uri="updateWebSitePathAlias">
+        <security https="true" auth="true"/>
+        <event type="service" path="" invoke="updateWebSitePathAlias"/>
+        <response name="success" type="view" value="WebSiteAliases"/>
+        <response name="error" type="view" value="EditWebSitePathAlias"/>
+    </request-map>
+    <request-map uri="removeWebSitePathAlias">
+        <security https="true" auth="true"/>
+        <event type="service" invoke="removeWebSitePathAlias"/>
+        <response name="success" type="request" value="WebSiteAliases"/>
+        <response name="error" type="request" value="WebSiteAliases"/>
+    </request-map>
 
     <!-- ================ WebSite CMS Requests ================= -->
     <request-map uri="WebSiteCms">
@@ -1949,6 +1971,7 @@ under the License.
     <view-map name="EditWebSite" page="component://content/widget/WebSiteScreens.xml#EditWebSite" type="screen"/>
     <view-map name="WebSiteAliases" page="component://content/widget/WebSiteScreens.xml#WebSiteAliases" type="screen"/>
     <view-map name="WebSiteAliasesSearchResults" page="component://content/widget/WebSiteScreens.xml#WebSiteAliasesSearchResults" type="screen"/>
+    <view-map name="EditWebSitePathAlias" type="screen" page="component://content/widget/WebSiteScreens.xml#EditWebSitePathAlias"/>
     <view-map name="WebSiteContent" page="component://content/widget/WebSiteScreens.xml#WebSiteContent" type="screen"/>
     <view-map name="WebSiteCMS" page="component://content/widget/WebSiteScreens.xml#WebSiteCMS" type="screen"/>
     <view-map name="WebSiteCMSContent" page="component://content/widget/WebSiteScreens.xml#WebSiteCMSContent" type="screen"/>

Modified: ofbiz/trunk/applications/content/widget/CommonScreens.xml
URL: http://svn.apache.org/viewvc/ofbiz/trunk/applications/content/widget/CommonScreens.xml?rev=1682295&r1=1682294&r2=1682295&view=diff
==============================================================================
--- ofbiz/trunk/applications/content/widget/CommonScreens.xml (original)
+++ ofbiz/trunk/applications/content/widget/CommonScreens.xml Thu May 28 18:10:51 2015
@@ -351,6 +351,51 @@ under the License.
         </section>
     </screen>
 
+    <screen name="CommonWebSitePathAliasDecorator">
+        <section>
+            <actions>
+                <set field="headerItem" value="websites"/>
+            </actions>
+            <widgets>
+                <decorator-screen name="main-decorator" location="component://content/widget/CommonScreens.xml">
+                    <decorator-section name="pre-body">
+                        <section>
+                            <condition>
+                                <and>
+                                    <if-has-permission permission="CONTENTMGR" action="_VIEW"/>
+                                    <not><if-empty field="parameters.webSiteId"/></not>
+                                </and>
+                            </condition>
+                            <widgets>
+                                <include-menu name="website" location="component://content/widget/content/ContentMenus.xml"/>
+                            </widgets>
+                        </section>
+                    </decorator-section>
+                    <decorator-section name="body">
+                        <section>
+                            <condition>
+                                <if-has-permission permission="CONTENTMGR" action="_VIEW"/>
+                            </condition>
+                            <widgets>
+                                <!--<container style="button-bar">
+                                    <link  text="${uiLabelMap.ContentCreateNewWebSite}" target="EditWebSite" style="buttontext create"/>
+                                </container>-->
+                                <container>
+                                    <include-menu name="websitePathAliasMenu" location="component://content/widget/content/ContentMenus.xml"/>
+                                </container>
+                                <label style="h1" text="${uiLabelMap[labelTitleProperty]} ${uiLabelMap.CommonFor}: ${webSite.siteName} [${webSite.webSiteId}]  ${${extraFunctionName}}"/>
+                                <decorator-section-include name="body"/>
+                            </widgets>
+                            <fail-widgets>
+                                <label style="h3">${uiLabelMap.ContentViewPermissionError}</label>
+                            </fail-widgets>
+                        </section>
+                    </decorator-section>
+                </decorator-screen>
+            </widgets>
+        </section>
+    </screen>
+
     <screen name="commonLayoutDecorator">
         <section>
             <actions>

Modified: ofbiz/trunk/applications/content/widget/WebSiteScreens.xml
URL: http://svn.apache.org/viewvc/ofbiz/trunk/applications/content/widget/WebSiteScreens.xml?rev=1682295&r1=1682294&r2=1682295&view=diff
==============================================================================
--- ofbiz/trunk/applications/content/widget/WebSiteScreens.xml (original)
+++ ofbiz/trunk/applications/content/widget/WebSiteScreens.xml Thu May 28 18:10:51 2015
@@ -221,7 +221,7 @@ under the License.
                 <set field="parameters.fromDate" type="Timestamp" from-field="parameters.fromDate"/>
                 <entity-condition list="assocs" entity-name="ContentAssoc">
                     <condition-list>
-                        <condition-expr field-name="contentId" from-field="parameters.contentIdFrom"/>
+                        <condition-expr field-name="contentId" from-field="parameters.contentIdFrom" ignore-if-empty="true"/>
                         <condition-expr field-name="contentIdTo" from-field="parameters.contentId"/>
                         <condition-expr field-name="fromDate" from-field="parameters.fromDate" ignore-if-empty="true"/>
                         <condition-expr field-name="contentAssocTypeId" from-field="parameters.contentAssocTypeId" ignore-if-empty="true"/>
@@ -310,7 +310,7 @@ under the License.
             </widgets>
         </section>
     </screen>
-
+    
     <screen name="WebSiteCMSPathAlias">
         <section>
             <actions>
@@ -337,17 +337,45 @@ under the License.
             </widgets>
         </section>
     </screen>
+    <screen name="EditWebSitePathAlias">
+        <section>
+            <actions>
+                <set field="titleProperty" value="PageTitleEditWebSitePathAlias"/>
+                <set field="tabButtonItem" value="PathAlias"/>
+                <set field="labelTitleProperty" value="PageTitleEditWebSitePathAlias"/>
+                <set field="webSiteId" from-field="parameters.webSiteId"/>
+                <entity-one entity-name="WebSitePathAlias" value-field="webSitePathAlias"/>
+                 <entity-one entity-name="WebSite" value-field="webSite"/>
+            </actions>
+            <widgets>
+                <decorator-screen name="CommonWebSitePathAliasDecorator" location="${parameters.mainDecoratorLocation}">
+                    <decorator-section name="body">
+                        <section>
+                            <widgets>
+                                <screenlet title="${uiLabelMap.PageTitleEditWebSitePathAlias}">
+                                    <include-form name="EditWebSitePathAlias" location="component://content/widget/website/WebSiteForms.xml"/>
+                                </screenlet>
+                            </widgets>
+                        </section>
+                    </decorator-section>
+                </decorator-screen>
+            </widgets>
+        </section>
+    </screen>
+      
     <screen name="WebSiteAliases">
         <section>
             <actions>
-                <set field="titleProperty" value="ContentPathAlias"/>
+                <set field="titleProperty" value="PageTitleEditWebSitePathAlias"/>
+                <set field="labelTitleProperty" value="PageTitleEditWebSitePathAlias"/>
                 <set field="webSiteId" from-field="parameters.webSiteId"/>
                 <set field="tabButtonItem" value="PathAlias"/>
                 <set field="viewIndex" from-field="requestParameters.VIEW_INDEX" type="Integer"/>
                 <set field="viewSize" from-field="requestParameters.VIEW_SIZE" type="Integer" default-value="30"/>
+                <entity-one entity-name="WebSite" value-field="webSite"/>
             </actions>
             <widgets>
-                <decorator-screen name="CommonWebSiteDecorator" location="${parameters.mainDecoratorLocation}">
+                <decorator-screen name="CommonWebSitePathAliasDecorator" location="${parameters.mainDecoratorLocation}">
                     <decorator-section name="body">
                         <decorator-screen name="FindScreenDecorator" location="component://common/widget/CommonScreens.xml">
                             <decorator-section name="search-options">
@@ -362,6 +390,7 @@ under the License.
             </widgets>
         </section>
     </screen>
+    
     <screen name="WebSiteAliasesSearchResults">
         <section>
             <actions>

Modified: ofbiz/trunk/applications/content/widget/content/ContentMenus.xml
URL: http://svn.apache.org/viewvc/ofbiz/trunk/applications/content/widget/content/ContentMenus.xml?rev=1682295&r1=1682294&r2=1682295&view=diff
==============================================================================
--- ofbiz/trunk/applications/content/widget/content/ContentMenus.xml (original)
+++ ofbiz/trunk/applications/content/widget/content/ContentMenus.xml Thu May 28 18:10:51 2015
@@ -291,6 +291,11 @@ under the License.
             <link target="EditWebSite"/>
         </menu-item>
     </menu>
+    <menu name="websitePathAliasMenu" menu-container-style="button-bar button-style-2" default-selected-style="selected">
+        <menu-item name="EditWebSitePathAlias" title="${uiLabelMap.ContentWebSitePathAliasCreate}" widget-style="buttontext create">
+            <link target="EditWebSitePathAlias?webSiteId=${webSiteId}"/>
+        </menu-item>
+    </menu>    
     <!-- Web Analytics -->
     <menu name="WebAnalyticsConfigButtonBar" extends="CommonButtonBarMenu" extends-resource="component://common/widget/CommonMenus.xml" selected-menuitem-context-field-name="tabButtonItem2">
         <menu-item name="EditWebAnalyticsConfig" title="${uiLabelMap.CommonCreate}">

Modified: ofbiz/trunk/applications/content/widget/website/WebSiteForms.xml
URL: http://svn.apache.org/viewvc/ofbiz/trunk/applications/content/widget/website/WebSiteForms.xml?rev=1682295&r1=1682294&r2=1682295&view=diff
==============================================================================
--- ofbiz/trunk/applications/content/widget/website/WebSiteForms.xml (original)
+++ ofbiz/trunk/applications/content/widget/website/WebSiteForms.xml Thu May 28 18:10:51 2015
@@ -92,8 +92,10 @@ under the License.
                 <field-map field-name="viewSize" from-field="viewSize"/>
             </service>
         </actions>
-        <field name="pathAlias" sort-field="true"><display/></field>
-        <field name="pathAliasTo" sort-field="true"><display/></field>
+        <field name="pathAlias" sort-field="true" widget-style="buttontext">
+            <hyperlink target="EditWebSitePathAlias?webSiteId=${webSiteId}&amp;pathAlias=${pathAlias}" description="${pathAlias}"></hyperlink>
+        </field>        
+        <field name="aliasTo" sort-field="true"><display/></field>
         <field name="mapKey" sort-field="true"><display/></field>
         <field name="contentId" sort-field="true">
             <display-entity entity-name="Content" description="${contentName}">
@@ -102,9 +104,30 @@ under the License.
                 </sub-hyperlink>
             </display-entity>
         </field>
+        <field name="deleteLink" title=" " widget-style="buttontext">
+            <hyperlink target="removeWebSitePathAlias" description="${uiLabelMap.CommonDelete}" also-hidden="false">
+              <parameter param-name="webSiteId"/>
+              <parameter param-name="pathAlias"/>
+            </hyperlink>
+        </field>        
         <on-event-update-area event-type="paginate" area-id="search-results" area-target="WebSiteAliasesSearchResults"/>
     </form>
 
+    <form name="EditWebSitePathAlias" type="single" target="updateWebSitePathAlias" title="" default-map-name="webSitePathAlias"
+        header-row-style="header-row" default-table-style="basic-table" default-entity-name="WebSitePathAlias">
+  
+        <alt-target use-when="webSitePathAlias==null" target="createWebSitePathAlias"/>
+
+        <auto-fields-service service-name="updateWebSitePathAlias" map-name=""/>
+        
+        <field name="webSiteId"><display/></field>      
+        <field name="pathAlias" use-when="webSitePathAlias!=null"><display/></field>
+        <field name="pathAlias" use-when="webSitePathAlias==null"><text/></field>
+      
+        <field name="submitButton" use-when="webSitePathAlias!=null" title="${uiLabelMap.CommonUpdate}" widget-style="smallSubmit"><submit button-type="button"/></field>
+        <field name="submitButton" use-when="webSitePathAlias==null" title="${uiLabelMap.CommonCreate}" widget-style="smallSubmit"><submit button-type="button"/></field>
+    </form>
+    
     <!-- WebSite Content Forms -->
     <form name="ListWebSiteContent" type="list" list-name="webSiteContent" target="UpdateWebSiteContent"
         paginate-target="ListWebSiteContent" paginate="true" odd-row-style="alternate-row" default-table-style="basic-table hover-bar">