fix: respect config setting of "show Nav Top-Menu" in HostBrowser.html for public users (as hostbrowser is now available in search results)

pull/1/head
reger 12 years ago
parent 6cf33f899c
commit bb20691d4f

@ -58,7 +58,17 @@ function updatepage(str) {
<script type="text/javascript" src="/js/sorttable.js"></script>
</head>
<body id="IndexControl">
#(topmenu)#
#%env/templates/portalheader.template%#
<div class="SubMenu">
<ul class="SubMenu">
<li style="width:15%;"><a class="MenuItemLink" href="/index.html"><img src="env/grafics/navsl.gif" height="10px" style="padding-right:10px" align="baseline"/>back to start page</a></li>
</ul>
</div>
#%env/templates/embeddedheader.template%#
::
#%env/templates/simpleheader.template%#
#(/topmenu)#
<h2>Host Browser</h2>
<p>Browse the index of #[ucount]# documents. Enter a host or an URL for a file list or view a list of <a href="/HostBrowser.html?hosts=">all hosts</a>, <a href="/HostBrowser.html?hosts=crawling">only hosts with urls pending in the crawler</a> or <a href="/HostBrowser.html?hosts=error">only with load errors</a>.</p>
<form action="HostBrowser.html" id="searchform" method="get" onkeyup="xmlhttpPost(); return false;">

@ -81,6 +81,12 @@ public class HostBrowser {
prop.put("files", 0);
prop.put("admin", 0);
if (admin) { // show top nav to admins
prop.put("topmenu",1);
} else { // for other respect setting in Search Design Configuration
prop.put("topmenu", sb.getConfigBool("publicTopmenu", true) ? 1 : 0);
}
if (!searchAllowed) {
prop.put("result", "You are not allowed to use this page. Please ask an administrator for permission.");
return prop;

Loading…
Cancel
Save