61 lines
1.7 KiB
HTML
61 lines
1.7 KiB
HTML
{% extends "base.html" %}
|
|
{% load static %}
|
|
{% block content %}
|
|
<h1 class="title">Welcome to search, {{ user.first_name }}!</h1>
|
|
|
|
<div class="container">
|
|
<div class="row">
|
|
<div class="col-lg-4">
|
|
<form method="POST">
|
|
{% csrf_token %}
|
|
<div class="input-group search-bar">
|
|
<input name="query" type="text" class="form-control" placeholder="Search" id="txtSearch"/>
|
|
<div class="input-group-btn">
|
|
<button class="btn btn-primary" type="submit">
|
|
<span class="glyphicon glyphicon-search"></span>
|
|
</button>
|
|
</div>
|
|
</div>
|
|
</form>
|
|
</div>
|
|
</div>
|
|
{% if results is not None %}
|
|
<div class="row">
|
|
<div class="col-lg-12">
|
|
<div class="panel panel-default">
|
|
<div class="panel-heading">Results</div>
|
|
<div class="panel-body">
|
|
<p>Searching for {{ query }}</p>
|
|
</div>
|
|
<table class="table table-bordered table-light">
|
|
<thead>
|
|
<tr>
|
|
<th>TS</th>
|
|
<th>msg</th>
|
|
<th>host</th>
|
|
<th>nick</th>
|
|
<th>channel</th>
|
|
<th>net</th>
|
|
</tr>
|
|
</thead>
|
|
{% for item in results %}
|
|
<tr>
|
|
<td>{{ item.ts }}</td>
|
|
<td>{{ item.msg }}</td>
|
|
<td>{{ item.host }}</td>
|
|
<td>{{ item.nick }}</td>
|
|
<td>{{ item.channel }}</td>
|
|
<td>{{ item.net }}</td>
|
|
</tr>
|
|
{% endfor %}
|
|
</table>
|
|
|
|
</div>
|
|
</div>
|
|
</div>
|
|
{% endif %}
|
|
</div>
|
|
|
|
{% endblock %}
|
|
|