Browse Source

Melhora o front-end da pesquisa textual

pull/980/head
Eduardo Calil 9 years ago
committed by Edward Ribeiro
parent
commit
89c1d7c4af
  1. 38
      sapl/templates/search/search.html

38
sapl/templates/search/search.html

@ -37,24 +37,36 @@
</div>
</br>
{% if query %}
<h3>Resultados</h3>
<table class="table table-striped table-bordered">
<thead class="thead-default">
<tr><td><h3>Resultados</h3></td></tr>
</thead>
{% 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>
<tr>
<td>
{% if result.object|search_get_model == 'm' %}
<p>
<strong>Matéria Legislativa: </strong> <a href="{% url 'sapl.materia:materialegislativa_detail' result.object.pk %}">{{ result.object }}</a></br>
<strong>Texto Original:</strong> <a href="{{result.object.arquivo.url}}"> Clique aqui </a></br>
</p>
{% elif result.object|search_get_model == 'd' %}
<p>
<a href="{% url 'sapl.materia:documentoacessorio_detail' result.object.pk %}">{{ result.object }}</a>
</p>
{% endif %}
{% elif result.object|search_get_model == 'd' %}
<p>
<strong> Documento Acessório: </strong><a href="{% url 'sapl.materia:documentoacessorio_detail' result.object.pk %}">{{ result.object }}</a></br>
<strong>Texto Original:</strong> <a href="{{result.object.arquivo.url}}"> Clique aqui </a></br>
</p>
{% endif %}
</td>
</tr>
{% empty %}
<p>No results found.</p>
{% endfor %}
{% empty %}
<h3> Nenhum resultado encontrado! </h3>
{% endfor %}
</table>
{% if page.has_previous or page.has_next %}
<div>

Loading…
Cancel
Save