Skip to content

Commit

Permalink
- added 'search on map' - Link to search result page
Browse files Browse the repository at this point in the history
- added default search option to location search
- show default search in search window on location search page
- added icon for location search

git-svn-id: https://svn.berlios.de/svnroot/repos/yacy/trunk@6886 6c8d7289-2bf4-0310-a012-ef5d649a1542
  • Loading branch information
orbiter committed May 18, 2010
1 parent 227ebc6 commit 1e8c6ce
Show file tree
Hide file tree
Showing 6 changed files with 33 additions and 10 deletions.
Binary file added htroot/env/grafics/earthsearch.png
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
4 changes: 4 additions & 0 deletions htroot/yacysearch.html
Expand Up @@ -18,6 +18,8 @@
#%env/templates/simpleheader.template%#
<script src="/yacy/ui/js/jquery-1.3.2.min.js" type="text/javascript"></script>
<script src="/yacy/ui/js/jquery-ui-1.7.2.min.js" type="text/javascript"></script>
<link media="screen" type="text/css" href="/yacy/ui/css/themes/start/ui.base.css" rel="stylesheet" />
<link media="screen" type="text/css" href="/yacy/ui/css/themes/start/ui.theme.css" rel="stylesheet" />
::
<div id="api">
<script type="text/javascript">
Expand All @@ -36,6 +38,8 @@
#%env/templates/embeddedheader.template%#
<script src="/yacy/ui/js/jquery-1.3.2.min.js" type="text/javascript"></script>
<script src="/yacy/ui/js/jquery-ui-1.7.2.min.js" type="text/javascript"></script>
<link media="screen" type="text/css" href="/yacy/ui/css/themes/start/ui.base.css" rel="stylesheet" />
<link media="screen" type="text/css" href="/yacy/ui/css/themes/start/ui.theme.css" rel="stylesheet" />
#(/display)#

<script type="text/javascript">
Expand Down
6 changes: 5 additions & 1 deletion htroot/yacysearch_location.html
Expand Up @@ -37,6 +37,10 @@
), 2 // Zoom level
);

#(initsearch)#::
searchLayer = new OpenLayers.Layer.GeoRSS('GeoRSS', 'yacysearch_location.rss?query=#[query]#');
map.addLayer(searchLayer);
#(/initsearch)#
}

function search() {
Expand All @@ -60,7 +64,7 @@
<h2>#[promoteSearchPageGreeting]#</h2>
<div class="yacylogo"><a href="#[promoteSearchPageGreeting.homepage]#" class="yacylogo"><img src="#[promoteSearchPageGreeting.smallImage]#" alt="yacysearch" /></a></div>
<fieldset class="yacys">
<input type="text" id="query" size="42" />
<input type="text" value="#(initsearch)#::#[query]##(/initsearch)#" id="query" size="42" />
<input type="submit" onclick="search(); return false;" value="search" onsubmit="search(); return false;" />
</fieldset>
</form><br/>
Expand Down
6 changes: 6 additions & 0 deletions htroot/yacysearch_location.java
Expand Up @@ -125,6 +125,12 @@ public static serverObjects respond(final RequestHeader header, final serverObje
prop.put("promoteSearchPageGreeting", sb.getConfig(SwitchboardConstants.GREETING, ""));
prop.put("promoteSearchPageGreeting.homepage", sb.getConfig(SwitchboardConstants.GREETING_HOMEPAGE, ""));
prop.put("promoteSearchPageGreeting.smallImage", sb.getConfig(SwitchboardConstants.GREETING_SMALL_IMAGE, ""));
if (post == null || post.get("query") == null) {
prop.put("initsearch", 0);
} else {
prop.put("initsearch", 1);
prop.put("initsearch_query", post.get("query"));
}
}

// return rewrite properties
Expand Down
23 changes: 14 additions & 9 deletions htroot/yacysearchtrailer.html
@@ -1,39 +1,39 @@
<div style="float:right;width:25%;">
<div id="sidebar1" style="float: right; margin-top:5px; width: 220px;">
#(nav-domains)#::
<div id="sidebar1" style="float: right; margin-top:5px; width: 220px;">
<h3 style="padding-left:25px;">Domain Navigator</h3>
<div><ul style="padding-left: 0px;">#{element}#
<li>#[url]#</li>
#{/element}#</ul></div>
#(/nav-domains)#
</div>
#(/nav-domains)#

<div id="sidebar2" style="float: right; margin-top:5px; width: 220px;">
#(nav-namespace)#::
<div id="sidebar2" style="float: right; margin-top:5px; width: 220px;">
<h3 style="padding-left:25px;">Name Space Navigator</h3>
<div><ul style="padding-left: 0px;">#{element}#
<li>#[url]#</li>
#{/element}#</ul></div>
#(/nav-namespace)#
</div>
#(/nav-namespace)#

<div id="sidebar3" style="float: right; margin-top:5px; width: 220px;">
#(nav-authors)#::
<div id="sidebar3" style="float: right; margin-top:5px; width: 220px;">
<h3 style="padding-left:25px;">Author Navigator</h3>
<div><ul style="padding-left: 0px;">#{element}#
<li>#[url]#</li>
#{/element}#</ul></div>
#(/nav-authors)#
</div>
#(/nav-authors)#

<div id="sidebar4" style="float: right; margin-top:5px; width: 220px;">
#(nav-topics)#::
<div id="sidebar4" style="float: right; margin-top:5px; width: 220px;">
<h3 style="padding-left:25px;">Topic Navigator</h3>
<div><ul style="padding-left: 0px;">#{element}#
<li>#[url]#</li>
#{/element}#</ul></div>
#(/nav-topics)#
</div>
#(/nav-topics)#

#(nav-about)#::
<div id="sidebarAbout" style="float: right; margin-top:5px; width: 220px;">
Expand All @@ -43,4 +43,9 @@ <h3 style="padding-left:25px;">#[headline]#</h3>
</div>
</div>
#(/nav-about)#
</div>

<div id="sidebar4" style="float: right; margin-top:5px; width: 220px;">
<div><a href="yacysearch_location.html?query=#[query]#&display=#[display]#"><img src="/env/grafics/earthsearch.png"></a><h4><a href="yacysearch_location.html?query=#[query]#&display=#[display]#">Show search results for "#[query]#" on map!</a></h4>
</div>
</div>

4 changes: 4 additions & 0 deletions htroot/yacysearchtrailer.java
Expand Up @@ -169,6 +169,10 @@ public static serverObjects respond(final RequestHeader header, final serverObje
prop.put("nav-about_body", aboutBody);
}

// location search
prop.put("query", theQuery.queryString);
prop.put("display", display);

EventTracker.update("SEARCH", new ProfilingGraph.searchEvent(theQuery.id(true), SearchEvent.FINALIZATION + "-" + "bottomline", 0, 0), false, 30000, ProfilingGraph.maxTime);

return prop;
Expand Down

0 comments on commit 1e8c6ce

Please sign in to comment.