10d40e9d0SAdam Hornáček<%-- 20d40e9d0SAdam Hornáček$Id$ 30d40e9d0SAdam Hornáček 40d40e9d0SAdam HornáčekCDDL HEADER START 50d40e9d0SAdam Hornáček 60d40e9d0SAdam HornáčekThe contents of this file are subject to the terms of the 70d40e9d0SAdam HornáčekCommon Development and Distribution License (the "License"). 80d40e9d0SAdam HornáčekYou may not use this file except in compliance with the License. 90d40e9d0SAdam Hornáček 100d40e9d0SAdam HornáčekSee LICENSE.txt included in this distribution for the specific 110d40e9d0SAdam Hornáčeklanguage governing permissions and limitations under the License. 120d40e9d0SAdam Hornáček 130d40e9d0SAdam HornáčekWhen distributing Covered Code, include this CDDL HEADER in each 140d40e9d0SAdam Hornáčekfile and include the License file at LICENSE.txt. 150d40e9d0SAdam HornáčekIf applicable, add the following below this CDDL HEADER, with the 160d40e9d0SAdam Hornáčekfields enclosed by brackets "[]" replaced with your own identifying 170d40e9d0SAdam Hornáčekinformation: Portions Copyright [yyyy] [name of copyright owner] 180d40e9d0SAdam Hornáček 190d40e9d0SAdam HornáčekCDDL HEADER END 200d40e9d0SAdam Hornáček 21*aa18fa28SAdam HornacekCopyright (c) 2005, 2021, Oracle and/or its affiliates. All rights reserved. 220d40e9d0SAdam HornáčekPortions Copyright 2011 Jens Elkner. 23a804b2d7SAdam HornáčekPortions Copyright (c) 2018, Chris Fraire <cfraire@me.com>. 240d40e9d0SAdam Hornáček 250d40e9d0SAdam Hornáček--%><%-- 260d40e9d0SAdam Hornáček 270d40e9d0SAdam HornáčekAfter include you are here: /body/div#page/div#content/ 280d40e9d0SAdam Hornáček 290d40e9d0SAdam Hornáček--%> 30a804b2d7SAdam Hornáček<%@page contentType="text/html; charset=UTF-8" pageEncoding="UTF-8"%> 314ce4e2b9SAdam Hornáček<%@page import="org.opengrok.indexer.web.messages.MessagesContainer"%> 320d40e9d0SAdam Hornáček<%@ page session="false" errorPage="error.jsp" import=" 33d8a7afe2SAdam Hornacekorg.opengrok.web.PageConfig, 34686556f2SAdam Hornáčekorg.opengrok.indexer.web.Prefix, 353db691beSVladimir Kotalorg.opengrok.indexer.web.Util"%> 363db691beSVladimir Kotal<%@ page import="org.opengrok.indexer.web.messages.MessagesUtils" %> 379554a08aSVladimir Kotal<%@ page import="jakarta.servlet.http.HttpServletResponse" %> 383db691beSVladimir Kotal<% 390d40e9d0SAdam Hornáček/* ---------------------- mast.jsp start --------------------- */ 400d40e9d0SAdam Hornáček{ 410d40e9d0SAdam Hornáček PageConfig cfg = PageConfig.get(request); 429554a08aSVladimir Kotal if (cfg.isUnreadable()) { 439554a08aSVladimir Kotal response.sendError(HttpServletResponse.SC_FORBIDDEN); 449554a08aSVladimir Kotal return; 459554a08aSVladimir Kotal } 469554a08aSVladimir Kotal 470d40e9d0SAdam Hornáček String redir = cfg.canProcess(); 480d40e9d0SAdam Hornáček if (redir == null || redir.length() > 0) { 490d40e9d0SAdam Hornáček if (redir == null) { 500d40e9d0SAdam Hornáček response.sendError(HttpServletResponse.SC_NOT_FOUND); 510d40e9d0SAdam Hornáček } else { 520d40e9d0SAdam Hornáček response.sendRedirect(redir); 530d40e9d0SAdam Hornáček } 540d40e9d0SAdam Hornáček return; 550d40e9d0SAdam Hornáček } 560d40e9d0SAdam Hornáček 577d84fb5dSKryštof Tulinger if (cfg.isNotModified(request, response)) { 587d84fb5dSKryštof Tulinger // the resource was not modified 597d84fb5dSKryštof Tulinger // the code 304 NOT MODIFIED has been inserted to the response 600d40e9d0SAdam Hornáček return; 610d40e9d0SAdam Hornáček } 620d40e9d0SAdam Hornáček 630d40e9d0SAdam Hornáček // Use UTF-8 if no encoding is specified in the request 640d40e9d0SAdam Hornáček if (request.getCharacterEncoding() == null) { 650d40e9d0SAdam Hornáček request.setCharacterEncoding("UTF-8"); 660d40e9d0SAdam Hornáček } 670d40e9d0SAdam Hornáček 680d40e9d0SAdam Hornáček // set the default page title 690d40e9d0SAdam Hornáček String path = cfg.getPath(); 700d40e9d0SAdam Hornáček cfg.setTitle(cfg.getPathTitle()); 710d40e9d0SAdam Hornáček} 720d40e9d0SAdam Hornáček%> 730d40e9d0SAdam Hornáček<%@ 740d40e9d0SAdam Hornáček 750d40e9d0SAdam Hornáčekinclude file="httpheader.jspf" 760d40e9d0SAdam Hornáček 770d40e9d0SAdam Hornáček %><body> 780d40e9d0SAdam Hornáček<script type="text/javascript">/* <![CDATA[ */ 790d40e9d0SAdam Hornáček document.rev = function() { return getParameter("r"); }; 800d40e9d0SAdam Hornáček document.annotate = <%= PageConfig.get(request).annotate() %>; 810d40e9d0SAdam Hornáček document.domReady.push(function() { domReadyMast(); }); 820d40e9d0SAdam Hornáček document.pageReady.push(function() { pageReadyMast(); }); 830d40e9d0SAdam Hornáček/* ]]> */</script> 840d40e9d0SAdam Hornáček<div id="page"> 85*aa18fa28SAdam Hornacek <header id="whole_header"> 86*aa18fa28SAdam Hornacek <%@include file="pageheader.jspf" %> 870d40e9d0SAdam Hornáček<div id="Masthead"> 880d40e9d0SAdam Hornáček <% 890d40e9d0SAdam Hornáček{ 900d40e9d0SAdam Hornáček PageConfig cfg = PageConfig.get(request); 910d40e9d0SAdam Hornáček String path = cfg.getPath(); 920d40e9d0SAdam Hornáček String context = request.getContextPath(); 930d40e9d0SAdam Hornáček String rev = cfg.getRequestedRevision(); 940d40e9d0SAdam Hornáček 953db691beSVladimir Kotal String messages = ""; 960d40e9d0SAdam Hornáček if (cfg.getProject() != null) { 973db691beSVladimir Kotal messages = MessagesUtils.messagesToJson(cfg.getProject(), 984ce4e2b9SAdam Hornáček MessagesContainer.MESSAGES_MAIN_PAGE_TAG); 990d40e9d0SAdam Hornáček } 1000d40e9d0SAdam Hornáček %> 1012a2d1e35SVladimir Kotal <a href="<%= context + Prefix.XREF_P %>/">xref</a>: 1022a2d1e35SVladimir Kotal <%= Util.breadcrumbPath(context + Prefix.XREF_P, path,'/',"",true,cfg.isDir()) %> 1030d40e9d0SAdam Hornáček <% if (rev.length() != 0) { %> 1040d40e9d0SAdam Hornáček (revision <%= Util.htmlize(rev) %>) 1050d40e9d0SAdam Hornáček <% } %> 1060d40e9d0SAdam Hornáček <span id="dtag"> 1070d40e9d0SAdam Hornáček <% 1080d40e9d0SAdam Hornáček String dtag = cfg.getDefineTagsIndex(); 1090d40e9d0SAdam Hornáček if (dtag.length() > 0) { 1100d40e9d0SAdam Hornáček %> (<%= dtag %>)<% 1110d40e9d0SAdam Hornáček } 1120d40e9d0SAdam Hornáček %></span> 1130d40e9d0SAdam Hornáček <% if (!messages.isEmpty()) { %> 11457396dcbSVladimir Kotal <span class="note-<%= MessagesUtils.getMessageLevel(cfg.getProject().getName(), MessagesContainer.MESSAGES_MAIN_PAGE_TAG) %> important-note important-note-rounded" 1150d40e9d0SAdam Hornáček data-messages='<%= messages %>'>!</span> 1160d40e9d0SAdam Hornáček <% } 1170d40e9d0SAdam Hornáček} 1180d40e9d0SAdam Hornáček%> 1190d40e9d0SAdam Hornáček</div> 1200d40e9d0SAdam Hornáček<%@ 1210d40e9d0SAdam Hornáček 1220d40e9d0SAdam Hornáčekinclude file="minisearch.jspf" 1230d40e9d0SAdam Hornáček 1240d40e9d0SAdam Hornáček%> 1250d40e9d0SAdam Hornáček<% 1260d40e9d0SAdam Hornáček/* ---------------------- mast.jsp end --------------------- */ 1270d40e9d0SAdam Hornáček%> 128