Mercurial > hg > LGDataverses
comparison doc/sphinx_bootstrap_theme/bootstrap/search.html @ 10:a50cf11e5178
Rewrite LGDataverse completely upgrading to dataverse4.0
| author | Zoe Hong <zhong@mpiwg-berlin.mpg.de> |
|---|---|
| date | Tue, 08 Sep 2015 17:00:21 +0200 |
| parents | |
| children |
comparison
equal
deleted
inserted
replaced
| 9:5926d6419569 | 10:a50cf11e5178 |
|---|---|
| 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 {% set script_files = script_files + ['_static/searchtools.js'] %} | |
| 13 {% block extrahead %} | |
| 14 <script type="text/javascript"> | |
| 15 jQuery(function() { Search.loadIndex("{{ pathto('searchindex.js', 1) }}"); }); | |
| 16 </script> | |
| 17 {# this is used when loading the search index using $.ajax fails, | |
| 18 such as on Chrome for documents on localhost #} | |
| 19 <script type="text/javascript" id="searchindexloader"></script> | |
| 20 {{ super() }} | |
| 21 {% endblock %} | |
| 22 {% block body %} | |
| 23 <h1 id="search-documentation">{{ _('Search') }}</h1> | |
| 24 <div id="fallback" class="admonition warning"> | |
| 25 <script type="text/javascript">$('#fallback').hide();</script> | |
| 26 <p> | |
| 27 {% trans %}Please activate JavaScript to enable the search | |
| 28 functionality.{% endtrans %} | |
| 29 </p> | |
| 30 </div> | |
| 31 <p> | |
| 32 {% trans %}From here you can search these documents. Enter your search | |
| 33 words into the box below and click "search". Note that the search | |
| 34 function will automatically search for all of the words. Pages | |
| 35 containing fewer words won't appear in the result list.{% endtrans %} | |
| 36 </p> | |
| 37 | |
| 38 {% if theme_bootstrap_version == "3" %} | |
| 39 <form class="form-inline" action="" method="get"> | |
| 40 <div class="form-group"> | |
| 41 <input type="text" class="form-control" name="q" value="" /> | |
| 42 </div> | |
| 43 <input type="submit" class="btn btn-default" value="{{ _('search') }}" /> | |
| 44 <span id="search-progress" style="padding-left: 10px"></span> | |
| 45 </form> | |
| 46 {% else %} | |
| 47 <form class="form-search"> | |
| 48 <input type="text" class="input-medium search-query" name="q" value="" /> | |
| 49 <input type="submit" class="btn btn-default" value="{{ _('search') }}" /> | |
| 50 <span id="search-progress" style="padding-left: 10px"></span> | |
| 51 </form> | |
| 52 {% endif %} | |
| 53 | |
| 54 {% if search_performed %} | |
| 55 <h2>{{ _('Search Results') }}</h2> | |
| 56 {% if not search_results %} | |
| 57 <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> | |
| 58 {% endif %} | |
| 59 {% endif %} | |
| 60 <div id="search-results"> | |
| 61 {% if search_results %} | |
| 62 <ul> | |
| 63 {% for href, caption, context in search_results %} | |
| 64 <li><a href="{{ pathto(item.href) }}">{{ caption }}</a> | |
| 65 <div class="context">{{ context|e }}</div> | |
| 66 </li> | |
| 67 {% endfor %} | |
| 68 </ul> | |
| 69 {% endif %} | |
| 70 </div> | |
| 71 {% endblock %} |
