View File | Revision Log | Show Annotations | Download File | View Changeset
/hippo/hippo-cms6/hippo-cms/branches/Branch-CMS-v6_05_xx/editor/src/site/workbench/transformers/top.xsl
Revision: 2932
Committed: Wed Aug 2 16:01:20 2006 UTC (13 years, 11 months ago) by nvankampenhout
Content type: application/xml
Original Path: hippo-cms/trunk/editor/src/site/workbench/transformers/top.xsl
File size: 11668 byte(s)
Error occurred while calculating annotation data.
Log Message:
(CMS-506) Added Apache license headers.

File Contents

# Content
1 <?xml version="1.0" encoding="ISO-8859-1"?>
2 <!--
3 Copyright 2001-2006 Hippo (www.hippo.nl)
4
5 Licensed under the Apache License, Version 2.0 (the "License");
6 you may not use this file except in compliance with the License.
7 You may obtain a copy of the License at
8
9 http://www.apache.org/licenses/LICENSE-2.0
10
11 Unless required by applicable law or agreed to in writing, software
12 distributed under the License is distributed on an "AS IS" BASIS,
13 WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14 See the License for the specific language governing permissions and
15 limitations under the License.
16 -->
17 <!--
18 Top frame
19 Loads the CMS framework javascript classes and startup script
20 Draws tab headers
21 -->
22
23 <xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
24 xmlns:i18n="http://apache.org/cocoon/i18n/2.1">
25
26 <xsl:param name="username"/>
27 <xsl:param name="fullname"/>
28 <xsl:param name="editUri"/>
29 <xsl:param name="editType"/>
30 <xsl:param name="previewURL"/>
31 <xsl:param name="randomNr"/>
32
33 <xsl:template match="/">
34 <html>
35
36 <head>
37 <title>Hippo CMS Tab Menu</title>
38 <link href="/workbench/css/top_layout_browser_generic.css" rel="stylesheet" type="text/css" media="all" />
39 <link href="/workbench/css/top_style_browser_generic.css" rel="stylesheet" type="text/css" media="all" />
40
41 <!-- Class framework's -->
42 <script type="text/javascript" src="/workbench/js/cfx/Cfx.js">&#160;</script>
43 <script type="text/javascript" src="/js/scriptaculous/lib/prototype.js">&#160;</script>
44
45 <!-- Load helper functions and classes -->
46 <script type="text/javascript" src="/workbench/js/hippo/util.js">&#160;</script>
47
48 <!-- Framework classes -->
49 <script type="text/javascript" src="/workbench/js/hippo/framework/logger.js">&#160;</script>
50 <script type="text/javascript" src="/workbench/js/hippo/framework/start.js">&#160;</script>
51 <script type="text/javascript" src="/workbench/js/hippo/framework/context.js">&#160;</script>
52 <script type="text/javascript" src="/workbench/js/hippo/framework/services.js">&#160;</script>
53 <script type="text/javascript" src="/workbench/js/hippo/framework/components.js">&#160;</script>
54 <script type="text/javascript" src="/workbench/js/hippo/framework/events.js">&#160;</script>
55 <script type="text/javascript" src="/workbench/js/hippo/framework/event_util.js">&#160;</script>
56 <script type="text/javascript" src="/workbench/js/hippo/framework/remotecall.js">&#160;</script>
57 <script type="text/javascript" src="/workbench/js/hippo/framework/remotecall-ajax.js">&#160;</script>
58 <script type="text/javascript" src="/workbench/js/hippo/framework/authentication.js">&#160;</script>
59 <!-- non-standard framework source files from xml-configuration -->
60 <xsl:apply-templates select="/root/sources[@context='Framework']/*"/>
61 <!-- Load framework configuration -->
62 <script type="text/javascript" src="/workbench/js/FrameworkConfiguration.js?{$randomNr}=">&#160;</script>
63
64 <!-- Application classes -->
65 <script type="text/javascript" src="/workbench/js/hippo/cms.js">&#160;</script>
66 <script type="text/javascript" src="/workbench/js/hippo/workbench.js">&#160;</script>
67 <script type="text/javascript" src="/workbench/js/hippo/container.js">&#160;</script>
68 <script type="text/javascript" src="/workbench/js/hippo/perspectives.js">&#160;</script>
69 <script type="text/javascript" src="/workbench/js/hippo/views.js">&#160;</script>
70 <script type="text/javascript" src="/workbench/js/hippo/keyboard.js">&#160;</script>
71 <!-- non-standard application source files from xml-configuration -->
72 <xsl:apply-templates select="/root/sources[@context='Application']/*"/>
73 <!-- Load application configuration -->
74 <script type="text/javascript" src="/workbench/js/ApplicationConfiguration.js?{$randomNr}=">&#160;</script>
75
76 <script>
77
78 var documentIsOpen = "false";
79
80 function openDocument(state)
81 {
82 documentIsOpen = state;
83 }
84 var scheduledTasks = new Array();
85 <xsl:if test="string-length($editUri) &gt; 0 and string-length($editType) &gt; 0">
86 scheduledTasks[scheduledTasks.length] = {'event':'editDocument','arguments':[{key:'url',val:'<xsl:value-of select="$editUri"/>'},{key:'type',val:'<xsl:value-of select="$editType"/>'}]};
87 </xsl:if>
88
89 //temporary workaround for 6.0.3.1 ONLY!
90 var CMS_PREVIEW_URL = '<xsl:value-of select="$previewURL"/>';
91 </script>
92
93 </head>
94
95 <!-- [DD] locking not supported now -->
96 <!--body onbeforeunload="window.location.href='/login/removeLocks';"-->
97 <body>
98 <!-- start body-->
99 <div id="container_main">
100 <!-- start top-->
101 <div id="top">
102 <!-- start top left: logo & navigation-->
103 <div id="top_left_container" >
104 <xsl:if test="count(/root/application//perspectives/perspective) &gt; 5">
105 <!-- default width in css is to small to align all icons when > 5 -->
106 <xsl:attribute name="style">width:<xsl:value-of select="count(/root/application//perspectives/perspective) * 116"/>px;</xsl:attribute>
107 </xsl:if>
108 <div id="logo">
109 <img class="unselectable" unselectable="on" src="/skins/images/logo_top.gif" alt="Hippo CMS" width="170" height="27"/>
110 </div>
111 <!-- start top navigation-->
112 <div id="nav">
113 <xsl:apply-templates select="/root/application//perspectives/*"/>
114 </div>
115 <!-- end top navigation-->
116 </div>
117 <!-- end top left-->
118 <!-- start top right: user data & search field-->
119 <div id="top_right_container_top">
120 <table cellspacing="0" cellpadding="3" class="user_data">
121 <tr>
122 <td class="unselectable username" unselectable="on">
123 <div id="usernameBox">
124 <xsl:choose>
125 <xsl:when test="string-length($fullname)&gt;0">
126 <xsl:value-of select="$fullname"/>
127 </xsl:when>
128 <xsl:otherwise>
129 <xsl:value-of select="$username"/>
130 </xsl:otherwise>
131 </xsl:choose>
132
133 </div>
134 </td>
135 <td class="unselectable" unselectable="on">
136 <img src="/skins/images/user_top.gif" alt="" width="10" height="8"/>
137 </td>
138 <td class="unselectable" unselectable="on">
139 <a href="/login/logout" target="_top">
140 <i18n:text>topmenu.logoffmessage</i18n:text>
141 </a>
142 </td>
143 <td class="unselectable" unselectable="on">
144 <a href="/login/logout" target="_top" class="unselectable" unselectable="on"
145 onfocus="document.getElementById('logoffIcon').style.border='1px solid #666';"
146 onblur="document.getElementById('logoffIcon').style.border='0px';">
147 <img src="/skins/images/logout.gif" alt="log out" width="14" height="9"/>
148 </a>
149 </td>
150 </tr>
151 </table>
152 </div>
153 <div id="top_right_container_bottom">
154 <form style="padding:0px; margin:0px;">
155 <xsl:attribute name="onsubmit">
156 <xsl:text>fireCMSEvent('doSearch',[{key:'reportID',val:'adv'},{key:'simpleSearch',val:document.getElementById('topSimpleSearch').value}]); return false;</xsl:text>
157 </xsl:attribute>
158 <table cellspacing="0" cellpadding="0" class="search_top">
159 <tr>
160 <td id="waitImage" style="visibility:hidden; vertical-align: bottom;">
161 <img class="unselectable" unselectable="on" src="/skin/images/clock_05.gif" alt="" width="26" height="24"/>
162 </td>
163 <td>&#160;</td>
164 <td class="search_top_divider_L"/>
165 <td class="form">
166 <input type="text" name="topSimpleSearch" id="topSimpleSearch"/>
167 </td>
168 <td class="form">&#160;</td>
169 <td class="form">
170 <button type="button" name="search" value="search" id="topSearchBtn">
171 <xsl:attribute name="onclick">
172 <xsl:text>fireCMSEvent('doSearch',[{key:'reportID',val:'adv'},{key:'simpleSearch',val:document.getElementById('topSimpleSearch').value}])</xsl:text>
173 </xsl:attribute>
174 <i18n:text>topmenu.toolbar.search</i18n:text>
175 </button>
176 </td>
177 <td class="search_top_divider_R"/>
178 </tr>
179 </table>
180 </form>
181 </div>
182 <!-- end top right -->
183 </div>
184 <!-- end top -->
185 <!-- start horizontal gray divider & breadcrumb bar-->
186 <div id="top_divider">&#160;</div>
187 <div unselectable="on" id="top_path_bar" class="unselectable">
188 <i18n:text>topmenu.toolbar.home</i18n:text>
189 <span id="top_breadcrumb" unselectable="on" class="unselectable">&#160;</span>
190 <span id="search_result_summary" unselectable="on" class="unselectable"></span>
191 <span id="search_result_extended_summary" unselectable="on" class="unselectable"></span>
192 </div>
193 <!-- end horizontal gray divider -->
194 </div>
195 </body>
196
197 </html>
198
199 </xsl:template>
200
201 <xsl:template match="perspective">
202 <table unselectable="on" cellspacing="0" cellpadding="0" class="nav_tbl unselectable">
203 <xsl:attribute name="onclick">fireCMSEvent('setFocus',[{key:'perspectiveID',val:'<xsl:value-of select="@id"/>'}])</xsl:attribute>
204 <tr>
205 <td unselectable="on" id="{@id}_tab_top" class="tab_top_empty unselectable"></td>
206 </tr>
207 <tr>
208 <td class="unselectable" id="{@id}" unselectable="on">
209 <div class="perspectiveTab unselectable" unselectable="on">
210 <xsl:attribute name="style">
211 <xsl:text>background: url(/skins/images/icons/24x24/</xsl:text>
212 <xsl:value-of select="@icon"/>
213 <xsl:text>.gif) 4px 2px no-repeat;</xsl:text>
214 </xsl:attribute>
215 <a href="#" unselectable="on" class="unselectable">
216 <xsl:value-of select="@label"/>
217 </a>
218 </div>
219 </td>
220 </tr>
221 </table>
222 </xsl:template>
223
224 <xsl:template match="perspective" mode="top-path-bar">
225 </xsl:template>
226
227 <xsl:template match="source">
228 <xsl:if test="string-length(.)&gt;0">
229 <script type="text/javascript" src="{.}">&#160;</script>
230 </xsl:if>
231 </xsl:template>
232
233 <xsl:template match="*" />
234
235 </xsl:stylesheet>