added website list to editcontent, added some sort statements

git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@731165 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
Hans Bakker
2009-01-04 04:05:48 +00:00
parent 097ae9c3e0
commit b41ac9cc9b
7 changed files with 81 additions and 11 deletions
@@ -1523,6 +1523,19 @@ under the License.
<key-map field-name="webSiteContentTypeId"/>
</relation>
</entity>
<view-entity entity-name="WebSiteAndContent"
package-name="org.ofbiz.content.website"
title="Web Sites by contentId">
<member-entity entity-alias="WS" entity-name="WebSite"/>
<member-entity entity-alias="WSCT" entity-name="WebSiteContent"/>
<alias-all entity-alias="WS"/>
<alias-all entity-alias="WSCT">
<exclude field="webSiteId"/>
</alias-all>
<view-link entity-alias="WS" rel-entity-alias="WSCT">
<key-map field-name="webSiteId"/>
</view-link>
</view-entity>
<entity entity-name="WebSiteContentType"
package-name="org.ofbiz.content.website"
title="Web Site Content Type">
@@ -173,6 +173,7 @@ under the License.
<!-- ================ WebSite Requests ================= -->
<request-map uri="FindWebSite"><security https="true" auth="true"/><response name="success" type="view" value="FindWebSite"/></request-map>
<request-map uri="ListWebSite"><security https="true" auth="true"/><response name="success" type="view" value="ListWebSite"/></request-map>
<request-map uri="EditWebSite"><security https="true" auth="true"/><response name="success" type="view" value="EditWebSite"/></request-map>
<request-map uri="createWebSite">
<security https="true" auth="true"/>
@@ -1686,6 +1687,7 @@ under the License.
<view-map name="findContentSearchResults" type="screen" page="component://content/widget/content/ContentScreens.xml#findContentSearchResults"/>
<view-map name="EditContent" page="component://content/widget/content/ContentScreens.xml#EditContent" type="screen"/>
<view-map name="EditContentAssoc" page="component://content/widget/content/ContentScreens.xml#EditContentAssoc" type="screen"/>
<view-map name="ListWebSite" page="component://content/widget/content/ContentScreens.xml#ListWebSite" type="screen"/>
<view-map name="EditContentAttribute" page="component://content/widget/content/ContentScreens.xml#EditContentAttribute" type="screen"/>
<view-map name="EditContentMetaData" page="component://content/widget/content/ContentScreens.xml#EditContentMetaData" type="screen"/>
@@ -54,6 +54,7 @@ under the License.
<hyperlink description="${webSiteId}" target="EditWebSite?webSiteId=${webSiteId}" also-hidden="false"/>
</field>
<field name="siteName" title="${uiLabelMap.CommonName}"><display/></field>
<field name="httpHost"><display/></field>
</form>
<!-- WebSite Content Forms -->
@@ -240,7 +240,9 @@ under the License.
</field>
<field name="contentAssocTypeId">
<drop-down allow-empty="true">
<entity-options description="${description}" entity-name="ContentAssocType"/>
<entity-options description="${description}" entity-name="ContentAssocType">
<entity-order-by field-name="description"/>
</entity-options>
</drop-down>
</field>
<field name="metaDataPredicateId">
@@ -356,7 +358,9 @@ under the License.
<field name="contentId" title="${uiLabelMap.CommonEmptyHeader}" widget-style="buttontext" ><lookup target-form-name="LookupContent"/></field>
<field name="contentPurposeTypeId">
<drop-down allow-empty="true">
<entity-options description="${description}" entity-name="ContentPurposeType" key-field-name="contentPurposeTypeId"/>
<entity-options description="${description}" entity-name="ContentPurposeType" key-field-name="contentPurposeTypeId">
<entity-order-by field-name="description"/>
</entity-options>
</drop-down>
</field>
<field name="submitButton" title="${uiLabelMap.CommonAdd}" widget-style="smallSubmit"><submit button-type="button"/></field>
@@ -413,6 +417,11 @@ under the License.
</field>
<field name="submitButton" title="${uiLabelMap.CommonAdd}" widget-style="smallSubmit"><submit button-type="button"/></field>
</form>
<form name="ListWebSites" paginate-target="ListWebSite" paginate="true" extends="ListWebSites" extends-resource="component://content/webapp/content/website/WebSiteForms.xml">
<field name="webSiteContentTypeId"><display-entity entity-name="WebSiteContentType" description="${description}"/></field>
<field name="fromDate"><display type="date"/></field>
<field name="thruDate"><display type="date"/></field>
</form>
<form name="ListContentMetaData" target="updateContentMetaData" title="" type="list"
odd-row-style="alternate-row" header-row-style="header-row-2" default-table-style="basic-table hover-bar">
<actions>
@@ -63,28 +63,35 @@ under the License.
<if-empty field-name="currentValue.contentId" />
</not>
</condition>
<link target="EditContentPurpose?contentId=${contentId}"/>
<link target="EditContentPurpose?contentId=${parameters.contentId}"/>
</menu-item>
<menu-item name="attribute" title="${uiLabelMap.ContentAttribute}" >
<condition>
<not><if-empty field-name="currentValue.contentId"/></not>
</condition>
<link target="EditContentAttribute?contentId=${contentId}"/>
<link target="EditContentAttribute?contentId=${parameters.contentId}"/>
</menu-item>
<menu-item name="websites" title="${uiLabelMap.ContentWebSites}">
<condition>
<not><if-empty field-name="currentValue.contentId"/></not>
</condition>
<link target="ListWebSite?contentId=${parameters.contentId}"/>
</menu-item>
<menu-item name="metaData" title="${uiLabelMap.ContentMetadata}" >
<condition>
<not><if-empty field-name="currentValue.contentId"/></not>
</condition>
<link target="EditContentMetaData?contentId=${contentId}"/>
<link target="EditContentMetaData?contentId=${parameters.contentId}"/>
</menu-item>
<menu-item name="workEffort" title="${uiLabelMap.WorkEffortWorkEffort}" >
<condition>
<not><if-empty field-name="currentValue.contentId"/></not>
</condition>
<link target="EditContentWorkEfforts?contentId=${contentId}"/>
<link target="EditContentWorkEfforts?contentId=${parameters.contentId}"/>
</menu-item>
</menu>
@@ -278,6 +278,41 @@ under the License.
</section>
</screen>
<screen name="ListWebSite">
<section>
<actions>
<set field="titleProperty" value="PageTitleFindWebSite"/>
<set field="labelTitleProperty" value="PageTitleFindWebSite"/>
<set field="tabButtonItem" value="websites"/>
<entity-condition entity-name="WebSiteAndContent" list-name="webSites">
<condition-expr field-name="contentId" env-name="parameters.contentId"/>
<order-by field-name="webSiteId"/>
</entity-condition>
<entity-one entity-name="Content" value-name="currentValue">
<field-map field-name="contentId" env-name="parameters.contentId"/>
</entity-one>
</actions>
<widgets>
<decorator-screen name="commonContentDecorator" location="${parameters.mainDecoratorLocation}">
<decorator-section name="body">
<section>
<condition>
<if-has-permission permission="CONTENTMGR" action="_VIEW"/>
</condition>
<widgets>
<screenlet title="${uiLabelMap.PageTitleListWebSite}">
<include-form name="ListWebSites" location="component://content/widget/content/ContentForms.xml"/>
</screenlet>
</widgets>
<fail-widgets>
<label style="h3">${uiLabelMap.ContentViewPermissionError}</label>
</fail-widgets>
</section>
</decorator-section>
</decorator-screen>
</widgets>
</section>
</screen>
<screen name="EditContentMetaData">
<section>
@@ -85,7 +85,7 @@ under the License.
header-row-style="header-row" default-table-style="basic-table">
<auto-fields-entity entity-name="DataResource" default-field-type="find"/>
<field name="noConditionFind"><hidden value="Y"/></field>
<field name="submitButton" title="Lookup" widget-style="smallSubmit"><submit button-type="button"/></field>
<sort-order>
<field-group>
<sort-field name="dataResourceId"/>
@@ -112,7 +112,6 @@ under the License.
</field-group>
</sort-order>
<field name="submitButton" title="Lookup" widget-style="smallSubmit"><submit button-type="button"/></field>
</form>
<form name="ListLookupDataResource" extends="ListDataResource" list-name="listIt" type="list" paginate-target="LookupDataResource"
odd-row-style="alternate-row" default-table-style="basic-table hover-bar">
@@ -150,12 +149,16 @@ under the License.
<field use-when="currentValue==null&amp;&amp;dataResourceId!=null" name="dataResourceId" widget-style="tabletext"><display description="${uiLabelMap.CommonCannotBeFound}: [${dataResourceId}]" also-hidden="false"/></field>
<field name="dataResourceTypeId">
<drop-down allow-empty="true">
<entity-options description="${description}" entity-name="DataResourceType" key-field-name="dataResourceTypeId"/>
<entity-options description="${description}" entity-name="DataResourceType" key-field-name="dataResourceTypeId">
<entity-order-by field-name="description"/>
</entity-options>
</drop-down>
</field>
<field name="dataTemplateTypeId">
<drop-down allow-empty="true">
<entity-options description="${description}" entity-name="DataTemplateType" key-field-name="dataTemplateTypeId"/>
<entity-options description="${description}" entity-name="DataTemplateType" key-field-name="dataTemplateTypeId">
<entity-order-by field-name="description"/>
</entity-options>
</drop-down>
</field>
<field name="statusId" use-when="currentValue==null"><ignored/></field>