{%extends "base/page.html"%}
{%block title%}Search results{%endblock%}
{%block contents%}

<form method="get" action="/search/">
{%if suburl%}
 <input type="hidden" name="u" value="{{suburl}}">
{%endif%}
 <div class="tblBasic">
  <table border="0" cellpadding="0" cellspacing="0" class="tblBasicGrey" width="590">
   <tr>
    <td class="colFirst">Search for</td>
    <th class="colLast"><input type="text" name="q" value="{{query}}" /> <input type="submit" value="Search" /></th>
   </tr>
   <tr class="lastrow">
    <td class="colFirst"></td>
    <td class="colLast"><input type="checkbox" name="a" value="1" {%if allsites%}CHECKED{%endif%}/>Include community sites</td>
   </tr>
  </table>
 </div>
</form>

<div id="pgSearchContent">
 {%if search_error %}
 <div>{{search_error}}</div>
 {%else%}
  <!-- docbot goes here -->
  {%if hitcount = 0 %}
   <p>Your search for <b>{{query}}</b> returned no hits.</p>
  {%else%}
   <h2>Results {{firsthit}}-{{lasthit}} of {%if hitcount = 1000%}more than 1000{%else%}{{hitcount}}{%endif%}.</h2>
   {%if pagelinks %}Result pages: {{pagelinks|safe}}<br/><br/>{%endif%}
   {%for hit in hits %}
    {{forloop.counter0|add:firsthit}}. <a href="{{hit.url}}">{{hit.title}}</a> [{{hit.rank|floatformat:2}}]<br/>
    <div>...{{hit.abstract|safe}}...</div>
    <a href="{{hit.url}}">{{hit.url}}</a><br/>
    <br/>
   {%endfor%}
   {%if pagelinks %}Result pages: {{pagelinks|safe}}<br/><br/>{%endif%}
  {%endif%}
 {%endif%}
</div>
{%endblock%}
