| 1 | {# |
| 2 | basic/search.html |
| 3 | ~~~~~~~~~~~~~~~~~ |
| 4 | |
| 5 | Template for the search page. |
| 6 | |
| 7 | :copyright: Copyright 2007-2013 by the Sphinx team, see AUTHORS. |
| 8 | :license: BSD, see LICENSE for details. |
| 9 | #} |
| 10 | {%- extends "layout.html" %} |
| 11 | {% set title = _('Search') %} |
| 12 | {% block extrahead %} |
| 13 | <script type="text/javascript" src="{{ pathto('_static/searchtools.js', 1) }}"></script> |
| 14 | <script type="text/javascript" src="{{ pathto('_static/language_data.js', 1) }}"></script> |
| 15 | <script type="text/javascript" src="{{ pathto('searchindex.js', 1) }}"></script> |
| 16 | {# this is used when loading the search index using $.ajax fails, |
| 17 | such as on Chrome for documents on localhost #} |
| 18 | <script type="text/javascript" id="searchindexloader"></script> |
| 19 | {{ super() }} |
| 20 | {% endblock %} |
| 21 | {% block body %} |
| 22 | <h1 id="search-documentation">{{ _('Search') }}</h1> |
| 23 | <div id="fallback" class="admonition warning"> |
| 24 | <script type="text/javascript">$('#fallback').hide();</script> |
| 25 | <p> |
| 26 | {% trans %}Please activate JavaScript to enable the search |
| 27 | functionality.{% endtrans %} |
| 28 | </p> |
| 29 | </div> |
| 30 | <p> |
| 31 | {% trans %}From here you can search these documents. Enter your search |
| 32 | words into the box below and click "search". Note that the search |
| 33 | function will automatically search for all of the words. Pages |
| 34 | containing fewer words won't appear in the result list.{% endtrans %} |
| 35 | </p> |
| 36 | |
| 37 | {% if theme_bootstrap_version == "3" %} |
| 38 | <form class="form-inline" action="" method="get"> |
| 39 | <div class="form-group"> |
| 40 | <input type="text" class="form-control" name="q" value="" /> |
| 41 | </div> |
| 42 | <input type="submit" class="btn btn-default" value="{{ _('search') }}" /> |
| 43 | <span id="search-progress" style="padding-left: 10px"></span> |
| 44 | </form> |
| 45 | {% else %} |
| 46 | <form class="form-search"> |
| 47 | <input type="text" class="input-medium search-query" name="q" value="" /> |
| 48 | <input type="submit" class="btn btn-default" value="{{ _('search') }}" /> |
| 49 | <span id="search-progress" style="padding-left: 10px"></span> |
| 50 | </form> |
| 51 | {% endif %} |
| 52 | |
| 53 | {% if search_performed %} |
| 54 | <h2>{{ _('Search Results') }}</h2> |
| 55 | {% if not search_results %} |
| 56 | <p>{{ _('Your search did not match any documents. Please make sure that all words are spelled correctly and that you\'ve selected enough categories.') }}</p> |
| 57 | {% endif %} |
| 58 | {% endif %} |
| 59 | <div id="search-results"> |
| 60 | {% if search_results %} |
| 61 | <ul> |
| 62 | {% for href, caption, context in search_results %} |
| 63 | <li><a href="{{ pathto(item.href) }}">{{ caption }}</a> |
| 64 | <div class="context">{{ context|e }}</div> |
| 65 | </li> |
| 66 | {% endfor %} |
| 67 | </ul> |
| 68 | {% endif %} |
| 69 | </div> |
| 70 | {% endblock %} |