Skip to main content
aboutsummaryrefslogtreecommitdiffstats
blob: 1cd098717f4c1b3a576ab10d55eb573f28b6edae (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
<!-- **************************************************************************
#
# Copyright  (c) 2004-2010 Oracle Corporation.
#
# All rights reserved. This program and the accompanying materials
# are made available under the terms of the Eclipse Public License v1.0
# which accompanies this distribution, and is available at
# http://www.eclipse.org/legal/epl-v10.html
#
# Contributors:
#
#    Kohsuke Kawaguchi, Nikita Levyankov
#
#
#************************************************************************** -->

<?jelly escape-by-default='true'?>
<j:jelly xmlns:j="jelly:core" xmlns:st="jelly:stapler" xmlns:d="jelly:define" xmlns:l="/lib/layout" xmlns:i="jelly:fmt">
    <st:documentation>
    Outer-most tag for a normal (non-AJAX) HTML rendering.
    This is used with nested &lt;header>, &lt;side-panel>, and &lt;main-panel>
    to form Hudson's basic HTML layout.

        <st:attribute name="title" use="required">
      Title of the HTML page. Rendered into &lt;title> tag.
        </st:attribute>
        <st:attribute name="norefresh">
      If non-null, auto refresh is disabled on this page.
      This is necessary for pages that include forms.
        </st:attribute>
        <st:attribute name="css" deprecated="true">
      specify path that starts from "/" for loading additional CSS stylesheet.
      path is interprted as relative to the context root. e.g.,

      {noformat}&lt;l:layout css="/plugin/mysuperplugin/css/myneatstyle.css">{noformat}

      This was originally added to allow plugins to load their stylesheets, but
      *the use of thie attribute is discouraged now.*
      plugins should now do so by inserting &lt;style> elements and/or &lt;script> elements
      in &lt;l:header/> tag.
        </st:attribute>
        <st:attribute name="permission">
      If given, this page is only made available to users that has the specified permission.
      (The permission will be checked against the "it" object.)
        </st:attribute>
    </st:documentation>
    <st:header name="Expires" value="0" />
    <st:header name="X-Hudson-Theme" value="default" />
    <st:contentType value="text/html;charset=UTF-8" />
    <!-- The path starts with a "/" character but does not end with a "/" character. -->
    <j:set var="rootURL" value="${request.contextPath}" />
    <j:new var="h" className="hudson.Functions" /><!-- instead of JSP functions -->
    <j:new var="cu" className="hudson.util.CascadingUtil"/> <!-- Utility for cascading functionality -->
    <j:set var="_" value="${h.configureAutoRefresh(request, response, attrs.norefresh!=null)}"/>
    <!--
      load static resources from the path dedicated to a specific version.
      This "/static/VERSION/abc/def.ghi" path is interpreted by stapler to be
      the same thing as "/abc/def.ghi", but this avoids the stale cache
      problem when the user upgrades to new Hudson. Stapler also sets a long
      future expiration dates for such static resources.
    -->
    <j:set var="resURL"  value="${rootURL}${h.resourcePath}" />
    <j:set var="imagesURL"  value="${rootURL}${h.resourcePath}/images" />
    <html>
        <head>
            ${h.checkPermission(it,permission)}

            <title>${h.appendIfNotNull(title, ' [Hudson]', 'Hudson')}</title>
            <link rel="stylesheet" href="${resURL}/css/style.css?${h.version}" type="text/css" />
            <link rel="stylesheet" href="${resURL}/css/color.css" type="text/css" />
            <j:if test="${attrs.css!=null}">
                <link rel="stylesheet" href="${rootURL}${attrs.css}" type="text/css" />
            </j:if>
            <link rel="shortcut icon" href="${resURL}/favicon.ico" type="image/vnd.microsoft.icon" />

            <!-- are we running as an unit test? -->
            <script>var isRunAsTest=${h.isUnitTest}; var rootURL="${rootURL}";</script>

            <script src="${resURL}/scripts/prototype-1.7.js" type="text/javascript"></script>
            <script src="${resURL}/scripts/ext-prototype.js" type="text/javascript"></script>
            <script src="${resURL}/scripts/behavior.js" type="text/javascript"></script>
            <script src="${resURL}/scripts/sortable.js" type="text/javascript"></script>
            <script src="${resURL}/scripts/jquery-1.6.4.min.js" type="text/javascript"></script>
            <script src="${resURL}/scripts/jquery.blockUI-2.39.js" type="text/javascript"></script>

            <!-- To use the debug version of YUI, set the system property 'debug.YUI' to true -->
            <!--
            <j:set var="yuiSuffix" value="${h.yuiSuffix}" />
            -->
            <j:set var="yuiSuffix" value="min" />
            <l:yui module="yahoo" />
            <l:yui module="dom" />
            <l:yui module="event" />
            <j:if test="${h.yuiSuffix=='debug'}">
                <l:yui module="logger" />
            </j:if>
            <l:yui module="animation" />
            <l:yui module="dragdrop" />
            <l:yui module="container" />
            <l:yui module="connection" />
            <l:yui module="datasource" />
            <l:yui module="autocomplete" />
            <l:yui module="menu" />
            <l:yui module="element"/>
            <l:yui module="button" />
            <!--l:yui module="editor" suffix="-beta" /-->

            <script src="${resURL}/scripts/hudson-behavior.js?${h.version}" type="text/javascript"></script>
            <script src="${resURL}/scripts/cascading.js?${h.version}" type="text/javascript"></script>
            <script>
               crumb.init("${h.getCrumbRequestField()}", "${h.getCrumb(request)}");
            </script>
    
            <link rel="stylesheet" href="${resURL}/scripts/yui/container/assets/container.css" type="text/css"/>
            <link rel="stylesheet" href="${resURL}/scripts/yui/assets/skins/sam/skin.css" type="text/css" />
            <link rel="stylesheet" href="${resURL}/scripts/yui/container/assets/skins/sam/container.css" type="text/css"/>
            <link rel="stylesheet" href="${resURL}/scripts/yui/button/assets/skins/sam/button.css" type="text/css" />
            <link rel="stylesheet" href="${resURL}/scripts/yui/menu/assets/skins/sam/menu.css" type="text/css" />
            <!--link rel="stylesheet" href="${resURL}/scripts/yui/editor/assets/skins/sam/editor.css" type="text/css" /-->

            <link rel="search" type="application/opensearchdescription+xml" href="${rootURL}/opensearch.xml" title="Hudson" />
            <meta name="ROBOTS" content="INDEX,NOFOLLOW" />
            <j:set var="mode" value="header" />
            <d:invokeBody />
            <j:forEach var="pd" items="${h.pageDecorators}">
                <st:include it="${pd}" page="header.jelly" optional="true" />
            </j:forEach>
        </head>
        <body class="yui-skin-sam">
            <!-- for accessibility, skip the entire navigation bar and etc and go straight to the head of the content -->
            <a href="#skip2content" class="skiplink">Skip to content</a>
            <table id="main-table" style="min-width:225px; background-image:url(${imagesURL}/header-bar.png); background-repeat:repeat-x" 
                   border="0" cellspacing="0" cellpadding="0" height="100%" width="100%"  bgcolor="#FAF7FD">
                <tr>
                     <!-- Left Panel -->
                    <td id="side-panel" height="100%" width="25%" style="min-width:225px">
                         <!-- Hudson Logo -->
                        <div>
                            <a href="${rootURL}/"><img src="${imagesURL}/hudson-logo.png" alt="Hudson logo" /></a>
                        </div>
                         
                         <!-- Left Navigation Bar -->
                        <div id="navigation" style="padding:5px">
                            <j:set var="mode" value="side-panel" />
                            <d:invokeBody />

                            <!-- add YUI logger if debugging YUI -->
                            <j:if test="${h.yuiSuffix=='debug'}">
                                <div id="yui-logreader" style="margin-top:1em"/>
                                <script>
                                    Behaviour.addLoadEvent(function(){
                                      var logReader = new YAHOO.widget.LogReader("yui-logreader");
                                      logReader.collapse();
                                    });
                                </script>
                            </j:if>
                        </div>
                    </td>   
                    <!-- Right Panel -->
                    <td height="100%">
                        <div style="margin-bottom:1px;">
                            
                            <table id="header" cellpadding="0" cellspacing="0" width="100%" border="0">
                                <tr>
                                    <td colspan="2">
                                        <table cellpadding="2" cellspacing="3" width="100%" border="0">
                                            <tr>
                                             
                                                <td style="vertical-align: middle; text-align: right; padding-right: 1em;">
                                                <!-- search box -->
                                                    <j:set var="searchURL" value="${h.searchURL}"/>
                                                    <form action="${searchURL}" method="get" style="position:relative;" class="no-json" name="search">
                                                    <!-- this div determines the minimum width -->
                                                        <div id="search-box-minWidth"/>
                                                    <!-- this div is used to calculate the width of the text box -->
                                                        <div id="search-box-sizer"/>
                                                        <div id="searchform">
                                                            <input name="q" value="search" id="search-box" class="has-default-text defaulted" />
                                                            <st:nbsp />
                                                            <a href="${%searchBox.url}">
                                                                <img src="${imagesURL}/16x16/help.png" alt="help for search" />
                                                            </a>
                                                            <div id="search-box-completion" />
                                                            <script>createSearchBox("${searchURL}");</script>
                                                        </div>
                                                    </form>
                                                </td>
                                                <td id="login-field">
                                                    <span>
                                                    <!-- login field -->
                                                        <j:if test="${app.useSecurity}">
                                                            <st:nbsp/>
                                                            <j:choose>
                                                                <j:when test="${!h.isAnonymous()}">
                                                                    <span style="white-space:nowrap">
                                                                        <a href="${rootURL}/user/${app.authentication.name}">
                                                                            <b>${app.authentication.name}</b>
                                                                        </a>
                                                                        <j:if test="${app.securityRealm.canLogOut()}">
                                                                            |
                                                                            <a href="${rootURL}/logout">
                                                                                <b>${%logout}</b>
                                                                            </a>
                                                                        </j:if>
                                                                    </span>
                                                                </j:when>
                                                                <j:otherwise>
                                                                    <st:include it="${app.securityRealm}" page="loginLink.jelly" />
                                                                </j:otherwise>
                                                            </j:choose>
                                                        </j:if>
                                                    </span>
                                                </td>
                                            </tr>
                                        </table>
                                    </td>
                                </tr>

                                <tr id="top-nav" >
                                    <td id="left-top-nav">
                                        <j:forEach var="anc" items="${request.ancestors}">
                                            <j:if test="${h.isModel(anc.object)}">
                                                <j:if test="${anc.prev.url!=anc.url}">
                                                    <j:if test="${anc.prev!=null}">
                                                        <j:whitespace> &#187; </j:whitespace>
                                                    </j:if>
                                                    <a href="${anc.url}/">
                                                     ${anc.object.displayName}
                                                    </a>
                                                </j:if>
                                            </j:if>
                                        </j:forEach>
                                    </td>
                                    <td id="right-top-nav">
                                        <j:if test="${attrs.norefresh==null}">
                                            <span class="smallfont">
                                                <j:choose>
                                                    <j:when test="${h.isAutoRefresh(request)}">
                                                        <a href="?auto_refresh=false">${%DISABLE AUTO REFRESH}</a>
                                                    </j:when>
                                                    <j:otherwise>
                                                        <a href="?auto_refresh=true">${%ENABLE AUTO REFRESH}</a>
                                                    </j:otherwise>
                                                </j:choose>
                                            </span>
                                        </j:if>
                                    </td>
                                </tr>
                            
                            </table>
                        </div>
                        
                        <div style=" height:100%"> 
                            <img src="${imagesURL}/top-left-round.png" style="float:left"/>
                            <div style="margin-left:25; height:25; background-image:url(${imagesURL}/spacer.png); background-repeat:repeat-x" /> 
                            <div id="main-panel-container" style=" background-color:#FFFFFF; padding-left: 10px; height:100%">
                                <table width="95%" height="100%" border="0">
                                    <tr>
                                        <td id="global-messages" width="100%">
                                            <j:forEach var="globalMessage" items="${app.globalMessages}">
                                                <j:if test="${globalMessage.enabled}">
                                                    <div class="global-message">
                                                        <st:include page="detail.jelly" it="${globalMessage}"/>
                                                    </div>
                                                </j:if>
                                            </j:forEach>
                                        </td>
                                    </tr>
                                    <tr>
                                        <td id="main-panel" width="100%" height="100%">
                                            <j:set var="mode" value="main-panel" />
                                            <d:invokeBody/>
                                        </td>
                                    </tr>
                                </table>
                                <br style="clear:both"/>  
                            </div>
                             
                        </div>
                    
                    </td>
                </tr>
            
                <tr>
                    <table width="100%">
                        <tr>
                            <td id="footer">
                                <span style="padding-right:2em; color:gray">
                            ${%Page generated}:
                                    <i:formatDate value="${h.getCurrentTime()}" type="both" dateStyle="medium" timeStyle="medium"/>
                                </span>
                                <a href="http://hudson-ci.org/">Hudson ver. ${h.version}</a>
                            </td>
                        </tr>
                    </table>
                    <j:forEach var="pd" items="${h.pageDecorators}">
                        <st:include it="${pd}" page="footer.jelly" optional="true" />
                    </j:forEach>
                </tr>
            </table>
        </body>
    </html>
</j:jelly>

Back to the top