Author: buscob
Date: Mon Mar 22 21:16:45 2010 New Revision: 926340 URL: http://svn.apache.org/viewvc?rev=926340&view=rev Log: Added a new "Show Content" Portlet. This allows to show a content element in a portalPage. A further improvement of this portlet will be to allow a content element list to be shown given the element's father. Having the application's main page replaced with a portalPage will allow the user to edit this page using the CMS. Added: ofbiz/trunk/applications/content/data/ContentPortletData.xml Modified: ofbiz/trunk/applications/content/ofbiz-component.xml ofbiz/trunk/applications/content/widget/content/ContentForms.xml ofbiz/trunk/applications/content/widget/content/ContentScreens.xml Added: ofbiz/trunk/applications/content/data/ContentPortletData.xml URL: http://svn.apache.org/viewvc/ofbiz/trunk/applications/content/data/ContentPortletData.xml?rev=926340&view=auto ============================================================================== --- ofbiz/trunk/applications/content/data/ContentPortletData.xml (added) +++ ofbiz/trunk/applications/content/data/ContentPortletData.xml Mon Mar 22 21:16:45 2010 @@ -0,0 +1,28 @@ +<?xml version="1.0" encoding="UTF-8"?> +<!-- + Licensed to the Apache Software Foundation (ASF) under one + or more contributor license agreements. See the NOTICE file + distributed with this work for additional information + regarding copyright ownership. The ASF licenses this file + to you under the Apache License, Version 2.0 (the + "License"); you may not use this file except in compliance + with the License. You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, + software distributed under the License is distributed on an + "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY + KIND, either express or implied. See the License for the + specific language governing permissions and limitations + under the License. +--> +<entity-engine-xml> + <PortletCategory portletCategoryId="CONTENT" description="CMS Portlets"/> + + <PortalPortlet portalPortletId="showContent" + portletName="Show Content" description="Shows a content in a Portal page" + screenName="ShowContentPortlet" screenLocation="component://content/widget/content/ContentScreens.xml" + editFormName="EditShowContentPortlet" editFormLocation="component://content/widget/content/ContentForms.xml"/> + <PortletPortletCategory portalPortletId="showContent" portletCategoryId="CONTENT"/> +</entity-engine-xml> \ No newline at end of file Modified: ofbiz/trunk/applications/content/ofbiz-component.xml URL: http://svn.apache.org/viewvc/ofbiz/trunk/applications/content/ofbiz-component.xml?rev=926340&r1=926339&r2=926340&view=diff ============================================================================== --- ofbiz/trunk/applications/content/ofbiz-component.xml (original) +++ ofbiz/trunk/applications/content/ofbiz-component.xml Mon Mar 22 21:16:45 2010 @@ -39,6 +39,7 @@ under the License. <entity-resource type="data" reader-name="seed" loader="main" location="data/MiscData.xml"/> <entity-resource type="data" reader-name="seed" loader="main" location="data/ContentHelpData.xml"/> <entity-resource type="data" reader-name="seed" loader="main" location="data/ContentHttpErrorData.xml"/> + <entity-resource type="data" reader-name="seed" loader="main" location="data/ContentPortletData.xml"/> <!-- these files cannot be loaded in their original component because they are earlier than the content component --> <entity-resource type="data" reader-name="seed" loader="main" location="data/PartyHelpData.xml"/> <entity-resource type="data" reader-name="seed" loader="main" location="data/WebtoolsHelpData.xml"/> Modified: ofbiz/trunk/applications/content/widget/content/ContentForms.xml URL: http://svn.apache.org/viewvc/ofbiz/trunk/applications/content/widget/content/ContentForms.xml?rev=926340&r1=926339&r2=926340&view=diff ============================================================================== --- ofbiz/trunk/applications/content/widget/content/ContentForms.xml (original) +++ ofbiz/trunk/applications/content/widget/content/ContentForms.xml Mon Mar 22 21:16:45 2010 @@ -630,4 +630,15 @@ under the License. target="javascript:set_value('${contentId}')"/> </field> </form> + <form name="EditShowContentPortlet" extends="CommonPortletEdit" extends-resource="component://common/widget/PortletEditForms.xml"> + <field name="contentId" entry-name="attributeMap.contentId"> + <drop-down> + <entity-options description="${contentName}" entity-name="Content"> + <entity-constraint name="contentTypeId" operator="equals" value="DOCUMENT"/> + <entity-order-by field-name="contentName"/> + </entity-options> + </drop-down> + </field> + <field name="saveButton"><submit/></field> + </form> </forms> Modified: ofbiz/trunk/applications/content/widget/content/ContentScreens.xml URL: http://svn.apache.org/viewvc/ofbiz/trunk/applications/content/widget/content/ContentScreens.xml?rev=926340&r1=926339&r2=926340&view=diff ============================================================================== --- ofbiz/trunk/applications/content/widget/content/ContentScreens.xml (original) +++ ofbiz/trunk/applications/content/widget/content/ContentScreens.xml Mon Mar 22 21:16:45 2010 @@ -182,6 +182,16 @@ under the License. </widgets> </section> </screen> + <screen name="ShowContentPortlet"> + <section> + <actions> + <script location="component://common/webcommon/WEB-INF/actions/includes/retrievePortletAttributes.groovy"/> + </actions> + <widgets> + <content content-id="${contentId}"/> + </widgets> + </section> + </screen> <screen name="EditDocumentTree"> <section> <actions> |
Free forum by Nabble | Edit this page |