<%--
$Id$
CDDL HEADER START
The contents of this file are subject to the terms of the
Common Development and Distribution License (the "License").
You may not use this file except in compliance with the License.
See LICENSE.txt included in this distribution for the specific
language governing permissions and limitations under the License.
When distributing Covered Code, include this CDDL HEADER in each
file and include the License file at LICENSE.txt.
If applicable, add the following below this CDDL HEADER, with the
fields enclosed by brackets "[]" replaced with your own identifying
information: Portions Copyright [yyyy] [name of copyright owner]
CDDL HEADER END
Copyright (c) 2005, 2010, Oracle and/or its affiliates. All rights reserved.
Portions Copyright 2011 Jens Elkner.
--%><%--
--%><%@ page session="false" errorPage="error.jsp"%><%
/* ---------------------- mast.jsp start --------------------- */
{
cfg = PageConfig.get(request);
String redir = cfg.canProcess();
if (redir == null || redir.length() > 0) {
if (redir == null) {
} else {
response.sendRedirect(redir);
}
return;
}
long flast = cfg.getLastModified()/1000 * 1000;
long lmdate = cfg.getConfig().getLastModified();
if (lmdate > flast) {
flast = lmdate;
}
if (request.getDateHeader("If-Modified-Since") >= flast) {
return;
}
response.setDateHeader("Last-Modified", flast);
// Use UTF-8 if no encoding is specified in the request
if (request.getCharacterEncoding() == null) {
request.setCharacterEncoding("UTF-8");
}
// set the default page title
String path = cfg.getPath();
cfg.setTitle("Cross Reference: " + Util.htmlize(path));
String context = request.getContextPath();
cfg.getConfig().setUrlPrefix(context + Prefix.SEARCH_R + "?");
String uriEncodedPath = cfg.getUriEncodedPath();
String rev = cfg.getRequestedRevision();
StringBuilder js = new StringBuilder(256);
js.append("O.linkHome='").append(context).append("/';")
.append("O.linkXref='").append(context).append(Prefix.XREF_P)
.append(uriEncodedPath).append("';");
if (rev.length() > 0) {
}
if (cfg.hasHistory()) {
.append(uriEncodedPath).append("';");
}
if (!cfg.isDir()) {
.append(uriEncodedPath).append("';");
}
if (cfg.annotate()) {
js.append("O.annotated=true;");
}
if (cfg.hasAnnotations()) {
js.append("O.hasAnnotations=true;");
}
if (cfg.isDir()) {
}
if (cfg.getPrefix() == Prefix.XREF_P) {
}
String hash = cfg.getDocumentHash();
if (hash != null) {
js.append("window.location.hash='").append(hash).append("';");
}
%><%@
include file="httpheader.jspf"
%><body class="yui3-skin-sam">
<script type="text/javascript">/* <![CDATA[ */
<%= js %>
/* ]]> */</script>
<div id="page">
<div id="whole_header">
<form action="<%= context + Prefix.SEARCH_P %>">
<div id="header"><%@
include file="pageheader.jspf"
%>
<div id="pagetitle"><span id="filename"
>Cross Reference: <%= Util.htmlize(cfg.getCrossFilename()) %></span><%
String dtag = cfg.getDefineTagsIndex();
if (dtag.length() > 0) {
%><br/><%= Util.htmlize(dtag) %><%
}
%></div>
</div>
<div id="Masthead">
<a href="<%= context + Prefix.XREF_P %>/">xref</a>: <%= Util
.breadcrumbPath(context + Prefix.XREF_P, path,'/', "", true, cfg.isDir())
%>
</div>
<div id="bar">
<ul>
<li><a><span id="home"></span>Home</a></li>
<li><a><span id="history"></span>History</a></li>
<li><a title="Show or hide line annotation (revisions, authors)"
><span id="annotate"></span>Annotate</a></li>
<li><a title="Show or hide line numbers"
><span id="line"></span>Line#</a></li>
<li><a title="Show or hide symbol list"
><span id="defbox"></span>Navigate</a></li>
<li><a><span id="download"></span>Download</a></li>
<li><input type="text" id="search" name="q" />
<button type="submit" class="submit">Search</button></li><%
Project proj = cfg.getProject();
String[] vals = cfg.getSearchOnlyIn();
%><li><input type="checkbox" name="path" value="<%= vals[0]
%>" title="<%= vals[0] %>" <%= vals[1] %>/> only in <b>./</b></li>
</ul><%
if (proj != null) {
%>
<input type="hidden" name="project" value="<%=proj.getDescription()%>" /><%
}
%>
</div>
</form>
</div>
<div id="content">
<%
}
/* ---------------------- mast.jsp end --------------------- */
%>