Author: jacopoc
Date: Mon Aug 7 07:06:57 2006 New Revision: 429344 URL: http://svn.apache.org/viewvc?rev=429344&view=rev Log: Simple global decorator for printer friendly screens (no logo and no application bar, header and footer). A print button is also available at the top of the screen. Added: incubator/ofbiz/trunk/framework/common/webcommon/includes/simple.ftl (with props) Modified: incubator/ofbiz/trunk/framework/common/widget/CommonScreens.xml Added: incubator/ofbiz/trunk/framework/common/webcommon/includes/simple.ftl URL: http://svn.apache.org/viewvc/incubator/ofbiz/trunk/framework/common/webcommon/includes/simple.ftl?rev=429344&view=auto ============================================================================== --- incubator/ofbiz/trunk/framework/common/webcommon/includes/simple.ftl (added) +++ incubator/ofbiz/trunk/framework/common/webcommon/includes/simple.ftl Mon Aug 7 07:06:57 2006 @@ -0,0 +1,45 @@ +<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> +<#-- + +Copyright 2001-2006 The Apache Software Foundation + +Licensed 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. +--> + +<html 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> + <script language="javascript" src="<@ofbizContentUrl>/images/calendar1.js</@ofbizContentUrl>" type="text/javascript"></script> + <script language="javascript" src="<@ofbizContentUrl>/images/selectall.js</@ofbizContentUrl>" type="text/javascript"></script> + <script language="javascript" src="<@ofbizContentUrl>/images/fieldlookup.js</@ofbizContentUrl>" type="text/javascript"></script> + <#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>${styleSheet}</@ofbizContentUrl>" type="text/css"/> + </#list> + <#else> + <link rel="stylesheet" href="<@ofbizContentUrl>/images/maincss.css</@ofbizContentUrl>" type="text/css"/> + <link rel="stylesheet" href="<@ofbizContentUrl>/images/tabstyles.css</@ofbizContentUrl>" type="text/css"/> + </#if> + ${layoutSettings.extraHead?if_exists} +</head> + +<body style="background-color: WHITE;"> +<form name="printPage"> +<input type="button" value="${uiLabelMap.CommonPrint}" onClick="window.print()" class="smallSubmit"/> +</form> +<br/> +${sections.render("body")} +</body> +</html> Propchange: incubator/ofbiz/trunk/framework/common/webcommon/includes/simple.ftl ------------------------------------------------------------------------------ svn:eol-style = native Propchange: incubator/ofbiz/trunk/framework/common/webcommon/includes/simple.ftl ------------------------------------------------------------------------------ svn:keywords = "Date Rev Author URL Id" Propchange: incubator/ofbiz/trunk/framework/common/webcommon/includes/simple.ftl ------------------------------------------------------------------------------ svn:mime-type = text/plain Modified: incubator/ofbiz/trunk/framework/common/widget/CommonScreens.xml URL: http://svn.apache.org/viewvc/incubator/ofbiz/trunk/framework/common/widget/CommonScreens.xml?rev=429344&r1=429343&r2=429344&view=diff ============================================================================== --- incubator/ofbiz/trunk/framework/common/widget/CommonScreens.xml (original) +++ incubator/ofbiz/trunk/framework/common/widget/CommonScreens.xml Mon Aug 7 07:06:57 2006 @@ -143,4 +143,23 @@ </widgets> </section> </screen> + + <!-- Simple decorator for printer friendly screens (no logo and no application bar, header and footer). + A print button is also available at the top of the screen. + --> + <screen name="SimpleDecorator"> + <section> + <actions> + <!-- The two default (global) stylesheets are added to the list + of stylesheets to the first and second position --> + <set field="layoutSettings.styleSheets[+0]" value="/images/maincss.css" global="true"/> + <set field="layoutSettings.styleSheets[+1]" value="/images/tabstyles.css" global="true"/> + </actions> + <widgets> + <!-- render header --> + <platform-specific><html><html-template location="component://common/webcommon/includes/simple.ftl"/></html></platform-specific> + </widgets> + </section> + </screen> + </screens> |
Free forum by Nabble | Edit this page |