mirror of https://github.com/interlegis/sapl.git
You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
70 lines
2.3 KiB
70 lines
2.3 KiB
{% extends 'crud/form.html' %}
|
|
{% load crispy_forms_tags %}
|
|
{% load common_tags %}
|
|
|
|
{% block base_content %}
|
|
<h1><legend>Pesquisa Textual</legend></h1>
|
|
</br>
|
|
|
|
<form method="get" action=".">
|
|
<div class="row container-detail clearfix">
|
|
|
|
<div class="row-fluid">
|
|
<div class="col-md-8">
|
|
{{ form.q|as_crispy_field }}
|
|
</div>
|
|
</div>
|
|
|
|
<div class="row-fluid">
|
|
<div class="col-md-8">
|
|
</br>
|
|
<h4> Em quais tipos de documento deseja pesquisar?</h4>
|
|
</div>
|
|
</div>
|
|
|
|
<div class="row-fluid">
|
|
<div class="col-md-8">
|
|
{{ form.models }}
|
|
</div>
|
|
</div>
|
|
|
|
|
|
<div class="row-fluid">
|
|
<div class="col-md-12">
|
|
<input class="btn btn-primary pull-right" type="submit" value="Pesquisar">
|
|
</div>
|
|
</div>
|
|
|
|
</div>
|
|
|
|
{% if query %}
|
|
<h3>Resultados</h3>
|
|
|
|
{% for result in page.object_list %}
|
|
{% if result.object|search_get_model == 'm' %}
|
|
<p>
|
|
<a href="{% url 'sapl.materia:materialegislativa_detail' result.object.pk %}">{{ result.object }}</a>
|
|
</p>
|
|
|
|
{% elif result.object|search_get_model == 'd' %}
|
|
<p>
|
|
<a href="{% url 'sapl.materia:documentoacessorio_detail' result.object.pk %}">{{ result.object }}</a>
|
|
</p>
|
|
{% endif %}
|
|
|
|
{% empty %}
|
|
<p>No results found.</p>
|
|
{% endfor %}
|
|
|
|
{% if page.has_previous or page.has_next %}
|
|
<div>
|
|
{% if page.has_previous %}<a href="?q={{ query }}&page={{ page.previous_page_number }}">{% endif %}« Previous{% if page.has_previous %}</a>{% endif %}
|
|
|
|
|
{% if page.has_next %}<a href="?q={{ query }}&page={{ page.next_page_number }}">{% endif %}Next »{% if page.has_next %}</a>{% endif %}
|
|
</div>
|
|
{% endif %}
|
|
{% else %}
|
|
{# Show some example queries to run, maybe query syntax, something else? #}
|
|
{% endif %}
|
|
</form>
|
|
{% endblock %}
|