You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@ofbiz.apache.org by sa...@apache.org on 2011/07/08 13:21:54 UTC
svn commit: r1144267 - in /ofbiz/trunk/applications/content:
webapp/content/WEB-INF/controller.xml
webapp/content/website/WebSiteForms.xml widget/WebSiteScreens.xml
Author: sascharodekamp
Date: Fri Jul 8 11:21:53 2011
New Revision: 1144267
URL: http://svn.apache.org/viewvc?rev=1144267&view=rev
Log:
Filtering and Sorting of WebSite Path Aliases (https://issues.apache.org/jira/browse/OFBIZ-4334) - Patch from Manuela Gruendlinger
When using lots of WebSite Path Aliases, it is quite hard to find a specific Path Alias in a list with about 30 pages. Searching for a path alias and sorting the results would really help here.
Added patch that allows searching for path alias and sorting the list.
Modified:
ofbiz/trunk/applications/content/webapp/content/WEB-INF/controller.xml
ofbiz/trunk/applications/content/webapp/content/website/WebSiteForms.xml
ofbiz/trunk/applications/content/widget/WebSiteScreens.xml
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=1144267&r1=1144266&r2=1144267&view=diff
==============================================================================
--- ofbiz/trunk/applications/content/webapp/content/WEB-INF/controller.xml (original)
+++ ofbiz/trunk/applications/content/webapp/content/WEB-INF/controller.xml Fri Jul 8 11:21:53 2011
@@ -358,6 +358,10 @@ under the License.
<security https="true" auth="true"/>
<response name="success" type="view" value="WebSiteAliases"/>
</request-map>
+ <request-map uri="WebSiteAliasesSearchResults">
+ <security https="true" auth="true"/>
+ <response name="success" type="view" value="WebSiteAliasesSearchResults"/>
+ </request-map>
<!-- ================ WebSite CMS Requests ================= -->
<request-map uri="WebSiteCms">
@@ -1894,6 +1898,7 @@ under the License.
<view-map name="FindWebSite" page="component://content/widget/WebSiteScreens.xml#FindWebSite" type="screen"/>
<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="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/webapp/content/website/WebSiteForms.xml
URL: http://svn.apache.org/viewvc/ofbiz/trunk/applications/content/webapp/content/website/WebSiteForms.xml?rev=1144267&r1=1144266&r2=1144267&view=diff
==============================================================================
--- ofbiz/trunk/applications/content/webapp/content/website/WebSiteForms.xml (original)
+++ ofbiz/trunk/applications/content/webapp/content/website/WebSiteForms.xml Fri Jul 8 11:21:53 2011
@@ -74,18 +74,35 @@ under the License.
<field name="httpHost" sort-field="true"><display/></field>
</form>
- <form name="WebSitePathAlias" target="" title="" type="list" list-name="aliases" paginate-target="WebSiteAliases" paginate="true"
- odd-row-style="alternate-row" default-table-style="basic-table hover-bar">
- <field name="pathAlias"><display/></field>
- <field name="pathAliasTo"><display/></field>
- <field name="mapKey"><display/></field>
- <field name="contentId">
+ <form name="FindWebSitePathAlias" target="WebSiteAliases" type="single" header-row-style="header-row" default-table-style="basic-table">
+ <field name="noConditionFind"><hidden value="Y"/><!-- if this isn't there then with all fields empty no query will be done --></field>
+ <field name="webSiteId"><hidden value="${webSiteId}"/></field>
+ <field name="pathAlias"><text-find ignore-case="true"/></field>
+ <field name="searchButton" title="${uiLabelMap.CommonFind}" widget-style="smallSubmit"><submit button-type="button"/></field>
+ </form>
+
+ <form name="ListWebSitePathAlias" target="" title="" list-name="listIt" type="list" paginate-target="WebSiteAliases"
+ odd-row-style="alternate-row" header-row-style="header-row-2" default-table-style="basic-table hover-bar">
+ <actions>
+ <service service-name="performFind" result-map="result" result-map-list="listIt">
+ <field-map field-name="inputFields" from-field="parameters"/>
+ <field-map field-name="entityName" value="WebSitePathAlias"/>
+ <field-map field-name="orderBy" from-field="parameters.sortField"/>
+ <field-map field-name="viewIndex" from-field="viewIndex"/>
+ <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="mapKey" sort-field="true"><display/></field>
+ <field name="contentId" sort-field="true">
<display-entity entity-name="Content" description="${contentName}">
<sub-hyperlink target="EditContent" description=" [${contentId}]">
<parameter param-name="contentId"/>
</sub-hyperlink>
</display-entity>
</field>
+ <on-event-update-area event-type="paginate" area-id="search-results" area-target="WebSiteAliasesSearchResults"/>
</form>
<!-- WebSite Content Forms -->
Modified: ofbiz/trunk/applications/content/widget/WebSiteScreens.xml
URL: http://svn.apache.org/viewvc/ofbiz/trunk/applications/content/widget/WebSiteScreens.xml?rev=1144267&r1=1144266&r2=1144267&view=diff
==============================================================================
--- ofbiz/trunk/applications/content/widget/WebSiteScreens.xml (original)
+++ ofbiz/trunk/applications/content/widget/WebSiteScreens.xml Fri Jul 8 11:21:53 2011
@@ -337,21 +337,34 @@ under the License.
<actions>
<set field="titleProperty" value="ContentPathAlias"/>
<set field="webSiteId" from-field="parameters.webSiteId"/>
- <entity-one entity-name="WebSite" value-field="webSite"/>
<set field="tabButtonItem" value="PathAlias"/>
- <entity-and entity-name="WebSitePathAlias" list="aliases">
- <field-map field-name="webSiteId" from-field="parameters.webSiteId"/>
- </entity-and>
+ <set field="viewIndex" from-field="requestParameters.VIEW_INDEX" type="Integer"/>
+ <set field="viewSize" from-field="requestParameters.VIEW_SIZE" type="Integer" default-value="30"/>
</actions>
<widgets>
<decorator-screen name="CommonWebSiteDecorator" location="${parameters.mainDecoratorLocation}">
<decorator-section name="body">
- <screenlet title="${uiLabelMap.ContentPathAliasList}" navigation-form-name="WebSitePathAlias">
- <include-form name="WebSitePathAlias" location="component://content/webapp/content/website/WebSiteForms.xml"/>
- </screenlet>
+ <decorator-screen name="FindScreenDecorator" location="component://common/widget/CommonScreens.xml">
+ <decorator-section name="search-options">
+ <include-form name="FindWebSitePathAlias" location="component://content/webapp/content/website/WebSiteForms.xml"/>
+ </decorator-section>
+ <decorator-section name="search-results">
+ <include-form name="ListWebSitePathAlias" location="component://content/webapp/content/website/WebSiteForms.xml"/>
+ </decorator-section>
+ </decorator-screen>
</decorator-section>
</decorator-screen>
</widgets>
</section>
</screen>
+ <screen name="WebSiteAliasesSearchResults">
+ <section>
+ <actions>
+ <set field="webSiteId" from-field="parameters.webSiteId"/>
+ </actions>
+ <widgets>
+ <include-form name="ListWebSitePathAlias" location="component://content/webapp/content/website/WebSiteForms.xml"/>
+ </widgets>
+ </section>
+ </screen>
</screens>