OpenSlides/openslides/core/templates/core/search.html
Oskar Hahn 32137b6523 Use python3
python3.3 and python3.4 are supported
2014-08-24 21:21:11 +02:00

59 lines
2.2 KiB
HTML
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

{% extends 'base.html' %}
{% load i18n %}
{% block title %}{{ block.super }} {% trans "Search" %}{% endblock %}
{% block content %}
<h2>{% trans 'Search results' %}</h2>
<form class="form-search well" action="" method="get">
{% for field in form %}
<div class="control-group">
{% if field.name == "q" %}
<label for="id_q">{% trans 'Search' %}:</label>
<div class="input-append">
<input type="text" id="id_q" name="q" value="{{ field.value }}">
<button type="submit" class="btn">{% trans "Search" %}</button>
</div>
{% elif field.name == "models" %}
{% trans 'Filter' %}:
<div class="control-group">
{% for model in models %}
<label class="checkbox inline">
<input type="checkbox" value="{{ model.1 }}" name="models"
{% if model.1 in get_values %}checked{% endif %}> {% trans model.0 %}
</label>
{% endfor %}
</div>
{% endif %}
</div>
{% endfor %}
</form>
{% if query %}
{% for result in page.object_list %}
{% if forloop.first %}
<ol class="searchresults">
{% endif %}
{% if result.app_label %}
{% with result_template=result.app_label|add:"-results.html" %}
{% include "search/"|add:result_template %}
{% endwith %}
{% endif %}
{% if forloop.last %}
</ol>
{% endif %}
{% empty %}
<p><i>{% trans "No results found." %}</i></p>
{% endfor %}
{% if page.has_previous or page.has_next %}
<div>
{% if page.has_previous %}<a href="?q={{ query }}&amp;page={{ page.previous_page_number }}">{% endif %}&laquo; Previous{% if page.has_previous %}</a>{% endif %}
|
{% if page.has_next %}<a href="?q={{ query }}&amp;page={{ page.next_page_number }}">{% endif %}Next &raquo;{% if page.has_next %}</a>{% endif %}
</div>
{% endif %}
{% endif %}
{% endblock %}