1*0d40e9d0SAdam Hornáček<%-- 2*0d40e9d0SAdam HornáčekCDDL HEADER START 3*0d40e9d0SAdam Hornáček 4*0d40e9d0SAdam HornáčekThe contents of this file are subject to the terms of the 5*0d40e9d0SAdam HornáčekCommon Development and Distribution License (the "License"). 6*0d40e9d0SAdam HornáčekYou may not use this file except in compliance with the License. 7*0d40e9d0SAdam Hornáček 8*0d40e9d0SAdam HornáčekSee LICENSE.txt included in this distribution for the specific 9*0d40e9d0SAdam Hornáčeklanguage governing permissions and limitations under the License. 10*0d40e9d0SAdam Hornáček 11*0d40e9d0SAdam HornáčekWhen distributing Covered Code, include this CDDL HEADER in each 12*0d40e9d0SAdam Hornáčekfile and include the License file at LICENSE.txt. 13*0d40e9d0SAdam HornáčekIf applicable, add the following below this CDDL HEADER, with the 14*0d40e9d0SAdam Hornáčekfields enclosed by brackets "[]" replaced with your own identifying 15*0d40e9d0SAdam Hornáčekinformation: Portions Copyright [yyyy] [name of copyright owner] 16*0d40e9d0SAdam Hornáček 17*0d40e9d0SAdam HornáčekCDDL HEADER END 18*0d40e9d0SAdam Hornáček 19*0d40e9d0SAdam HornáčekCopyright (c) 2007, 2017, Oracle and/or its affiliates. All rights reserved. 20*0d40e9d0SAdam Hornáček 21*0d40e9d0SAdam Hornáček--%> 22*0d40e9d0SAdam Hornáček<%@ page session="false" errorPage="error.jsp" import=" 23*0d40e9d0SAdam Hornáčekjava.io.File, 24*0d40e9d0SAdam Hornáčekjava.io.IOException, 25*0d40e9d0SAdam Hornáček 26*0d40e9d0SAdam Hornáčekorg.opensolaris.opengrok.configuration.Project, 27*0d40e9d0SAdam Hornáčekorg.opensolaris.opengrok.history.HistoryGuru, 28*0d40e9d0SAdam Hornáčekorg.opensolaris.opengrok.web.EftarFileReader, 29*0d40e9d0SAdam Hornáčekorg.opensolaris.opengrok.web.PageConfig, 30*0d40e9d0SAdam Hornáčekorg.opensolaris.opengrok.web.Prefix, 31*0d40e9d0SAdam Hornáčekorg.opensolaris.opengrok.web.Util"%><% 32*0d40e9d0SAdam Hornáček /* ---------------------- minisearch.jspf start --------------------- */ 33*0d40e9d0SAdam Hornáček{ 34*0d40e9d0SAdam Hornáček PageConfig cfg = PageConfig.get(request); 35*0d40e9d0SAdam Hornáček String context = request.getContextPath(); 36*0d40e9d0SAdam Hornáček%> 37*0d40e9d0SAdam Hornáček 38*0d40e9d0SAdam Hornáček<form action="<%= context + Prefix.SEARCH_P %>"> 39*0d40e9d0SAdam Hornáček<div id="bar"> 40*0d40e9d0SAdam Hornáček <ul> 41*0d40e9d0SAdam Hornáček <li><a href="<%= context %>/"><span id="home"></span>Home</a></li><% 42*0d40e9d0SAdam Hornáček if (cfg.getEnv().isHistoryEnabled()) { 43*0d40e9d0SAdam Hornáček if (!cfg.hasHistory()) { 44*0d40e9d0SAdam Hornáček %><li><span id="history"></span><span class="c">History</span></li><% 45*0d40e9d0SAdam Hornáček } else { 46*0d40e9d0SAdam Hornáček %><li><a href="<%= context + Prefix.HIST_L + cfg.getUriEncodedPath() 47*0d40e9d0SAdam Hornáček %>"><span id="history"></span>History</a></li><% 48*0d40e9d0SAdam Hornáček } 49*0d40e9d0SAdam Hornáček } 50*0d40e9d0SAdam Hornáček if (!cfg.hasAnnotations() /* || cfg.getPrefix() == Prefix.HIST_S */ ) { 51*0d40e9d0SAdam Hornáček %><li><span class="c"><span class="annotate"></span>Annotate</span></li><% 52*0d40e9d0SAdam Hornáček } else if (cfg.annotate()) { 53*0d40e9d0SAdam Hornáček %><li><span id="toggle-annotate-by-javascript" style="display: none"><a 54*0d40e9d0SAdam Hornáček href="#" onclick="javascript:toggle_annotations(); return false;" 55*0d40e9d0SAdam Hornáček title="Show or hide line annotation(commit revisions,authors)." 56*0d40e9d0SAdam Hornáček ><span class="annotate"></span>Annotate</a></span><span 57*0d40e9d0SAdam Hornáček id="toggle-annotate"><a href="#"><span class="annotate"></span> 58*0d40e9d0SAdam Hornáček Annotate</a></span></li><% 59*0d40e9d0SAdam Hornáček } else if (cfg.getPrefix() == Prefix.HIST_L) { 60*0d40e9d0SAdam Hornáček %><li> 61*0d40e9d0SAdam Hornáček <a href="#" 62*0d40e9d0SAdam Hornáček onclick="javascript: 63*0d40e9d0SAdam Hornáček window.location = '<%= context + Prefix.XREF_P + cfg.getUriEncodedPath() %>' 64*0d40e9d0SAdam Hornáček // taken from get_annotations() from utils.js 65*0d40e9d0SAdam Hornáček + '?a=true' 66*0d40e9d0SAdam Hornáček + (document.rev && document.rev() ? '&r=' + encodeURIComponent(document.rev()) : '') 67*0d40e9d0SAdam Hornáček + (window.location.hash ? '&h=' + window.location.hash.substring(1, window.location.hash.length) : ''); 68*0d40e9d0SAdam Hornáček return false;"> 69*0d40e9d0SAdam Hornáček <span class="annotate"></span> 70*0d40e9d0SAdam Hornáček Annotate 71*0d40e9d0SAdam Hornáček </a> 72*0d40e9d0SAdam Hornáček </li><% 73*0d40e9d0SAdam Hornáček } else { 74*0d40e9d0SAdam Hornáček %><li><a href="#" onclick="javascript:get_annotations(); return false;" 75*0d40e9d0SAdam Hornáček ><span class="annotate"></span>Annotate</a></li><% 76*0d40e9d0SAdam Hornáček } 77*0d40e9d0SAdam Hornáček if (!cfg.isDir()) { 78*0d40e9d0SAdam Hornáček if (cfg.getPrefix() == Prefix.XREF_P) { 79*0d40e9d0SAdam Hornáček %><li><a href="#" onclick="javascript:lntoggle();return false;" 80*0d40e9d0SAdam Hornáček title="<%= "Show or hide line numbers (might be slower if " 81*0d40e9d0SAdam Hornáček + "file has more than 10 000 lines)." 82*0d40e9d0SAdam Hornáček %>"><span id="line"></span>Line#</a></li> 83*0d40e9d0SAdam Hornáček <li><a href="#" class="scopes-toggle" 84*0d40e9d0SAdam Hornáček title="<%= "Toggle scopes window." 85*0d40e9d0SAdam Hornáček %>"><span id="line"></span>Scopes#</a></li><li><a 86*0d40e9d0SAdam Hornáček href="#" id="navigate" 87*0d40e9d0SAdam Hornáček title="Show or hide symbol list."><%-- 88*0d40e9d0SAdam Hornáček --%><span id="defbox"></span>Navigate#</a></li><% 89*0d40e9d0SAdam Hornáček } 90*0d40e9d0SAdam Hornáček %> 91*0d40e9d0SAdam Hornáček <li><a href="<%= context + Prefix.RAW_P + cfg.getUriEncodedPath() 92*0d40e9d0SAdam Hornáček + (cfg.getRequestedRevision().length() == 0 ? "" : "?r=" + Util.URIEncode(cfg.getRequestedRevision())) 93*0d40e9d0SAdam Hornáček %>"><span id="raw"></span>Raw</a></li> 94*0d40e9d0SAdam Hornáček <li><a href="<%= context + Prefix.DOWNLOAD_P + cfg.getUriEncodedPath() 95*0d40e9d0SAdam Hornáček + (cfg.getRequestedRevision().length() == 0 ? "" : "?r=" + Util.URIEncode(cfg.getRequestedRevision())) 96*0d40e9d0SAdam Hornáček %>"><span id="download"></span>Download</a></li> 97*0d40e9d0SAdam Hornáček <% 98*0d40e9d0SAdam Hornáček } 99*0d40e9d0SAdam Hornáček %><li><input type="text" id="search" name="q" class="q" /> 100*0d40e9d0SAdam Hornáček <input type="submit" value="Search" class="submit" /></li><% 101*0d40e9d0SAdam Hornáček Project proj = cfg.getProject(); 102*0d40e9d0SAdam Hornáček String[] vals = cfg.getSearchOnlyIn(); 103*0d40e9d0SAdam Hornáček %><li><input type="checkbox" name="path" value='"<%= vals[0] 104*0d40e9d0SAdam Hornáček %>"' <%= vals[2] %>/> current directory</li> 105*0d40e9d0SAdam Hornáček </ul><% 106*0d40e9d0SAdam Hornáček if (proj != null) { 107*0d40e9d0SAdam Hornáček %> 108*0d40e9d0SAdam Hornáček <input type="hidden" name="project" value="<%=proj.getName()%>" /><% 109*0d40e9d0SAdam Hornáček } 110*0d40e9d0SAdam Hornáček%> 111*0d40e9d0SAdam Hornáček <input type="hidden" id="contextpath" value="<%=request.getContextPath()%>" /> 112*0d40e9d0SAdam Hornáček</div> 113*0d40e9d0SAdam Hornáček </form> 114*0d40e9d0SAdam Hornáček </div> 115*0d40e9d0SAdam Hornáček<div id="content"> 116*0d40e9d0SAdam Hornáček<% 117*0d40e9d0SAdam Hornáček} 118*0d40e9d0SAdam Hornáček/* ---------------------- minisearch.jspf end --------------------- */ 119*0d40e9d0SAdam Hornáček%>