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.

49 lines
1.3 KiB

{% extends "base.html" %}
{% block content %}
<div class="row">
<div class="col-sm-12">
<div class="panel panel-default">
<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="get" action="{% url "whoisdb:search" %}">
<input type="text" name="q" placeholder="Search in DB">
<button class="btn btn-primary">Search</button>
</form>
</p>
{% comment %}
{% if term %}
<p>
<h3>Search for '{{ term }}'</h3>
{% for obj in results %}
<h5>{{ obj }}</h5>
{% include "whoisdb/handle_table.html" with object=obj %}
{% empty %}
No objects found.
{% endfor %}
</p>
{% endif %}
{% endcomment %}
{% if term and not results %}
No objects found.
{% endif %}
</div>
</div>
</div>
</div>
{% 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 %}