Search looks much nicer

master
Sebastian Lohff 7 years ago
parent 6ac391b765
commit 65e92b38dc

@ -1,5 +1,5 @@
{% load handletags %}
<table class="table">
<table class="table table-hover">
{% for field in object|getFields:user %}
<tr>
<td>{{ field.0 }}</td>

@ -4,7 +4,7 @@
<div class="row">
<div class="col-sm-12">
<div class="panel panel-default">
<div class="panel-heading">Search {% if term %}for {{ term }}{% else %}database{% endif %}</div>
<div class="panel-heading">Search {% if term %}for {{ term }} - {{ results|length }} result{{results|length|pluralize:"s" }}{% else %}database{% endif %}</div>
<div class="panel-body">
<p>
<form class="form" method="post" action="{% url "whoisdb:search" %}">
@ -13,6 +13,7 @@
<button class="btn btn-primary">Search</button>
</form>
</p>
{% comment %}
{% if term %}
<p>
<h3>Search for '{{ term }}'</h3>
@ -24,9 +25,25 @@
{% endfor %}
</p>
{% endif %}
{% endcomment %}
{% if term and not results %}
No objects found.
{% endif %}
</div>
</div>
</div>
</div>
{% endblock %}
{% for obj in results %}
<div class="row">
<div class="col-sm-12">
<div class="panel panel-default">
<div class="panel-heading">{{ obj }} <small>({{ obj.getClassName }})</small></div>
<div class="panel-body">
{% include "whoisdb/handle_table.html" with object=obj %}
</div>
</div>
</div>
</div>
{% endfor %}
{% endblock %}

Loading…
Cancel
Save