<html xmlns:v="urn:schemas-microsoft-com:vml" xmlns:o="urn:schemas-microsoft-com:office:office" xmlns:w="urn:schemas-microsoft-com:office:word" xmlns:m="http://schemas.microsoft.com/office/2004/12/omml" xmlns="http://www.w3.org/TR/REC-html40">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
<meta name="Generator" content="Microsoft Word 14 (filtered medium)">
<style><!--
/* Font Definitions */
@font-face
{font-family:Calibri;
panose-1:2 15 5 2 2 2 4 3 2 4;}
@font-face
{font-family:Tahoma;
panose-1:2 11 6 4 3 5 4 4 2 4;}
/* Style Definitions */
p.MsoNormal, li.MsoNormal, div.MsoNormal
{margin:0cm;
margin-bottom:.0001pt;
font-size:12.0pt;
font-family:"Times New Roman","serif";}
a:link, span.MsoHyperlink
{mso-style-priority:99;
color:blue;
text-decoration:underline;}
a:visited, span.MsoHyperlinkFollowed
{mso-style-priority:99;
color:purple;
text-decoration:underline;}
span.E-MailFormatvorlage17
{mso-style-type:personal-reply;
font-family:"Calibri","sans-serif";
color:#1F497D;}
.MsoChpDefault
{mso-style-type:export-only;
font-family:"Calibri","sans-serif";
mso-fareast-language:EN-US;}
@page WordSection1
{size:612.0pt 792.0pt;
margin:70.85pt 70.85pt 2.0cm 70.85pt;}
div.WordSection1
{page:WordSection1;}
--></style><!--[if gte mso 9]><xml>
<o:shapedefaults v:ext="edit" spidmax="1026" />
</xml><![endif]--><!--[if gte mso 9]><xml>
<o:shapelayout v:ext="edit">
<o:idmap v:ext="edit" data="1" />
</o:shapelayout></xml><![endif]-->
</head>
<body lang="DE-CH" link="blue" vlink="purple">
<div class="WordSection1">
<p class="MsoNormal"><span style="font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1F497D">Hello<o:p></o:p></span></p>
<p class="MsoNormal"><span style="font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1F497D"><o:p> </o:p></span></p>
<p class="MsoNormal"><span lang="EN-US" style="font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1F497D">I tried to follow your description but without success, I’m not a web-programmer. I put the html-template in the folder geonode/static/geonode/js/templates.
Then I should modify the file search.js. I don’t know the relation between the template and the js-File.<o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-US" style="font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1F497D"><o:p> </o:p></span></p>
<p class="MsoNormal"><span lang="EN-US" style="font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1F497D">Is there a documentation which would help me understand the system (templates, javascript).<o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-US" style="font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1F497D"><o:p> </o:p></span></p>
<p class="MsoNormal"><span lang="EN-US" style="font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1F497D">Best regards<o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-US" style="font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1F497D">Guido<o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-US" style="font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1F497D"><o:p> </o:p></span></p>
<p class="MsoNormal"><span style="font-size:7.5pt;font-family:"Arial","sans-serif";color:#1F497D">____________________________________________________</span><span style="font-size:7.5pt;font-family:"Calibri","sans-serif";color:#1F497D">
<o:p></o:p></span></p>
<p class="MsoNormal"><span style="font-size:7.5pt;font-family:"Calibri","sans-serif";color:#1F497D"><br>
</span><span style="font-size:7.5pt;font-family:"Arial","sans-serif";color:#1F497D">Dipl. Ing. ETH Guido Häfliger</span><span style="font-size:7.5pt;font-family:"Calibri","sans-serif";color:#1F497D"><br>
</span><span style="font-size:7.5pt;font-family:"Arial","sans-serif";color:#1F497D">EDV/GIS-Spezialist</span><span style="font-size:7.5pt;font-family:"Calibri","sans-serif";color:#1F497D"><br>
</span><span style="font-size:7.5pt;font-family:"Arial","sans-serif";color:#1F497D">Tel. ++41 41 462 97 60</span><span style="font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1F497D"><br>
</span><u><span style="font-size:7.5pt;font-family:"Arial","sans-serif";color:blue">guido.haefliger@vogelwarte.ch</span></u><span style="font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1F497D"><br>
</span><u><span style="font-size:7.5pt;font-family:"Arial","sans-serif";color:blue">www.vogelwarte.ch</span></u><span style="font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1F497D"><br>
<br>
</span><span style="font-size:7.5pt;font-family:"Arial","sans-serif";color:#1F497D">Schweizerische Vogelwarte | Seerose 1 | CH-6204 Sempach | Schweiz<o:p></o:p></span></p>
<p class="MsoNormal"><span style="font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1F497D"><o:p> </o:p></span></p>
<p class="MsoNormal"><b><span lang="DE" style="font-size:10.0pt;font-family:"Tahoma","sans-serif"">Von:</span></b><span lang="DE" style="font-size:10.0pt;font-family:"Tahoma","sans-serif""> Simone Dalmasso [mailto:simone.dalmasso@gmail.com]
<br>
<b>Gesendet:</b> Donnerstag, 27. August 2015 08:13<br>
<b>An:</b> Häfliger Guido<br>
<b>Cc:</b> geonode-users@lists.osgeo.org<br>
<b>Betreff:</b> Re: [GeoNode-users] text search question<o:p></o:p></span></p>
<p class="MsoNormal"><o:p> </o:p></p>
<div>
<p class="MsoNormal">Hi, if you are referring to the thext search box on the left part of the search pages then you need to make sure that the api supports the filtering that you need, see<a href="https://github.com/GeoNode/geonode/blob/master/geonode/api/resourcebase_api.py#L44" target="_blank"> https://github.com/GeoNode/geonode/blob/master/geonode/api/resourcebase_api.py#L44</a>,<o:p></o:p></p>
<div>
<p class="MsoNormal"><o:p> </o:p></p>
</div>
<div>
<p class="MsoNormal">then add the html part, templates are here <a href="https://github.com/GeoNode/geonode/tree/master/geonode/templates/search" target="_blank">https://github.com/GeoNode/geonode/tree/master/geonode/templates/search</a>,<o:p></o:p></p>
</div>
<div>
<p class="MsoNormal"><o:p> </o:p></p>
</div>
<div>
<p class="MsoNormal">then add the logic for the search that is in this file, <a href="https://github.com/GeoNode/geonode/blob/master/geonode/static/geonode/js/search/search.js" target="_blank">https://github.com/GeoNode/geonode/blob/master/geonode/static/geonode/js/search/search.js</a>.
Here, depending on the type of filter that you need, the logic may vary but if you want to apply a filter similar to the text one then see this part of the file <a href="https://github.com/GeoNode/geonode/blob/master/geonode/static/geonode/js/search/search.js#L369" target="_blank">https://github.com/GeoNode/geonode/blob/master/geonode/static/geonode/js/search/search.js#L369</a>.
Autocomplete is used for the autosuggestion when typing, the search is done by appending "title__contains=keyword" to the $scope.query and then trigger the query_api function.<o:p></o:p></p>
</div>
<div>
<p class="MsoNormal"><o:p> </o:p></p>
</div>
<div>
<p class="MsoNormal">If you want to change the behavior of the top page search bar then is you have to modify the html in base.html <a href="https://github.com/GeoNode/geonode/blob/master/geonode/templates/base.html#L74">https://github.com/GeoNode/geonode/blob/master/geonode/templates/base.html#L74</a>,
but that is a pure html form.<o:p></o:p></p>
</div>
<div>
<p class="MsoNormal"><o:p> </o:p></p>
</div>
<div>
<p class="MsoNormal">Hope this helps<o:p></o:p></p>
</div>
<div>
<p class="MsoNormal"><o:p> </o:p></p>
<div>
<p class="MsoNormal">2015-08-27 7:38 GMT+02:00 Häfliger Guido <<a href="mailto:guido.haefliger@vogelwarte.ch" target="_blank">guido.haefliger@vogelwarte.ch</a>>:<o:p></o:p></p>
<div>
<div>
<p class="MsoNormal"><span style="font-size:11.0pt;font-family:"Calibri","sans-serif"">Hello<o:p></o:p></span></p>
</div>
<div>
<p class="MsoNormal"><span style="font-size:11.0pt;font-family:"Calibri","sans-serif""> <o:p></o:p></span></p>
</div>
<div>
<p class="MsoNormal"><span style="font-size:11.0pt;font-family:"Calibri","sans-serif"">We test geonode to manage our metadata (version 2.4b25). Is it possible to extend the text search to other attribute fields? For the moment the text search only use the layer
name. If it is possible, where can I configure it?<o:p></o:p></span></p>
</div>
<div>
<p class="MsoNormal"><span style="font-size:11.0pt;font-family:"Calibri","sans-serif""> <o:p></o:p></span></p>
</div>
<div>
<p class="MsoNormal"><span style="font-size:11.0pt;font-family:"Calibri","sans-serif"">Regards<o:p></o:p></span></p>
</div>
<div>
<p class="MsoNormal"><span style="font-size:11.0pt;font-family:"Calibri","sans-serif"">Guido<o:p></o:p></span></p>
</div>
<div>
<p class="MsoNormal"><span style="font-size:11.0pt;font-family:"Calibri","sans-serif""> <o:p></o:p></span></p>
</div>
<div>
<p class="MsoNormal"><span style="font-size:7.5pt;font-family:"Arial","sans-serif"">____________________________________________________</span><span style="font-size:7.5pt;font-family:"Calibri","sans-serif"">
</span><span style="font-size:11.0pt;font-family:"Calibri","sans-serif""><o:p></o:p></span></p>
</div>
<div>
<p class="MsoNormal"><span style="font-size:7.5pt;font-family:"Calibri","sans-serif""><br>
</span><span style="font-size:7.5pt;font-family:"Arial","sans-serif"">Dipl. Ing. ETH Guido Häfliger<br>
EDV/GIS-Spezialist<br>
Tel. <a href="tel:%2B%2B41%2041%20462%2097%2060" target="_blank">++41 41 462 97 60</a><br>
<u><span style="color:blue"><a href="mailto:guido.haefliger@vogelwarte.ch" target="_blank">guido.haefliger@vogelwarte.ch</a><br>
<a href="http://www.vogelwarte.ch" target="_blank">www.vogelwarte.ch</a><br>
<br>
</span></u>Schweizerische Vogelwarte | Seerose 1 | CH-6204 Sempach | Schweiz</span><span style="font-size:11.0pt;font-family:"Calibri","sans-serif""><o:p></o:p></span></p>
</div>
<div>
<p class="MsoNormal"><span style="font-size:7.5pt;font-family:"Arial","sans-serif""> </span><span style="font-size:11.0pt;font-family:"Calibri","sans-serif""><o:p></o:p></span></p>
</div>
<div>
<p class="MsoNormal"><span style="font-size:11.0pt;font-family:"Calibri","sans-serif""> <o:p></o:p></span></p>
</div>
<div>
<p class="MsoNormal"><span style="font-size:11.0pt;font-family:"Calibri","sans-serif""> <o:p></o:p></span></p>
</div>
</div>
<p class="MsoNormal" style="margin-bottom:12.0pt"><br>
_______________________________________________<br>
geonode-users mailing list<br>
<a href="mailto:geonode-users@lists.osgeo.org" target="_blank">geonode-users@lists.osgeo.org</a><br>
<a href="http://lists.osgeo.org/cgi-bin/mailman/listinfo/geonode-users" target="_blank">http://lists.osgeo.org/cgi-bin/mailman/listinfo/geonode-users</a><o:p></o:p></p>
</div>
<p class="MsoNormal"><br>
<br clear="all">
<o:p></o:p></p>
<div>
<p class="MsoNormal"><o:p> </o:p></p>
</div>
<p class="MsoNormal">-- <o:p></o:p></p>
<div>
<p class="MsoNormal">Simone <o:p></o:p></p>
</div>
</div>
</div>
</div>
</body>
</html>