Author: adrianc
Date: Tue Nov 25 18:35:47 2014 New Revision: 1641665 URL: http://svn.apache.org/r1641665 Log: Added the Bootstrap theme. All Bootstrap artifacts are contained in the theme (the original zip files placed Bootstrap artifacts in the images component, but that is not necessary). https://issues.apache.org/jira/browse/OFBIZ-5840 Added: ofbiz/branches/boostrap_theme/themes/bootstrap/ ofbiz/branches/boostrap_theme/themes/bootstrap/README ofbiz/branches/boostrap_theme/themes/bootstrap/build.xml ofbiz/branches/boostrap_theme/themes/bootstrap/data/ ofbiz/branches/boostrap_theme/themes/bootstrap/data/BootstrapThemeData.xml ofbiz/branches/boostrap_theme/themes/bootstrap/includes/ ofbiz/branches/boostrap_theme/themes/bootstrap/includes/appbar.ftl ofbiz/branches/boostrap_theme/themes/bootstrap/includes/appbar.ftl.bk ofbiz/branches/boostrap_theme/themes/bootstrap/includes/appbarClose.ftl ofbiz/branches/boostrap_theme/themes/bootstrap/includes/appbarOpen.ftl ofbiz/branches/boostrap_theme/themes/bootstrap/includes/emptyAppBar.ftl ofbiz/branches/boostrap_theme/themes/bootstrap/includes/footer.ftl ofbiz/branches/boostrap_theme/themes/bootstrap/includes/header.ftl ofbiz/branches/boostrap_theme/themes/bootstrap/includes/templates/ ofbiz/branches/boostrap_theme/themes/bootstrap/includes/templates/htmlFormMacroLibrary.ftl ofbiz/branches/boostrap_theme/themes/bootstrap/includes/templates/htmlMenuMacroLibrary.ftl ofbiz/branches/boostrap_theme/themes/bootstrap/includes/templates/htmlScreenMacroLibrary.ftl ofbiz/branches/boostrap_theme/themes/bootstrap/includes/templates/htmlTreeMacroLibrary.ftl ofbiz/branches/boostrap_theme/themes/bootstrap/ofbiz-component.xml ofbiz/branches/boostrap_theme/themes/bootstrap/webapp/ ofbiz/branches/boostrap_theme/themes/bootstrap/webapp/bootstrap/ ofbiz/branches/boostrap_theme/themes/bootstrap/webapp/bootstrap/WEB-INF/ ofbiz/branches/boostrap_theme/themes/bootstrap/webapp/bootstrap/WEB-INF/web.xml ofbiz/branches/boostrap_theme/themes/bootstrap/webapp/bootstrap/css/ ofbiz/branches/boostrap_theme/themes/bootstrap/webapp/bootstrap/css/bootstrap-theme.css ofbiz/branches/boostrap_theme/themes/bootstrap/webapp/bootstrap/css/bootstrap-theme.css.map ofbiz/branches/boostrap_theme/themes/bootstrap/webapp/bootstrap/css/bootstrap-theme.min.css ofbiz/branches/boostrap_theme/themes/bootstrap/webapp/bootstrap/css/bootstrap.css ofbiz/branches/boostrap_theme/themes/bootstrap/webapp/bootstrap/css/bootstrap.css.map ofbiz/branches/boostrap_theme/themes/bootstrap/webapp/bootstrap/css/bootstrap.min.css ofbiz/branches/boostrap_theme/themes/bootstrap/webapp/bootstrap/css/docbook.css ofbiz/branches/boostrap_theme/themes/bootstrap/webapp/bootstrap/css/global.css ofbiz/branches/boostrap_theme/themes/bootstrap/webapp/bootstrap/css/help.css ofbiz/branches/boostrap_theme/themes/bootstrap/webapp/bootstrap/css/javascript.css ofbiz/branches/boostrap_theme/themes/bootstrap/webapp/bootstrap/css/legacy.css ofbiz/branches/boostrap_theme/themes/bootstrap/webapp/bootstrap/css/skins/ ofbiz/branches/boostrap_theme/themes/bootstrap/webapp/bootstrap/css/skins/tomahawk.css ofbiz/branches/boostrap_theme/themes/bootstrap/webapp/bootstrap/css/style.css ofbiz/branches/boostrap_theme/themes/bootstrap/webapp/bootstrap/css/styleFlat.css ofbiz/branches/boostrap_theme/themes/bootstrap/webapp/bootstrap/css/stylertl.css ofbiz/branches/boostrap_theme/themes/bootstrap/webapp/bootstrap/fonts/ ofbiz/branches/boostrap_theme/themes/bootstrap/webapp/bootstrap/fonts/glyphicons-halflings-regular.eot (with props) ofbiz/branches/boostrap_theme/themes/bootstrap/webapp/bootstrap/fonts/glyphicons-halflings-regular.svg ofbiz/branches/boostrap_theme/themes/bootstrap/webapp/bootstrap/fonts/glyphicons-halflings-regular.ttf (with props) ofbiz/branches/boostrap_theme/themes/bootstrap/webapp/bootstrap/fonts/glyphicons-halflings-regular.woff (with props) ofbiz/branches/boostrap_theme/themes/bootstrap/webapp/bootstrap/images/ ofbiz/branches/boostrap_theme/themes/bootstrap/webapp/bootstrap/images/Corel Auto-Preserve/ ofbiz/branches/boostrap_theme/themes/bootstrap/webapp/bootstrap/images/Corel Auto-Preserve/logo.png (with props) ofbiz/branches/boostrap_theme/themes/bootstrap/webapp/bootstrap/images/Corel Auto-Preserve/ofbiz_logo.gif (with props) ofbiz/branches/boostrap_theme/themes/bootstrap/webapp/bootstrap/images/ajax-loader.gif (with props) ofbiz/branches/boostrap_theme/themes/bootstrap/webapp/bootstrap/images/app-bar.png (with props) ofbiz/branches/boostrap_theme/themes/bootstrap/webapp/bootstrap/images/bhead.gif (with props) ofbiz/branches/boostrap_theme/themes/bootstrap/webapp/bootstrap/images/big-fade.png (with props) ofbiz/branches/boostrap_theme/themes/bootstrap/webapp/bootstrap/images/button.png (with props) ofbiz/branches/boostrap_theme/themes/bootstrap/webapp/bootstrap/images/cal.gif (with props) ofbiz/branches/boostrap_theme/themes/bootstrap/webapp/bootstrap/images/faded_background.png (with props) ofbiz/branches/boostrap_theme/themes/bootstrap/webapp/bootstrap/images/gray-texture.jpg (with props) ofbiz/branches/boostrap_theme/themes/bootstrap/webapp/bootstrap/images/header_bg.gif (with props) ofbiz/branches/boostrap_theme/themes/bootstrap/webapp/bootstrap/images/header_close_button.png (with props) ofbiz/branches/boostrap_theme/themes/bootstrap/webapp/bootstrap/images/header_top_bg.gif (with props) ofbiz/branches/boostrap_theme/themes/bootstrap/webapp/bootstrap/images/logo.png (with props) ofbiz/branches/boostrap_theme/themes/bootstrap/webapp/bootstrap/images/main-nav.gif (with props) ofbiz/branches/boostrap_theme/themes/bootstrap/webapp/bootstrap/images/masthead.gif (with props) ofbiz/branches/boostrap_theme/themes/bootstrap/webapp/bootstrap/images/ofbiz-logo-header.png (with props) ofbiz/branches/boostrap_theme/themes/bootstrap/webapp/bootstrap/images/ofbiz-logo.png (with props) ofbiz/branches/boostrap_theme/themes/bootstrap/webapp/bootstrap/images/ofbiz_logo.gif (with props) ofbiz/branches/boostrap_theme/themes/bootstrap/webapp/bootstrap/images/screenshot.jpg (with props) ofbiz/branches/boostrap_theme/themes/bootstrap/webapp/bootstrap/images/select_arrow.gif (with props) ofbiz/branches/boostrap_theme/themes/bootstrap/webapp/bootstrap/images/spinner.gif (with props) ofbiz/branches/boostrap_theme/themes/bootstrap/webapp/bootstrap/images/texture.jpg (with props) ofbiz/branches/boostrap_theme/themes/bootstrap/webapp/bootstrap/images/tile.gif (with props) ofbiz/branches/boostrap_theme/themes/bootstrap/webapp/bootstrap/images/tomahawk_screenshot.jpg (with props) ofbiz/branches/boostrap_theme/themes/bootstrap/webapp/bootstrap/images/ui-anim_basic_16x16.gif (with props) ofbiz/branches/boostrap_theme/themes/bootstrap/webapp/bootstrap/images/ui-bg_flat_0_aaaaaa_40x100.png (with props) ofbiz/branches/boostrap_theme/themes/bootstrap/webapp/bootstrap/images/ui-bg_flat_55_fbec88_40x100.png (with props) ofbiz/branches/boostrap_theme/themes/bootstrap/webapp/bootstrap/images/ui-bg_glass_75_d0e5f5_1x400.png (with props) ofbiz/branches/boostrap_theme/themes/bootstrap/webapp/bootstrap/images/ui-bg_glass_85_dfeffc_1x400.png (with props) ofbiz/branches/boostrap_theme/themes/bootstrap/webapp/bootstrap/images/ui-bg_glass_95_fef1ec_1x400.png (with props) ofbiz/branches/boostrap_theme/themes/bootstrap/webapp/bootstrap/images/ui-bg_gloss-wave_55_5c9ccc_500x100.png (with props) ofbiz/branches/boostrap_theme/themes/bootstrap/webapp/bootstrap/images/ui-bg_inset-hard_100_f5f8f9_1x100.png (with props) ofbiz/branches/boostrap_theme/themes/bootstrap/webapp/bootstrap/images/ui-bg_inset-hard_100_fcfdfd_1x100.png (with props) ofbiz/branches/boostrap_theme/themes/bootstrap/webapp/bootstrap/images/ui-icons_217bc0_256x240.png (with props) ofbiz/branches/boostrap_theme/themes/bootstrap/webapp/bootstrap/images/ui-icons_2e83ff_256x240.png (with props) ofbiz/branches/boostrap_theme/themes/bootstrap/webapp/bootstrap/images/ui-icons_469bdd_256x240.png (with props) ofbiz/branches/boostrap_theme/themes/bootstrap/webapp/bootstrap/images/ui-icons_6da8d5_256x240.png (with props) ofbiz/branches/boostrap_theme/themes/bootstrap/webapp/bootstrap/images/ui-icons_cd0a0a_256x240.png (with props) ofbiz/branches/boostrap_theme/themes/bootstrap/webapp/bootstrap/images/ui-icons_d8e7f3_256x240.png (with props) ofbiz/branches/boostrap_theme/themes/bootstrap/webapp/bootstrap/images/ui-icons_f9bd01_256x240.png (with props) ofbiz/branches/boostrap_theme/themes/bootstrap/webapp/bootstrap/js/ ofbiz/branches/boostrap_theme/themes/bootstrap/webapp/bootstrap/js/bootified.js ofbiz/branches/boostrap_theme/themes/bootstrap/webapp/bootstrap/js/bootstrap.js ofbiz/branches/boostrap_theme/themes/bootstrap/webapp/bootstrap/js/bootstrap.min.js ofbiz/branches/boostrap_theme/themes/bootstrap/widget/ ofbiz/branches/boostrap_theme/themes/bootstrap/widget/Menus.xml Added: ofbiz/branches/boostrap_theme/themes/bootstrap/README URL: http://svn.apache.org/viewvc/ofbiz/branches/boostrap_theme/themes/bootstrap/README?rev=1641665&view=auto ============================================================================== --- ofbiz/branches/boostrap_theme/themes/bootstrap/README (added) +++ ofbiz/branches/boostrap_theme/themes/bootstrap/README Tue Nov 25 18:35:47 2014 @@ -0,0 +1,54 @@ +This is an initial attempt to create a Bootstrap based front-end theme for Apache Ofbiz. + +1. Approach + +The following steps were followed in this implementation: + +1.1 No screen/form/menu modifications were effected. This to ensure that other themes are not broken in the process; +1.2 Existing MacroLibraries were copied from framework/widget/templates to the new theme webapp /includes/templates directory - + at this stage only the htmlFormMacroLibrary.ftl, htmlMenuMacroLibrary.ftl and htmlScreenMacroLibrary.ftl files; + These files were modified where necessary to accommodate Bootstrap. +1.3 Bootstrap files were downloaded and placed in the framework/images directory. +1.4 The Ofbiz Tomahawk theme is used as a base theme (see note on CSS). +1.5 A javaScript file (bootified.js) has been included to transform widgets defined in ftls. MacroLibraries only cater for widgets defined in *Form.xml,*Menus.xml and *Screens.xml files. + It was therefore necessary to provide a small script to perform some DOM manipulations. (See note under issues) +1.6 It was necessary to make small modifications to two framework java files to achieve greater flexibility with regards to the menu widget: + MenuFactory.java - added getMenusFromLocation static method to retieve all menus defined in a particular *Menus.xml; + MacroMenuRenderer.java - added "style" to the Map in renderMenuClose method to provide more flexibility; + Patches are supplied for both cases. (See note on Navigation) + +2. CSS +2.1 A global.css file was created and included as a visualThemeResource. All stylesheets are imported through this file to ensure that style sheets are loaded in the correct order. +2.2 The global.css includes (in loading order): + @import url("/images/bootstrap/css/bootstrap.css"); + @import url("legacy.css"); /* Original ofbiz theme stylesheet - in this case style.css in Tomahawk*/ + @import url("help.css"); + @import url("javascript.css"); + @import url("style.css"); /* Base boostrap-ofbiz style - used to style vanilla boostrap */ +2.3 CSS elements in the legacy stylesheet which override the bootstrap.css are commented out. + The idea is not to add new elements to the legacy.css but to systematically reduce it during the course of the development. + This will decrease css bloat. +2.4 All new css elements are defined in the style.css which is loaded last. +2.5 More css files can optionally be appended after the style.css. This can be used to create different skins for the same theme. + I have included an additional theme to demonstrate skinning. Choose the Bootstrap TomaHawk theme to see this in action. + +3. Navigation +3.1 Main Navigation - i.e. Primary and Secondary Apps: The main navigation is currently not contained/defined in a *Menus.xml file. It is therefore not rendered + through the htmlMenuMacroLibrary.ftl. The header.ftl file is use to produce this nav via getAppBarWebInfosweb method. Is there a case to define this in a *Menus.xml file? +3.2 App Navigation:The appheaderTemplate pattern is issued pattern is followed in this case, along with an empty appbar.ftl. This could have been done through the htmlMenuMacroLibrary.ftl, but this method makes dropdowns impossible. + Is would be possible to produce an app navigation with dropdowns if sub menus were used in menu definitions. Although the framework does allow for sub menu definitions, I am yet to see an example of its + implementation in Ofbiz. (I stand to be corrected offcourse). In this case dropdown menus are generated using the *TabBar naming pattern - a sub menu is linked to the main item based on the item's name and the sub menu name. + Some sub menus are not picked up because of inconsistencies in the naming practices. (See known issues) + To get this to work and empty appbar.ftl is used so that the app-nav is is not displayed twice. Also, the GlobalDecorator screen had to be amended to set the appheaderTemplate location. A patch is provided for this. +3.3 TabBar Navigation: This is rendered through the htmlMenuMacroLibrary.ftl. + +4. Known Issues +4.1 Jerky page rendering: Page initially shows unformatted/styled html for a few seconds before showing properly. This is probably due to the macroLibraries being served as a visualThemeResource. + This issue disappears when the widget.properties defs point to the libraries under bootstrap/includes - a restart is required for this! + The down side of this is that other themes will not display properly. This should only be done if you want to use bootstrap themes exclusively. +4.2 The are probably plenty ftl issues. A pertinent one is the datepicker. The datepicker works fine with forms defined in xml. But FTL forms are problematic. + +5. Work needed +5.1 Lookup screens; +5.2 Iconizing buttontext in FTLs. +5.3 And a lot more .... Added: ofbiz/branches/boostrap_theme/themes/bootstrap/build.xml URL: http://svn.apache.org/viewvc/ofbiz/branches/boostrap_theme/themes/bootstrap/build.xml?rev=1641665&view=auto ============================================================================== --- ofbiz/branches/boostrap_theme/themes/bootstrap/build.xml (added) +++ ofbiz/branches/boostrap_theme/themes/bootstrap/build.xml Tue Nov 25 18:35:47 2014 @@ -0,0 +1,49 @@ +<?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. +--> + +<project name="OFBiz - Bootstrap Basic Theme" default="build" basedir="."> + <import file="../../macros.xml"/> + + <!-- ================================================================== --> + <!-- Initialization of all property settings --> + <!-- ================================================================== --> + + <property name="desc" value="Bootstrap Basic Theme"/> + <property name="name" value="ofbiz-bootstrap-basic"/> + <property name="ofbiz.home.dir" value="../.."/> + + <target name="clean"> + <delete file="webapp/bootstrap-basic/js/application-min.js" /> + <delete file="webapp/bootstrap-basic/javascript-min.css" /> + <delete file="webapp/bootstrap-basic/maincss-min.css" /> + <delete file="webapp/bootstrap-basic/mainrtl-min.css" /> + </target> + + <target name="build" depends=""> + <!-- commented out because the yuicompressor has been (temporarily?) removed. It was conflicting with Birt... --> + <!-- echo message="[build] ========== Building Flat Grey Theme ==========" /> + <yuicompressor inFile="webapp/flatgrey/js/application.js" outFile="webapp/flatgrey/js/application-min.js" /> + <yuicompressor inFile="webapp/flatgrey/javascript.css" outFile="webapp/flatgrey/javascript-min.css" /> + <yuicompressor inFile="webapp/flatgrey/maincss.css" outFile="webapp/flatgrey/maincss-min.css" /> + <yuicompressor inFile="webapp/flatgrey/mainrtl.css" outFile="webapp/flatgrey/mainrtl-min.css" /> + <echo message="[build] ========== Done Building Flat Grey Theme ==========" /--> + </target> + +</project> Added: ofbiz/branches/boostrap_theme/themes/bootstrap/data/BootstrapThemeData.xml URL: http://svn.apache.org/viewvc/ofbiz/branches/boostrap_theme/themes/bootstrap/data/BootstrapThemeData.xml?rev=1641665&view=auto ============================================================================== --- ofbiz/branches/boostrap_theme/themes/bootstrap/data/BootstrapThemeData.xml (added) +++ ofbiz/branches/boostrap_theme/themes/bootstrap/data/BootstrapThemeData.xml Tue Nov 25 18:35:47 2014 @@ -0,0 +1,62 @@ +<?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> + <Enumeration enumId="VT_NAV_APPHDR_LOC" enumTypeId="VT_RES_TYPE" sequenceId="30" description="Location of Application header."/> + + <VisualTheme visualThemeId="BOOTSTRAP_BASIC" visualThemeSetId="BACKOFFICE" description="Boostrap Basic Theme - Floating Layout, Sight-Impaired Accessible, Bidirectional"/> + <VisualThemeResource visualThemeId="BOOTSTRAP_BASIC" resourceTypeEnumId="VT_NAME" resourceValue="BOOTSTRAP_BASIC" sequenceId="01"/> + <VisualThemeResource visualThemeId="BOOTSTRAP_BASIC" resourceTypeEnumId="VT_STYLESHEET" resourceValue="/bootstrap/css/global.css" sequenceId="01"/> + <VisualThemeResource visualThemeId="BOOTSTRAP_BASIC" resourceTypeEnumId="VT_RTL_STYLESHEET" resourceValue="/bootstrap/css/stylertl.css" sequenceId="02"/> + <VisualThemeResource visualThemeId="BOOTSTRAP_BASIC" resourceTypeEnumId="VT_FTR_JAVASCRIPT" resourceValue="/bootstrap/js/bootified.js" sequenceId="01"/> + <VisualThemeResource visualThemeId="BOOTSTRAP_BASIC" resourceTypeEnumId="VT_FTR_JAVASCRIPT" resourceValue="/bootstrap/js/bootstrap.min.js" sequenceId="02"/> + <VisualThemeResource visualThemeId="BOOTSTRAP_BASIC" resourceTypeEnumId="VT_SHORTCUT_ICON" resourceValue="/images/ofbiz.ico" sequenceId="01"/> + <VisualThemeResource visualThemeId="BOOTSTRAP_BASIC" resourceTypeEnumId="VT_HDR_IMAGE_URL" resourceValue="/bootstrap/images/ofbiz-logo-header.png" sequenceId="01"/> + <VisualThemeResource visualThemeId="BOOTSTRAP_BASIC" resourceTypeEnumId="VT_HDR_TMPLT_LOC" resourceValue="component://bootstrap/includes/header.ftl" sequenceId="01"/> + <VisualThemeResource visualThemeId="BOOTSTRAP_BASIC" resourceTypeEnumId="VT_MSG_TMPLT_LOC" resourceValue="component://common/webcommon/includes/messages.ftl" sequenceId="01"/> + <VisualThemeResource visualThemeId="BOOTSTRAP_BASIC" resourceTypeEnumId="VT_FTR_TMPLT_LOC" resourceValue="component://bootstrap/includes/footer.ftl" sequenceId="01"/> + <VisualThemeResource visualThemeId="BOOTSTRAP_BASIC" resourceTypeEnumId="VT_NAV_TMPLT_LOC" resourceValue="component://bootstrap/includes/emptyAppbar.ftl" sequenceId="01"/> + <VisualThemeResource visualThemeId="BOOTSTRAP_BASIC" resourceTypeEnumId="VT_NAV_APPHDR_LOC" resourceValue="component://bootstrap/includes/appbar.ftl" sequenceId="01"/> + <VisualThemeResource visualThemeId="BOOTSTRAP_BASIC" resourceTypeEnumId="VT_SCREENSHOT" resourceValue="/bootstrap/images/screenshot.jpg" sequenceId="01"/> + <VisualThemeResource visualThemeId="BOOTSTRAP_BASIC" resourceTypeEnumId="VT_SCRN_MACRO_LIB" resourceValue="component://bootstrap/includes/templates/htmlScreenMacroLibrary.ftl" sequenceId="01"/> + <VisualThemeResource visualThemeId="BOOTSTRAP_BASIC" resourceTypeEnumId="VT_FORM_MACRO_LIB" resourceValue="component://bootstrap/includes/templates/htmlFormMacroLibrary.ftl" sequenceId="01"/> + <!-- <VisualThemeResource visualThemeId="BOOTSTRAP_BASIC" resourceTypeEnumId="VT_TREE_MACRO_LIB" resourceValue="component://bootstrap/includes/templates/htmlTreeMacroLibrary.ftl" sequenceId="01"/> --> + <VisualThemeResource visualThemeId="BOOTSTRAP_BASIC" resourceTypeEnumId="VT_MENU_MACRO_LIB" resourceValue="component://bootstrap/includes/templates/htmlMenuMacroLibrary.ftl" sequenceId="01"/> + + <VisualTheme visualThemeId="BOOTSTRAP_TOMAHAWK" visualThemeSetId="BACKOFFICE" description="Boostrap Tomahawk Theme - Based on original Tomakawk Theme"/> + <VisualThemeResource visualThemeId="BOOTSTRAP_TOMAHAWK" resourceTypeEnumId="VT_NAME" resourceValue="BOOTSTRAP_TOMAHAWK" sequenceId="01"/> + <VisualThemeResource visualThemeId="BOOTSTRAP_TOMAHAWK" resourceTypeEnumId="VT_STYLESHEET" resourceValue="/bootstrap/css/global.css" sequenceId="01"/> + <VisualThemeResource visualThemeId="BOOTSTRAP_TOMAHAWK" resourceTypeEnumId="VT_STYLESHEET" resourceValue="/bootstrap/css/skins/tomahawk.css" sequenceId="02"/> + <VisualThemeResource visualThemeId="BOOTSTRAP_TOMAHAWK" resourceTypeEnumId="VT_RTL_STYLESHEET" resourceValue="/bootstrap/css/stylertl.css" sequenceId="02"/> + <VisualThemeResource visualThemeId="BOOTSTRAP_TOMAHAWK" resourceTypeEnumId="VT_FTR_JAVASCRIPT" resourceValue="/bootstrap/js/bootified.js" sequenceId="01"/> + <VisualThemeResource visualThemeId="BOOTSTRAP_TOMAHAWK" resourceTypeEnumId="VT_FTR_JAVASCRIPT" resourceValue="/bootstrap/js/bootstrap.min.js" sequenceId="02"/> + <VisualThemeResource visualThemeId="BOOTSTRAP_TOMAHAWK" resourceTypeEnumId="VT_SHORTCUT_ICON" resourceValue="/images/ofbiz.ico" sequenceId="01"/> + <VisualThemeResource visualThemeId="BOOTSTRAP_TOMAHAWK" resourceTypeEnumId="VT_HDR_IMAGE_URL" resourceValue="/bootstrap/images/logo.png" sequenceId="01"/> + <VisualThemeResource visualThemeId="BOOTSTRAP_TOMAHAWK" resourceTypeEnumId="VT_HDR_TMPLT_LOC" resourceValue="component://bootstrap/includes/header.ftl" sequenceId="01"/> + <VisualThemeResource visualThemeId="BOOTSTRAP_TOMAHAWK" resourceTypeEnumId="VT_MSG_TMPLT_LOC" resourceValue="component://common/webcommon/includes/messages.ftl" sequenceId="01"/> + <VisualThemeResource visualThemeId="BOOTSTRAP_TOMAHAWK" resourceTypeEnumId="VT_FTR_TMPLT_LOC" resourceValue="component://bootstrap/includes/footer.ftl" sequenceId="01"/> + <VisualThemeResource visualThemeId="BOOTSTRAP_TOMAHAWK" resourceTypeEnumId="VT_NAV_TMPLT_LOC" resourceValue="component://bootstrap/includes/emptyAppbar.ftl" sequenceId="01"/> + <VisualThemeResource visualThemeId="BOOTSTRAP_TOMAHAWK" resourceTypeEnumId="VT_NAV_APPHDR_LOC" resourceValue="component://bootstrap/includes/appbar.ftl" sequenceId="01"/> + <VisualThemeResource visualThemeId="BOOTSTRAP_TOMAHAWK" resourceTypeEnumId="VT_SCREENSHOT" resourceValue="/bootstrap/images/tomahawk_screenshot" sequenceId="01"/> + <VisualThemeResource visualThemeId="BOOTSTRAP_TOMAHAWK" resourceTypeEnumId="VT_SCRN_MACRO_LIB" resourceValue="component://bootstrap/includes/templates/htmlScreenMacroLibrary.ftl" sequenceId="01"/> + <VisualThemeResource visualThemeId="BOOTSTRAP_TOMAHAWK" resourceTypeEnumId="VT_FORM_MACRO_LIB" resourceValue="component://bootstrap/includes/templates/htmlFormMacroLibrary.ftl" sequenceId="01"/> + <!-- <VisualThemeResource visualThemeId="BOOTSTRAP_TOMAHAWK" resourceTypeEnumId="VT_TREE_MACRO_LIB" resourceValue="component://bootstrap/includes/templates/htmlTreeMacroLibrary.ftl" sequenceId="01"/> --> + <VisualThemeResource visualThemeId="BOOTSTRAP_TOMAHAWK" resourceTypeEnumId="VT_MENU_MACRO_LIB" resourceValue="component://bootstrap/includes/templates/htmlMenuMacroLibrary.ftl" sequenceId="01"/> +</entity-engine-xml> Added: ofbiz/branches/boostrap_theme/themes/bootstrap/includes/appbar.ftl URL: http://svn.apache.org/viewvc/ofbiz/branches/boostrap_theme/themes/bootstrap/includes/appbar.ftl?rev=1641665&view=auto ============================================================================== --- ofbiz/branches/boostrap_theme/themes/bootstrap/includes/appbar.ftl (added) +++ ofbiz/branches/boostrap_theme/themes/bootstrap/includes/appbar.ftl Tue Nov 25 18:35:47 2014 @@ -0,0 +1,90 @@ +<#-- +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. +--> +<#assign appModelMenu = Static["org.ofbiz.widget.menu.MenuFactory"].getMenuFromLocation(applicationMenuLocation,applicationMenuName)> +<#assign modelMenus = Static["org.ofbiz.widget.menu.MenuFactory"].getMenusFromLocation(applicationMenuLocation)> +<#-- + +<div>${appModelMenu?if_exists}</div> +<div>${applicationMenuLocation}</div> +<div>${applicationMenuName}</div> +--> +<#assign menus = modelMenus.keySet()> +<#assign menuItemList = appModelMenu.menuItemList> +<#if menuItemList?has_content> + <nav class="navbar navbar-default" role="navigation" id="app-navigation"> + <ul class="nav navbar-nav"> + <li class="menuTitle"> + <a href="#"><span class="glyphicon glyphicon-cog"></span> ${applicationTitle}<#--${context}${parameters.componentName?capitalize}--></a> + </li> + <#list menuItemList as item> + <#assign name = item.name> + <#assign title = item.getTitle(context)> + <#assign target = item.getLink().getTarget(context)> + <#-- Get TabBar submenu based on menu name --> + <#assign subMenuName = "${name}TabBar"> + <#if menus?seq_contains("${subMenuName}")> + <#assign subModelMenu = Static["org.ofbiz.widget.menu.MenuFactory"].getMenuFromLocation(applicationMenuLocation,subMenuName)> + <#if subModelMenu?has_content> + <#assign subMenuItemList = subModelMenu.menuItemList> + <#if subMenuItemList?has_content> + <li class="dropdown"> + <a href="<@ofbizUrl>${target?if_exists}</@ofbizUrl>" class="dropdown-toggle" data-toggle="dropdown">${title?if_exists} <span class="caret"></span></a> + <ul class="dropdown-menu"> + <#list subMenuItemList as subMenuItem> + <#assign name = subMenuItem.name> + <#assign title = subMenuItem.getTitle(context)> + <#assign target = subMenuItem.getLink().getTarget(context)> + <li> + <a href="<@ofbizUrl>${target?if_exists}</@ofbizUrl>">${title?if_exists}</a> + </li> + </#list> + </ul> + </li> + </#if> + </#if> + <#elseif menus?seq_contains("${subMenuName?cap_first}")> + <#assign subMenuName = "${subMenuName?cap_first}"> + <#assign subModelMenu = Static["org.ofbiz.widget.menu.MenuFactory"].getMenuFromLocation(applicationMenuLocation,subMenuName)> + <#if subModelMenu?has_content> + <#assign subMenuItemList = subModelMenu.menuItemList> + <#if subMenuItemList?has_content> + <li class="dropdown"> + <a href="<@ofbizUrl>${target}</@ofbizUrl>" class="dropdown-toggle" data-toggle="dropdown">${title?if_exists} <span class="caret"></span></a> + <ul class="dropdown-menu"> + <#list subMenuItemList as subMenuItem> + <#assign name = subMenuItem.name> + <#assign title = subMenuItem.getTitle(context)> + <#assign target = subMenuItem.getLink().getTarget(context)> + <li> + <a href="<@ofbizUrl>${target?if_exists}</@ofbizUrl>">${title?if_exists}</a> + </li> + </#list> + </ul> + </li> + </#if> + </#if> + <#else> + <li> + <a href="<@ofbizUrl>${target?if_exists}</@ofbizUrl>">${title?if_exists}</a> + </li> + </#if> + </#list> + </ul> + </nav> +</#if> \ No newline at end of file Added: ofbiz/branches/boostrap_theme/themes/bootstrap/includes/appbar.ftl.bk URL: http://svn.apache.org/viewvc/ofbiz/branches/boostrap_theme/themes/bootstrap/includes/appbar.ftl.bk?rev=1641665&view=auto ============================================================================== --- ofbiz/branches/boostrap_theme/themes/bootstrap/includes/appbar.ftl.bk (added) +++ ofbiz/branches/boostrap_theme/themes/bootstrap/includes/appbar.ftl.bk Tue Nov 25 18:35:47 2014 @@ -0,0 +1,87 @@ +<#-- +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. +--> +<#assign appModelMenu = Static["org.ofbiz.widget.menu.MenuFactory"].getMenuFromLocation(applicationMenuLocation,applicationMenuName)> +<#assign modelMenus = Static["org.ofbiz.widget.menu.MenuFactory"].getMenusFromLocation(applicationMenuLocation)> +<#-- + +<div>${appModelMenu?if_exists}</div> +<div>${applicationMenuLocation}</div> +<div>${applicationMenuName}</div> +--> +<#assign menus = modelMenus.keySet()> +<#assign menuItemList = appModelMenu.menuItemList> +<#if menuItemList?has_content> + <nav class="navbar navbar-default" role="navigation" style="padding-top:0px;"> + <ul class="nav navbar-nav"> + <#list menuItemList as item> + <#assign name = item.name> + <#assign title = item.getTitle(context)> + <#assign target = item.getLink().getTarget(context)> + <#-- Get TabBar submenu based on menu name --> + <#assign subMenuName = "${name}TabBar"> + <#if menus?seq_contains("${subMenuName}")> + <#assign subModelMenu = Static["org.ofbiz.widget.menu.MenuFactory"].getMenuFromLocation(applicationMenuLocation,subMenuName)> + <#if subModelMenu?has_content> + <#assign subMenuItemList = subModelMenu.menuItemList> + <#if subMenuItemList?has_content> + <li class="dropdown"> + <a href="<@ofbizUrl>${target?if_exists}</@ofbizUrl>" class="dropdown-toggle" data-toggle="dropdown">${title?if_exists} <span class="caret"></span></a> + <ul class="dropdown-menu"> + <#list subMenuItemList as subMenuItem> + <#assign name = subMenuItem.name> + <#assign title = subMenuItem.getTitle(context)> + <#assign target = subMenuItem.getLink().getTarget(context)> + <li> + <a href="<@ofbizUrl>${target?if_exists}</@ofbizUrl>">${title?if_exists}</a> + </li> + </#list> + </ul> + </li> + </#if> + </#if> + <#elseif menus?seq_contains("${subMenuName?cap_first}")> + <#assign subMenuName = "${subMenuName?cap_first}"> + <#assign subModelMenu = Static["org.ofbiz.widget.menu.MenuFactory"].getMenuFromLocation(applicationMenuLocation,subMenuName)> + <#if subModelMenu?has_content> + <#assign subMenuItemList = subModelMenu.menuItemList> + <#if subMenuItemList?has_content> + <li class="dropdown"> + <a href="<@ofbizUrl>${target?if_exists}</@ofbizUrl>" class="dropdown-toggle" data-toggle="dropdown">${title?if_exists} <span class="caret"></span></a> + <ul class="dropdown-menu"> + <#list subMenuItemList as subMenuItem> + <#assign name = subMenuItem.name> + <#assign title = subMenuItem.getTitle(context)> + <#assign target = subMenuItem.getLink().getTarget(context)> + <li> + <a href="<@ofbizUrl>${target?if_exists}</@ofbizUrl>">${title?if_exists}</a> + </li> + </#list> + </ul> + </li> + </#if> + </#if> + <#else> + <li> + <a href="<@ofbizUrl>${target?if_exists}</@ofbizUrl>">${title?if_exists}</a> + </li> + </#if> + </#list> + </ul> + </nav> +</#if> \ No newline at end of file Added: ofbiz/branches/boostrap_theme/themes/bootstrap/includes/appbarClose.ftl URL: http://svn.apache.org/viewvc/ofbiz/branches/boostrap_theme/themes/bootstrap/includes/appbarClose.ftl?rev=1641665&view=auto ============================================================================== --- ofbiz/branches/boostrap_theme/themes/bootstrap/includes/appbarClose.ftl (added) +++ ofbiz/branches/boostrap_theme/themes/bootstrap/includes/appbarClose.ftl Tue Nov 25 18:35:47 2014 @@ -0,0 +1,18 @@ +<#-- +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. +--> Added: ofbiz/branches/boostrap_theme/themes/bootstrap/includes/appbarOpen.ftl URL: http://svn.apache.org/viewvc/ofbiz/branches/boostrap_theme/themes/bootstrap/includes/appbarOpen.ftl?rev=1641665&view=auto ============================================================================== --- ofbiz/branches/boostrap_theme/themes/bootstrap/includes/appbarOpen.ftl (added) +++ ofbiz/branches/boostrap_theme/themes/bootstrap/includes/appbarOpen.ftl Tue Nov 25 18:35:47 2014 @@ -0,0 +1,90 @@ +<#-- +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. +--> +<#assign appModelMenu = Static["org.ofbiz.widget.menu.MenuFactory"].getMenuFromLocation(applicationMenuLocation,applicationMenuName)> +<#assign modelMenus = Static["org.ofbiz.widget.menu.MenuFactory"].getMenusFromLocation(applicationMenuLocation)> +<#-- + +<div>${appModelMenu?if_exists}</div> +<div>${applicationMenuLocation}</div> +<div>${applicationMenuName}</div> +--> +<#assign menus = modelMenus.keySet()> +<#assign menuItemList = appModelMenu.menuItemList> +<#if menuItemList?has_content> + <nav class="navbar navbar-default" role="navigation" id="app-navigation"> + <ul class="nav navbar-nav"> + <li class="menuTitle"> + <a href="#"><span class="glyphicon glyphicon-cog"></span> ${applicationTitle}<#--${context}${parameters.componentName?capitalize}--></a> + </li> + <#list menuItemList as item> + <#assign name = item.name> + <#assign title = item.getTitle(context)> + <#assign target = item.getLink().getTarget(context)> + <#-- Get TabBar submenu based on menu name --> + <#assign subMenuName = "${name}TabBar"> + <#if menus?seq_contains("${subMenuName}")> + <#assign subModelMenu = Static["org.ofbiz.widget.menu.MenuFactory"].getMenuFromLocation(applicationMenuLocation,subMenuName)> + <#if subModelMenu?has_content> + <#assign subMenuItemList = subModelMenu.menuItemList> + <#if subMenuItemList?has_content> + <li class="dropdown"> + <a href="<@ofbizUrl>${target?if_exists}</@ofbizUrl>" class="dropdown-toggle" data-toggle="dropdown">${title?if_exists} <span class="caret"></span></a> + <ul class="dropdown-menu"> + <#list subMenuItemList as subMenuItem> + <#assign name = subMenuItem.name> + <#assign title = subMenuItem.getTitle(context)> + <#assign target = subMenuItem.getLink().getTarget(context)> + <li> + <a href="<@ofbizUrl>${target?if_exists}</@ofbizUrl>">${title?if_exists}</a> + </li> + </#list> + </ul> + </li> + </#if> + </#if> + <#elseif menus?seq_contains("${subMenuName?cap_first}")> + <#assign subMenuName = "${subMenuName?cap_first}"> + <#assign subModelMenu = Static["org.ofbiz.widget.menu.MenuFactory"].getMenuFromLocation(applicationMenuLocation,subMenuName)> + <#if subModelMenu?has_content> + <#assign subMenuItemList = subModelMenu.menuItemList> + <#if subMenuItemList?has_content> + <li class="dropdown"> + <a href="<@ofbizUrl>${target}</@ofbizUrl>" class="dropdown-toggle" data-toggle="dropdown">${title?if_exists} <span class="caret"></span></a> + <ul class="dropdown-menu"> + <#list subMenuItemList as subMenuItem> + <#assign name = subMenuItem.name> + <#assign title = subMenuItem.getTitle(context)> + <#assign target = subMenuItem.getLink().getTarget(context)> + <li> + <a href="<@ofbizUrl>${target?if_exists}</@ofbizUrl>">${title?if_exists}</a> + </li> + </#list> + </ul> + </li> + </#if> + </#if> + <#else> + <li> + <a href="<@ofbizUrl>${target?if_exists}</@ofbizUrl>">${title?if_exists}</a> + </li> + </#if> + </#list> + </ul> + </nav> +</#if> \ No newline at end of file Added: ofbiz/branches/boostrap_theme/themes/bootstrap/includes/emptyAppBar.ftl URL: http://svn.apache.org/viewvc/ofbiz/branches/boostrap_theme/themes/bootstrap/includes/emptyAppBar.ftl?rev=1641665&view=auto ============================================================================== --- ofbiz/branches/boostrap_theme/themes/bootstrap/includes/emptyAppBar.ftl (added) +++ ofbiz/branches/boostrap_theme/themes/bootstrap/includes/emptyAppBar.ftl Tue Nov 25 18:35:47 2014 @@ -0,0 +1,18 @@ +<#-- +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. +--> Added: ofbiz/branches/boostrap_theme/themes/bootstrap/includes/footer.ftl URL: http://svn.apache.org/viewvc/ofbiz/branches/boostrap_theme/themes/bootstrap/includes/footer.ftl?rev=1641665&view=auto ============================================================================== --- ofbiz/branches/boostrap_theme/themes/bootstrap/includes/footer.ftl (added) +++ ofbiz/branches/boostrap_theme/themes/bootstrap/includes/footer.ftl Tue Nov 25 18:35:47 2014 @@ -0,0 +1,37 @@ +<#-- +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. +--> +<div id="footer" class="panel panel-default"> + <div class="panel-body"> + <ul class="pull-right"> + <li class="first">${nowTimestamp?datetime?string.short} - <a href="<@ofbizUrl>ListTimezones</@ofbizUrl>">${timeZone.getDisplayName(timeZone.useDaylightTime(), Static["java.util.TimeZone"].LONG, locale)}</a></li> + <li><a href="<@ofbizUrl>ListLocales</@ofbizUrl>">${locale.getDisplayName(locale)}</a></li> + </ul> + <p class="pull-left"> + ${uiLabelMap.CommonCopyright} (c) 2001-${nowTimestamp?string("yyyy")} <a href="http://www.apache.org" target="_blank">The Apache Software Foundation</a>. ${uiLabelMap.CommonPoweredBy} <a href="http://ofbiz.apache.org" target="_blank">Apache OFBiz.</a> <#include "ofbizhome://runtime/svninfo.ftl" /> + </p> + </div> +</div> +</div> +<#if layoutSettings.VT_FTR_JAVASCRIPT?has_content> + <#list layoutSettings.VT_FTR_JAVASCRIPT as javaScript> + <script type="text/javascript" src="<@ofbizContentUrl>${StringUtil.wrapString(javaScript)}</@ofbizContentUrl>" type="text/javascript"></script> + </#list> +</#if> +</body> +</html> Added: ofbiz/branches/boostrap_theme/themes/bootstrap/includes/header.ftl URL: http://svn.apache.org/viewvc/ofbiz/branches/boostrap_theme/themes/bootstrap/includes/header.ftl?rev=1641665&view=auto ============================================================================== --- ofbiz/branches/boostrap_theme/themes/bootstrap/includes/header.ftl (added) +++ ofbiz/branches/boostrap_theme/themes/bootstrap/includes/header.ftl Tue Nov 25 18:35:47 2014 @@ -0,0 +1,335 @@ +<#-- +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. +--> +<#assign docLangAttr = locale.toString()?replace("_", "-")> +<#assign langDir = "ltr"> +<#if "ar.iw"?contains(docLangAttr?substring(0, 2))> + <#assign langDir = "rtl"> +</#if> +<#if person?has_content> + <#assign userName = person.firstName?if_exists + " " + person.middleName?if_exists + " " + person.lastName?if_exists> +<#elseif partyGroup?has_content> + <#assign userName = partyGroup.groupName?if_exists> +<#elseif userLogin?exists> + <#assign userName = userLogin.userLoginId> +<#else> + <#assign userName = ""> +</#if> +<#if defaultOrganizationPartyGroupName?has_content> + <#assign orgName = " - " + defaultOrganizationPartyGroupName?if_exists> +<#else> + <#assign orgName = ""> +</#if> +<#if layoutSettings.headerImageLinkUrl?exists> + <#assign logoLinkURL = "${layoutSettings.headerImageLinkUrl}"> +<#else> + <#assign logoLinkURL = "${layoutSettings.commonHeaderImageLinkUrl}"> +</#if> +<#assign organizationLogoLinkURL = "${layoutSettings.organizationLogoLinkUrl?if_exists}"> +<#if layoutSettings.headerImageUrl?exists> + <#assign headerImageUrl = layoutSettings.headerImageUrl> + <#elseif layoutSettings.commonHeaderImageUrl?exists> + <#assign headerImageUrl = layoutSettings.commonHeaderImageUrl> + <#elseif layoutSettings.VT_HDR_IMAGE_URL?exists> + <#assign headerImageUrl = layoutSettings.VT_HDR_IMAGE_URL.get(0)> +</#if> +<#-- Get AppBarWebInfos --> +<#if (requestAttributes.externalLoginKey)??><#assign externalKeyParam = "?externalLoginKey=" + requestAttributes.externalLoginKey!></#if> +<#if (externalLoginKey)??><#assign externalKeyParam = "?externalLoginKey=" + requestAttributes.externalLoginKey!></#if> +<#assign ofbizServerName = application.getAttribute("_serverId")?default("default-server")> +<#assign contextPath = request.getContextPath()> +<#assign displayApps = Static["org.ofbiz.webapp.control.LoginWorker"].getAppBarWebInfos(security, userLogin, ofbizServerName, "main")> +<#assign displaySecondaryApps = Static["org.ofbiz.webapp.control.LoginWorker"].getAppBarWebInfos(security, userLogin, ofbizServerName, "secondary")> + +<#assign appModelMenu = Static["org.ofbiz.widget.menu.MenuFactory"].getMenuFromLocation(applicationMenuLocation,applicationMenuName)> +<#if appModelMenu.getModelMenuItemByName(headerItem)??> + <#if headerItem!="main"> + <#assign show_last_menu = true> + </#if> +</#if> + +<#if parameters.portalPageId?? && !appModelMenu.getModelMenuItemByName(headerItem)??> + <#assign show_last_menu = true> +</#if> +<html lang="${docLangAttr}" dir="${langDir}" xmlns="http://www.w3.org/1999/xhtml"> +<head> + <meta http-equiv="Content-Type" content="text/html; charset=UTF-8"/> + <title>${layoutSettings.companyName}: <#if (page.titleProperty)?has_content>${uiLabelMap[page.titleProperty]}<#else>${(page.title)?if_exists}</#if></title> + <#if layoutSettings.shortcutIcon?has_content> + <#assign shortcutIcon = layoutSettings.shortcutIcon/> + <#elseif layoutSettings.VT_SHORTCUT_ICON?has_content> + <#assign shortcutIcon = layoutSettings.VT_SHORTCUT_ICON.get(0)/> + </#if> + <#if shortcutIcon?has_content> + <link rel="shortcut icon" href="<@ofbizContentUrl>${StringUtil.wrapString(shortcutIcon)}</@ofbizContentUrl>" /> + </#if> + <#if layoutSettings.javaScripts?has_content> + <#--layoutSettings.javaScripts is a list of java scripts. --> + <#-- use a Set to make sure each javascript is declared only once, but iterate the list to maintain the correct order --> + <#assign javaScriptsSet = Static["org.ofbiz.base.util.UtilMisc"].toSet(layoutSettings.javaScripts)/> + <#list layoutSettings.javaScripts as javaScript> + <#if javaScriptsSet.contains(javaScript)> + <#assign nothing = javaScriptsSet.remove(javaScript)/> + <script src="<@ofbizContentUrl>${StringUtil.wrapString(javaScript)}</@ofbizContentUrl>" type="text/javascript"></script> + </#if> + </#list> + </#if> + <#if layoutSettings.VT_HDR_JAVASCRIPT?has_content> + <#list layoutSettings.VT_HDR_JAVASCRIPT as javaScript> + <script src="<@ofbizContentUrl>${StringUtil.wrapString(javaScript)}</@ofbizContentUrl>" type="text/javascript"></script> + </#list> + </#if> + <#if layoutSettings.styleSheets?has_content> + <#--layoutSettings.styleSheets is a list of style sheets. So, you can have a user-specified "main" style sheet, AND a component style sheet.--> + <#list layoutSettings.styleSheets as styleSheet> + <link rel="stylesheet" href="<@ofbizContentUrl>${StringUtil.wrapString(styleSheet)}</@ofbizContentUrl>" type="text/css"/> + </#list> + </#if> + <#if layoutSettings.VT_STYLESHEET?has_content> + <#list layoutSettings.VT_STYLESHEET as styleSheet> + <link rel="stylesheet" href="<@ofbizContentUrl>${StringUtil.wrapString(styleSheet)}</@ofbizContentUrl>" type="text/css"/> + </#list> + </#if> + <#if layoutSettings.rtlStyleSheets?has_content && langDir == "rtl"> + <#--layoutSettings.rtlStyleSheets is a list of rtl style sheets.--> + <#list layoutSettings.rtlStyleSheets as styleSheet> + <link rel="stylesheet" href="<@ofbizContentUrl>${StringUtil.wrapString(styleSheet)}</@ofbizContentUrl>" type="text/css"/> + </#list> + </#if> + <#if layoutSettings.VT_RTL_STYLESHEET?has_content && langDir == "rtl"> + <#list layoutSettings.VT_RTL_STYLESHEET as styleSheet> + <link rel="stylesheet" href="<@ofbizContentUrl>${StringUtil.wrapString(styleSheet)}</@ofbizContentUrl>" type="text/css"/> + </#list> + </#if> + <#if layoutSettings.VT_EXTRA_HEAD?has_content> + <#list layoutSettings.VT_EXTRA_HEAD as extraHead> + ${extraHead} + </#list> + </#if> + <#if lastParameters?exists><#assign parametersURL = "&" + lastParameters></#if> + <#if layoutSettings.WEB_ANALYTICS?has_content> + <script language="JavaScript" type="text/javascript"> + <#list layoutSettings.WEB_ANALYTICS as webAnalyticsConfig> + ${StringUtil.wrapString(webAnalyticsConfig.webAnalyticsCode?if_exists)} + </#list> + </script> + </#if> +</head> +<#if layoutSettings.headerImageLinkUrl?exists> + <#assign logoLinkURL = "${layoutSettings.headerImageLinkUrl}"> +<#else> + <#assign logoLinkURL = "${layoutSettings.commonHeaderImageLinkUrl}"> +</#if> +<#assign organizationLogoLinkURL = "${layoutSettings.organizationLogoLinkUrl?if_exists}"> +<body> + <div id="wait-spinner" style="display:none"> + <div id="wait-spinner-image"></div> + </div> + <div class="container-fluid"> + <div class="hidden"> + <a href="#column-container" title="${uiLabelMap.CommonSkipNavigation}" accesskey="2"> + ${uiLabelMap.CommonSkipNavigation} + </a> + </div> + <nav class="navbar navbar-default" role="navigation" id="header-navigation"> + <div class="container-fluid"> + <div class="navbar-header"> + <a class="navbar-brand" href="<@ofbizUrl>${logoLinkURL}</@ofbizUrl>"> + <#if headerImageUrl?exists> + <#if organizationLogoLinkURL?has_content> + <img alt="${layoutSettings.companyName}" src="<@ofbizContentUrl>${StringUtil.wrapString(organizationLogoLinkURL)}</@ofbizContentUrl>"> + <#else> + <img alt="${layoutSettings.companyName}" src="<@ofbizContentUrl>${StringUtil.wrapString(headerImageUrl)}</@ofbizContentUrl>"> + </#if> + <#else> + ${layoutSettings.companyName} + </#if> + </a> + </div> + <ul class="nav navbar-nav"> + <#if userLogin?has_content> + <li><#-- Primary Applications --> + <div class="btn-group navbar-btn"> + <button class="btn btn-default" type="button"><span class="glyphicon glyphicon-cog button-label"></span>${uiLabelMap.CommonApplications}</button> + <button class="btn btn-default dropdown-toggle" data-toggle="dropdown" type="button" aria-expanded="false"> + <span class="caret"></span> + <span class="sr-only">Toggle Dropdown</span> + </button> + <ul class="dropdown-menu" role="menu"> + <#list displayApps as display> + <#assign thisApp = display.getContextRoot()> + <#assign permission = true> + <#assign selected = false> + <#assign permissions = display.getBasePermission()> + <#list permissions as perm> + <#if (perm != "NONE" && !security.hasEntityPermission(perm, "_VIEW", session))> + <#-- User must have ALL permissions in the base-permission list --> + <#assign permission = false> + </#if> + </#list> + <#if permission == true> + <#if thisApp == contextPath || contextPath + "/" == thisApp> + <#assign selected = true> + </#if> + <#assign thisApp = StringUtil.wrapString(thisApp)> + <#assign thisURL = thisApp> + <#if thisApp != "/"> + <#assign thisURL = thisURL + "/control/main"> + </#if> + <#if layoutSettings.suppressTab?exists && display.name == layoutSettings.suppressTab> + <!-- do not display this component--> + <#else> + <li<#if selected> class="selected"</#if>><a href="${thisURL + externalKeyParam}"<#if uiLabelMap?exists> title="${uiLabelMap[display.description]}">${uiLabelMap[display.title]}<#else> title="${display.description}">${display.title}</#if></a></li> + </#if> + </#if> + </#list> + </ul> + </div> <#-- btn-group ends --> + </li><#-- Primary Applications dropdown ends--> + <li class="dropdown"><#-- Secondary Applications --> + <div class="btn-group navbar-btn"> + <button class="btn btn-default" type="button"><span class="glyphicon glyphicon-plus button-label"></span>More Applications</button> + <button class="btn btn-default dropdown-toggle" data-toggle="dropdown" type="button" aria-expanded="false"> + <span class="caret"></span> + <span class="sr-only">Toggle Dropdown</span> + </button> + <#-- <a href="#" class="dropdown-toggle" data-toggle="dropdown">More Applications <span class="caret"></span></a> --> + <ul class="dropdown-menu" role="menu"> + <#list displaySecondaryApps as display> + <#assign thisApp = display.getContextRoot()> + <#assign permission = true> + <#assign selected = false> + <#assign permissions = display.getBasePermission()> + <#list permissions as perm> + <#if (perm != "NONE" && !security.hasEntityPermission(perm, "_VIEW", session))> + <#-- User must have ALL permissions in the base-permission list --> + <#assign permission = false> + </#if> + </#list> + <#if permission == true> + <#if thisApp == contextPath || contextPath + "/" == thisApp> + <#assign selected = true> + </#if> + <#assign thisApp = StringUtil.wrapString(thisApp)> + <#assign thisURL = thisApp> + <#if thisApp != "/"> + <#assign thisURL = thisURL + "/control/main"> + </#if> + <#if layoutSettings.suppressTab?exists && display.name == layoutSettings.suppressTab> + <!-- do not display this component--> + <#else> + <li<#if selected> class="selected"</#if>><a href="${thisURL + externalKeyParam}"<#if uiLabelMap?exists> title="${uiLabelMap[display.description]}">${uiLabelMap[display.title]}<#else> title="${display.description}">${display.title}</#if></a></li> + </#if> + </#if> + </#list> + </ul> + </div><#-- btn-group ends --> + </li><#-- Secondary Applications ends --> + <#--if webSiteId?exists && requestAttributes._CURRENT_VIEW_?exists && helpTopic?exists--> + <#if parameters.componentName?exists && requestAttributes._CURRENT_VIEW_?exists && helpTopic?exists> + <#include "component://common/webcommon/includes/helplink.ftl" /> + <li><a class="btn <#if pageAvail?has_content> btn-default</#if> navbar-btn " href="javascript:lookup_popup1('showHelp?helpTopic=${helpTopic}&portalPageId=${parameters.portalPageId?if_exists}','help' ,500,500);" title="${uiLabelMap.CommonHelp}"><span class="glyphicon glyphicon-question-sign"></span></a></li> + </#if> + </#if> + </ul> + <ul class="nav navbar-nav navbar-right"> + <#if userLogin?exists> + <#if orgName?has_content> + <li class="org">${orgName}</li> + </#if> + <#if userLogin.partyId?exists> + <li> + <div class="btn-group"> + <button class="btn btn-default navbar-btn" type="button" aria-expanded="false"> + <span class="glyphicon glyphicon-user"></span> + </button> + <a class="btn btn-default navbar-btn" href="<@ofbizUrl>passwordChange</@ofbizUrl>">${userName}</a> + </div> + <#-- <a href="<@ofbizUrl>passwordChange</@ofbizUrl>">${userName}</a> --> + </li> + <#else> + <li class="user">${userName}</li> + </#if> + <li> + <div class="btn-group"> + <button class="btn btn-default navbar-btn" type="button" aria-expanded="false"> + <span class="glyphicon glyphicon-off"></span> + </button> + <a class="btn btn-default navbar-btn" href="<@ofbizUrl>logout</@ofbizUrl>">${uiLabelMap.CommonLogout}</a> + </div> + </li> + <li> + <a class="btn btn-default navbar-btn" href="<@ofbizUrl>ListVisualThemes</@ofbizUrl>"><span class="glyphicon glyphicon-list button-label"></span> ${uiLabelMap.CommonVisualThemes}</a> + </li> + <#else> + <li> + <div class="btn-group"> + <button class="btn btn-default navbar-btn" type="button" aria-expanded="false"> + <span class="glyphicon glyphicon-off"></span> + </button> + <a class="btn btn-default navbar-btn" href="<@ofbizUrl>${checkLoginUrl}</@ofbizUrl>">${uiLabelMap.CommonLogin}</a> + </div> + </li> + </#if> + <#if layoutSettings.middleTopMessage1?has_content && layoutSettings.middleTopMessage1 != " "> + <li class="dropdown"> + <button class="btn btn-default navbar-btn dropdown-toggle" data-toggle="dropdown" type="button" aria-expanded="false"> + <span class="glyphicon glyphicon-envelope"> </span><span class="badge">${layoutSettings.middleTopMessage1?size}</span> + </button> + <#-- <a href="#" class="dropdown-toggle" data-toggle="dropdown">Messages <span class="caret"></span></a> --> + <ul class="dropdown-menu" role="menu"> + <li><a href="${StringUtil.wrapString(layoutSettings.middleTopLink1!)}">${layoutSettings.middleTopMessage1?if_exists}</a></li> + <li><a href="${StringUtil.wrapString(layoutSettings.middleTopLink2!)}">${layoutSettings.middleTopMessage2?if_exists}</a></li> + <li><a href="${StringUtil.wrapString(layoutSettings.middleTopLink3!)}">${layoutSettings.middleTopMessage3?if_exists}</a></li> + </ul> + </li> + </#if> + <#-- + <#if userLogin?exists> + <#if (userPreferences.COMPACT_HEADER)?default("N") == "Y"> + <li class="collapsed"><a href="javascript:document.setUserPreferenceCompactHeaderN.submit()"> </a> + <form name="setUserPreferenceCompactHeaderN" method="post" action="<@ofbizUrl>setUserPreference</@ofbizUrl>"> + <input type="hidden" name="userPrefGroupTypeId" value="GLOBAL_PREFERENCES"/> + <input type="hidden" name="userPrefTypeId" value="COMPACT_HEADER"/> + <input type="hidden" name="userPrefValue" value="N"/> + </form> + </li> + <#else> + <li class="expanded"><a href="javascript:document.setUserPreferenceCompactHeaderY.submit()"> </a> + <form name="setUserPreferenceCompactHeaderY" method="post" action="<@ofbizUrl>setUserPreference</@ofbizUrl>"> + <input type="hidden" name="userPrefGroupTypeId" value="GLOBAL_PREFERENCES"/> + <input type="hidden" name="userPrefTypeId" value="COMPACT_HEADER"/> + <input type="hidden" name="userPrefValue" value="Y"/> + </form> + </li> + </#if> + </#if> + --> + <li> + <div class="btn-group"> + <button class="btn btn-default navbar-btn" type="button" aria-expanded="false"> + <span class="glyphicon glyphicon-globe"></span> + </button> + <a class="btn btn-default navbar-btn" href="<@ofbizUrl>ListLocales</@ofbizUrl>">${uiLabelMap.CommonLanguageTitle}</a> + </div> + </li> + </ul> + </div> + </nav> + + <#--<br class="clear" />--> |
Free forum by Nabble | Edit this page |