2022-07-21 12:45:28 +00:00
|
|
|
{% extends "base.html" %}
|
2022-07-21 12:46:48 +00:00
|
|
|
{% load static %}
|
2022-07-21 12:45:28 +00:00
|
|
|
{% block content %}
|
2022-07-21 12:46:48 +00:00
|
|
|
<h1 class="title">Welcome to search, {{ user.first_name }}!</h1>
|
2022-07-21 12:45:28 +00:00
|
|
|
|
2022-07-21 12:46:05 +00:00
|
|
|
<div class="container">
|
2022-07-21 12:47:16 +00:00
|
|
|
<div class="row">
|
2022-07-21 12:47:31 +00:00
|
|
|
<div class="col-lg-4 col-md-4 col-xs-12">
|
2022-07-21 12:47:16 +00:00
|
|
|
<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>
|
2022-07-21 12:46:48 +00:00
|
|
|
</div>
|
2022-07-21 12:47:16 +00:00
|
|
|
</form>
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
{% if results is not None %}
|
|
|
|
<div class="row">
|
2022-07-21 12:47:31 +00:00
|
|
|
<div class="col-lg-12 col-md-12 col-xs-12">
|
2022-07-21 12:47:16 +00:00
|
|
|
<div class="panel panel-default">
|
2022-07-21 12:47:26 +00:00
|
|
|
<div class="panel-heading">Results for {{ query }}</div>
|
2022-07-21 12:47:31 +00:00
|
|
|
<div class="table-responsive">
|
|
|
|
<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>
|
2022-07-21 12:47:16 +00:00
|
|
|
|
2022-07-21 12:46:48 +00:00
|
|
|
</div>
|
2022-07-21 12:45:28 +00:00
|
|
|
</div>
|
2022-07-21 12:46:05 +00:00
|
|
|
</div>
|
2022-07-21 12:47:16 +00:00
|
|
|
{% endif %}
|
2022-07-21 12:46:05 +00:00
|
|
|
</div>
|
2022-07-21 12:45:28 +00:00
|
|
|
|
|
|
|
{% endblock %}
|
|
|
|
|