10d40e9d0SAdam Hornáček<%-- 20d40e9d0SAdam HornáčekCDDL HEADER START 30d40e9d0SAdam Hornáček 40d40e9d0SAdam HornáčekThe contents of this file are subject to the terms of the 50d40e9d0SAdam HornáčekCommon Development and Distribution License (the "License"). 60d40e9d0SAdam HornáčekYou may not use this file except in compliance with the License. 70d40e9d0SAdam Hornáček 80d40e9d0SAdam HornáčekSee LICENSE.txt included in this distribution for the specific 90d40e9d0SAdam Hornáčeklanguage governing permissions and limitations under the License. 100d40e9d0SAdam Hornáček 110d40e9d0SAdam HornáčekWhen distributing Covered Code, include this CDDL HEADER in each 120d40e9d0SAdam Hornáčekfile and include the License file at LICENSE.txt. 130d40e9d0SAdam HornáčekIf applicable, add the following below this CDDL HEADER, with the 140d40e9d0SAdam Hornáčekfields enclosed by brackets "[]" replaced with your own identifying 150d40e9d0SAdam Hornáčekinformation: Portions Copyright [yyyy] [name of copyright owner] 160d40e9d0SAdam Hornáček 170d40e9d0SAdam HornáčekCDDL HEADER END 180d40e9d0SAdam Hornáček 19*d21d069fSAdam HornáčekCopyright (c) 2007, 2019, Oracle and/or its affiliates. All rights reserved. 200d40e9d0SAdam Hornáček 210d40e9d0SAdam Hornáček--%> 220d40e9d0SAdam Hornáček<%@ page session="false" errorPage="error.jsp" import=" 230d40e9d0SAdam Hornáčekjava.io.File, 240d40e9d0SAdam Hornáčekjava.io.IOException, 250d40e9d0SAdam Hornáček 26686556f2SAdam Hornáčekorg.opengrok.indexer.configuration.Project, 27686556f2SAdam Hornáčekorg.opengrok.indexer.history.HistoryGuru, 28686556f2SAdam Hornáčekorg.opengrok.indexer.web.EftarFileReader, 29686556f2SAdam Hornáčekorg.opengrok.indexer.web.PageConfig, 30686556f2SAdam Hornáčekorg.opengrok.indexer.web.Prefix, 31686556f2SAdam Hornáčekorg.opengrok.indexer.web.Util"%><% 320d40e9d0SAdam Hornáček /* ---------------------- minisearch.jspf start --------------------- */ 330d40e9d0SAdam Hornáček{ 340d40e9d0SAdam Hornáček PageConfig cfg = PageConfig.get(request); 350d40e9d0SAdam Hornáček String context = request.getContextPath(); 360d40e9d0SAdam Hornáček%> 370d40e9d0SAdam Hornáček 380d40e9d0SAdam Hornáček<form action="<%= context + Prefix.SEARCH_P %>"> 390d40e9d0SAdam Hornáček<div id="bar"> 400d40e9d0SAdam Hornáček <ul> 410d40e9d0SAdam Hornáček <li><a href="<%= context %>/"><span id="home"></span>Home</a></li><% 420d40e9d0SAdam Hornáček if (cfg.getEnv().isHistoryEnabled()) { 430d40e9d0SAdam Hornáček if (!cfg.hasHistory()) { 440d40e9d0SAdam Hornáček %><li><span id="history"></span><span class="c">History</span></li><% 450d40e9d0SAdam Hornáček } else { 460d40e9d0SAdam Hornáček %><li><a href="<%= context + Prefix.HIST_L + cfg.getUriEncodedPath() 470d40e9d0SAdam Hornáček %>"><span id="history"></span>History</a></li><% 480d40e9d0SAdam Hornáček } 490d40e9d0SAdam Hornáček } 500d40e9d0SAdam Hornáček if (!cfg.hasAnnotations() /* || cfg.getPrefix() == Prefix.HIST_S */ ) { 510d40e9d0SAdam Hornáček %><li><span class="c"><span class="annotate"></span>Annotate</span></li><% 520d40e9d0SAdam Hornáček } else if (cfg.annotate()) { 530d40e9d0SAdam Hornáček %><li><span id="toggle-annotate-by-javascript" style="display: none"><a 540d40e9d0SAdam Hornáček href="#" onclick="javascript:toggle_annotations(); return false;" 550d40e9d0SAdam Hornáček title="Show or hide line annotation(commit revisions,authors)." 560d40e9d0SAdam Hornáček ><span class="annotate"></span>Annotate</a></span><span 570d40e9d0SAdam Hornáček id="toggle-annotate"><a href="#"><span class="annotate"></span> 580d40e9d0SAdam Hornáček Annotate</a></span></li><% 590d40e9d0SAdam Hornáček } else if (cfg.getPrefix() == Prefix.HIST_L) { 600d40e9d0SAdam Hornáček %><li> 610d40e9d0SAdam Hornáček <a href="#" 620d40e9d0SAdam Hornáček onclick="javascript: 630d40e9d0SAdam Hornáček window.location = '<%= context + Prefix.XREF_P + cfg.getUriEncodedPath() %>' 640d40e9d0SAdam Hornáček // taken from get_annotations() from utils.js 650d40e9d0SAdam Hornáček + '?a=true' 660d40e9d0SAdam Hornáček + (document.rev && document.rev() ? '&r=' + encodeURIComponent(document.rev()) : '') 670d40e9d0SAdam Hornáček + (window.location.hash ? '&h=' + window.location.hash.substring(1, window.location.hash.length) : ''); 680d40e9d0SAdam Hornáček return false;"> 690d40e9d0SAdam Hornáček <span class="annotate"></span> 700d40e9d0SAdam Hornáček Annotate 710d40e9d0SAdam Hornáček </a> 720d40e9d0SAdam Hornáček </li><% 730d40e9d0SAdam Hornáček } else { 740d40e9d0SAdam Hornáček %><li><a href="#" onclick="javascript:get_annotations(); return false;" 750d40e9d0SAdam Hornáček ><span class="annotate"></span>Annotate</a></li><% 760d40e9d0SAdam Hornáček } 770d40e9d0SAdam Hornáček if (!cfg.isDir()) { 780d40e9d0SAdam Hornáček if (cfg.getPrefix() == Prefix.XREF_P) { 790d40e9d0SAdam Hornáček %><li><a href="#" onclick="javascript:lntoggle();return false;" 800d40e9d0SAdam Hornáček title="<%= "Show or hide line numbers (might be slower if " 810d40e9d0SAdam Hornáček + "file has more than 10 000 lines)." 820d40e9d0SAdam Hornáček %>"><span id="line"></span>Line#</a></li> 830d40e9d0SAdam Hornáček <li><a href="#" class="scopes-toggle" 840d40e9d0SAdam Hornáček title="<%= "Toggle scopes window." 850d40e9d0SAdam Hornáček %>"><span id="line"></span>Scopes#</a></li><li><a 860d40e9d0SAdam Hornáček href="#" id="navigate" 870d40e9d0SAdam Hornáček title="Show or hide symbol list."><%-- 880d40e9d0SAdam Hornáček --%><span id="defbox"></span>Navigate#</a></li><% 890d40e9d0SAdam Hornáček } 900d40e9d0SAdam Hornáček %> 910d40e9d0SAdam Hornáček <li><a href="<%= context + Prefix.RAW_P + cfg.getUriEncodedPath() 920d40e9d0SAdam Hornáček + (cfg.getRequestedRevision().length() == 0 ? "" : "?r=" + Util.URIEncode(cfg.getRequestedRevision())) 930d40e9d0SAdam Hornáček %>"><span id="raw"></span>Raw</a></li> 940d40e9d0SAdam Hornáček <li><a href="<%= context + Prefix.DOWNLOAD_P + cfg.getUriEncodedPath() 950d40e9d0SAdam Hornáček + (cfg.getRequestedRevision().length() == 0 ? "" : "?r=" + Util.URIEncode(cfg.getRequestedRevision())) 960d40e9d0SAdam Hornáček %>"><span id="download"></span>Download</a></li> 970d40e9d0SAdam Hornáček <% 980d40e9d0SAdam Hornáček } 99*d21d069fSAdam Hornáček %><li><input type="text" id="search" name="full" class="q" /></li> 100911e8af0SAdam Hornáček <li><input type="submit" value="Search" class="submit" /></li><% 1010d40e9d0SAdam Hornáček Project proj = cfg.getProject(); 1020d40e9d0SAdam Hornáček String[] vals = cfg.getSearchOnlyIn(); 103911e8af0SAdam Hornáček %><li><input id="minisearch-path" type="checkbox" name="path" value='"<%= vals[0] 1040d40e9d0SAdam Hornáček %>"' <%= vals[2] %>/> current directory</li> 1050d40e9d0SAdam Hornáček </ul><% 1060d40e9d0SAdam Hornáček if (proj != null) { 1070d40e9d0SAdam Hornáček %> 108911e8af0SAdam Hornáček <input id="minisearch-project" type="hidden" name="project" value="<%=proj.getName()%>" /><% 1090d40e9d0SAdam Hornáček } 1100d40e9d0SAdam Hornáček%> 1110d40e9d0SAdam Hornáček <input type="hidden" id="contextpath" value="<%=request.getContextPath()%>" /> 1120d40e9d0SAdam Hornáček</div> 1130d40e9d0SAdam Hornáček </form> 114911e8af0SAdam Hornáček <script type="text/javascript">/* <![CDATA[ */ 115911e8af0SAdam Hornáček document.domReady.push(function() { domReadyMenu(true); }); 116911e8af0SAdam Hornáček /* ]]> */ 117911e8af0SAdam Hornáček </script> 1180d40e9d0SAdam Hornáček </div> 1190d40e9d0SAdam Hornáček<div id="content"> 1200d40e9d0SAdam Hornáček<% 1210d40e9d0SAdam Hornáček} 1220d40e9d0SAdam Hornáček/* ---------------------- minisearch.jspf end --------------------- */ 1230d40e9d0SAdam Hornáček%>