Applied patch from Bruno Busco in Jira #OFBIZ-2172 with basics for VisualThemeSet; still not possible to change themes in ecommerce (should probably be supported on the back end instead of the front end, ie in the catalog manager and not by a customer in ecommerce, or perhaps only allowed in ecommerce if a flag on the ProductStore says its okay; also does not yet filter selectable themes in the back-end/manager applications

git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@743202 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
David E. Jones
2009-02-11 03:19:19 +00:00
parent 541e72feb5
commit b8707a26f8
10 changed files with 73 additions and 6 deletions
@@ -2673,6 +2673,10 @@
<value xml:lang="th">ระดับสูงเท่ากัน</value>
<value xml:lang="zh">上边坐标</value>
</property>
<property key="FormFieldTitle_visualThemeSetId">
<value xml:lang="en">Visual Theme Set</value>
<value xml:lang="it">Set di temi grafici</value>
</property>
<property key="FormFieldTitle_webSiteContentTypeId">
<value xml:lang="de">Webseite Inhaltstyp ID</value>
<value xml:lang="en">Web Site Content Type Id</value>
@@ -46,6 +46,13 @@ under the License.
<sub-hyperlink use-when="&quot;${webSite.productStoreId}&quot;.length()>0" link-style="buttontext" target-type="inter-app" target="/catalog/control/EditProductStore?productStoreId=${webSite.productStoreId}" description="${uiLabelMap.ContentEditProductStore}"/>
</drop-down>
</field>
<field name="visualThemeSetId">
<drop-down allow-empty="true">
<entity-options entity-name="VisualThemeSet" description="${description}">
<entity-order-by field-name="description"/>
</entity-options>
</drop-down>
</field>
<field name="submitButton" title="${uiLabelMap.CommonSubmit}"><submit button-type="button"/></field>
</form>
<form name="ListWebSites" target="" title="" type="list" list-name="webSites" paginate-target="FindWebSite" paginate="true"
@@ -171,4 +178,4 @@ under the License.
</field>
<field name="submitButton" title="${uiLabelMap.CommonAdd}"><submit button-type="button"/></field>
</form>
</forms>
</forms>
+2 -2
View File
@@ -103,8 +103,8 @@ under the License.
<ProductStoreRole partyId="admin" roleTypeId="SALES_REP" productStoreId="9000" fromDate="2001-05-13 12:00:00.0"/>
<ProductStoreKeywordOvrd productStoreId="9000" keyword="gizmo" fromDate="2001-05-13 12:00:00.0" target="100" targetTypeEnumId="KOTT_PRODCAT"/>
<WebSite webSiteId="WebStore" siteName="eCommerce Web Site" productStoreId="9000"/>
<WebSite webSiteId="WebStoreClone" siteName="Cloned eCommerce Web Site" productStoreId="9000"/>
<WebSite webSiteId="WebStore" siteName="eCommerce Web Site" productStoreId="9000" visualThemeSetId="ECOMMERCE"/>
<WebSite webSiteId="WebStoreClone" siteName="Cloned eCommerce Web Site" productStoreId="9000" visualThemeSetId="ECOMMERCE"/>
<WebSite webSiteId="OrderEntry" siteName="Order Entry Web Site" productStoreId="9000"/>
<ProdCatalog prodCatalogId="DemoCatalog" catalogName="Demo Catalog" useQuickAdd="Y"/>
@@ -0,0 +1,34 @@
<?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>
<VisualThemeSet visualThemeSetId="ECOMMERCE" description="ECommerce Visual Themes"/>
<!-- Ecommerce Default Visual Theme -->
<VisualTheme visualThemeId="EC_DEFAULT" visualThemeSetId="ECOMMERCE" description="OFBiz Ecommerce Standard Floating Layout"/>
<VisualThemeResource visualThemeId="EC_DEFAULT" resourceTypeEnumId="VT_STYLESHEET" resourceValue="/images/ecommain.css" sequenceId="01"/>
<VisualThemeResource visualThemeId="EC_DEFAULT" resourceTypeEnumId="VT_SHORTCUT_ICON" resourceValue="/images/ofbiz.ico" sequenceId="01"/>
<VisualThemeResource visualThemeId="EC_DEFAULT" resourceTypeEnumId="VT_HDR_IMAGE_URL" resourceValue="/images/ofbiz_logo.jpg" sequenceId="01"/>
<VisualThemeResource visualThemeId="EC_DEFAULT" resourceTypeEnumId="VT_HDR_TMPLT_LOC" resourceValue="component://ecommerce/webapp/ecommerce/includes/header.ftl" sequenceId="01"/>
<VisualThemeResource visualThemeId="EC_DEFAULT" resourceTypeEnumId="VT_FTR_TMPLT_LOC" resourceValue="component://ecommerce/webapp/ecommerce/includes/footer.ftl" sequenceId="01"/>
<VisualThemeResource visualThemeId="EC_DEFAULT" resourceTypeEnumId="VT_SCREENSHOT" resourceValue="/images/ecdefaulttheme.jpg" sequenceId="01"/>
</entity-engine-xml>
@@ -25,6 +25,7 @@ under the License.
<classpath type="jar" location="build/lib/*"/>
<classpath type="dir" location="config"/>
<classpath type="dir" location="script"/>
<entity-resource type="data" reader-name="seed" loader="main" location="data/EcommerceTypeData.xml"/>
<entity-resource type="data" reader-name="demo" loader="main" location="data/DemoProduct.xml"/>
<entity-resource type="data" reader-name="demo" loader="main" location="data/DemoProductImages.xml"/>
<entity-resource type="data" reader-name="demo" loader="main" location="data/DemoSurvey.xml"/>
+2 -1
View File
@@ -115,7 +115,8 @@ under the License.
<Enumeration enumId="VT_NAV_TMPLT_LOC" description="Main Navigation Template Location" enumTypeId="VT_RES_TYPE" sequenceId="10"/>
<Enumeration enumId="VT_MSG_TMPLT_LOC" description="Main Messages Template Location" enumTypeId="VT_RES_TYPE" sequenceId="11"/>
<Enumeration enumId="VT_SCREENSHOT" description="Theme Preview Screenshot" enumTypeId="VT_RES_TYPE" sequenceId="12"/>
<VisualTheme visualThemeId="DEFAULT" description="OFBiz Standard Floating Layout"/>
<VisualThemeSet visualThemeSetId="BACKOFFICE" description="Themes to be used for backoffice applications"/>
<VisualTheme visualThemeId="DEFAULT" visualThemeSetId="BACKOFFICE" description="OFBiz Standard Floating Layout"/>
<VisualThemeResource visualThemeId="DEFAULT" resourceTypeEnumId="VT_STYLESHEET" resourceValue="/images/maincss.css" sequenceId="01"/>
<VisualThemeResource visualThemeId="DEFAULT" resourceTypeEnumId="VT_RTL_STYLESHEET" resourceValue="/images/mainrtl.css" sequenceId="01"/>
<VisualThemeResource visualThemeId="DEFAULT" resourceTypeEnumId="VT_SHORTCUT_ICON" resourceValue="/images/ofbiz.ico" sequenceId="01"/>
@@ -543,13 +543,26 @@ under the License.
<!-- org.ofbiz.common.theme -->
<!-- ============================ -->
<entity entity-name="VisualThemeSet"
package-name="org.ofbiz.common.theme"
title="Defines a set of Visual Themes">
<description>Groups toghether Visual Themes that can be used for one (or a set of) application.</description>
<field name="visualThemeSetId" type="id-ne"></field>
<field name="description" type="description"></field>
<prim-key field="visualThemeSetId"/>
</entity>
<entity entity-name="VisualTheme"
package-name="org.ofbiz.common.theme"
title="Defines a Visual Theme">
<description>The VisualTheme entity contains one entry per visual theme.</description>
<field name="visualThemeId" type="id-ne"></field>
<field name="visualThemeSetId" type="id"></field>
<field name="description" type="description"></field>
<prim-key field="visualThemeId"/>
<relation type="one" fk-name="VT_THEME_SET" rel-entity-name="VisualThemeSet">
<key-map field-name="visualThemeSetId"/>
</relation>
</entity>
<entity entity-name="VisualThemeResource"
+4 -1
View File
@@ -90,7 +90,10 @@ under the License.
<section>
<actions>
<set field="title" value="${uiLabelMap.CommonVisualThemes}"/>
<entity-condition entity-name="VisualTheme" list="visualThemes"/>
<entity-one entity-name="WebSite" value-field="webSite"/>
<entity-condition entity-name="VisualTheme" list-name="visualThemes">
<condition-expr field-name="visualThemeSetId" from-field="webSite.visualThemeSetId" ignore-if-empty="true"/>
</entity-condition>
</actions>
<widgets>
<decorator-screen name="LookupDecorator" location="component://common/widget/CommonScreens.xml">
@@ -242,6 +242,10 @@ under the License.
<field name="standardContentPrefix" type="url"></field>
<field name="secureContentPrefix" type="url"></field>
<field name="cookieDomain" type="long-varchar"></field>
<field name="visualThemeSetId" type="id"></field>
<relation type="one" fk-name="WEB_SITE_THEME_SET" rel-entity-name="VisualThemeSet">
<key-map field-name="visualThemeSetId"/>
</relation>
<prim-key field="webSiteId"/>
</entity>
</entitymodel>
+1 -1
View File
@@ -19,7 +19,7 @@ under the License.
-->
<entity-engine-xml>
<VisualTheme visualThemeId="BLUELIGHT" description="BlueLight Theme: Breadcrumbs, drop-down menus and rounded corners"/>
<VisualTheme visualThemeId="BLUELIGHT" visualThemeSetId="BACKOFFICE" description="BlueLight Theme: Breadcrumbs, drop-down menus and rounded corners"/>
<VisualThemeResource visualThemeId="BLUELIGHT" resourceTypeEnumId="VT_STYLESHEET" resourceValue="/bluelight/style.css" sequenceId="01"/>
<VisualThemeResource visualThemeId="BLUELIGHT" resourceTypeEnumId="VT_SHORTCUT_ICON" resourceValue="/bluelight/ofbiz.ico" sequenceId="01"/>
<VisualThemeResource visualThemeId="BLUELIGHT" resourceTypeEnumId="VT_HDR_IMAGE_URL" resourceValue="/bluelight/ofbiz_logo.jpg" sequenceId="01"/>