Add a basic search feature per @laldon 's request
This commit is contained in:
1 parent
bd675fa53f
commit
609f7c0231
5 files changed
+120
-5
No files matched your search
@@ -30,14 +30,18 @@
|
||||
{% endif %}
|
||||
</ul>
|
||||
<ul>
|
||||
<li class="header"> CONTENT</li>
|
||||
<li class="header">TESTS</li>
|
||||
<li><a href="/index">Index</a></li>
|
||||
<li><a href="/greens">Greens</a></li>
|
||||
<li><a href="/users">Users</a></li>
|
||||
<li><a href="/machines">Machines</a></li>
|
||||
<li><a href="/eventLog">Events</a></li>
|
||||
<li><a href="/search">Search</a></li>
|
||||
<li><a href="/newTest">New Test</a></li>
|
||||
</ul>
|
||||
<ul>
|
||||
<li class="header">INFO</li>
|
||||
<li><a href="/users">Users</a></li>
|
||||
<li><a href="/eventLog">Events</a></li>
|
||||
<li><a href="/machines">Machines</a></li>
|
||||
</ul>
|
||||
<ul>
|
||||
<li class="header">LINKS</li>
|
||||
<li><a href="{{config.framework}}">OpenBench</a></li>
|
||||
|
||||
@@ -0,0 +1,66 @@
|
||||
{% extends "OpenBench/base.html" %}
|
||||
{% load mytags %}
|
||||
{% block content %}
|
||||
{% if not tests %}
|
||||
<form method="POST" action="/search/">
|
||||
{% csrf_token %}
|
||||
<label> Keywords </label>
|
||||
<input name="keywords">
|
||||
</br>
|
||||
<label> Author </label>
|
||||
<input name="author">
|
||||
</br>
|
||||
<label> Engine </label>
|
||||
<select name="engine">
|
||||
<option selected value="">ALL</option>
|
||||
{% for name, data in config.engines.items %}
|
||||
<option value="{{name}}">{{data.name}}</option>
|
||||
{% endfor %}
|
||||
</select>
|
||||
<br>
|
||||
<label> Show Passed </label>
|
||||
<select name="showpassed">
|
||||
<option selected value="True">True</option>
|
||||
<option value="False">False</option>
|
||||
</select>
|
||||
<br>
|
||||
<label> Show Failed </label>
|
||||
<select name="showfailed">
|
||||
<option selected value="True">True</option>
|
||||
<option value="False">False</option>
|
||||
</select>
|
||||
<br>
|
||||
<label> Show Deleted </label>
|
||||
<select name="showdeleted">
|
||||
<option value="True">True</option>
|
||||
<option selected value="False">False</option>
|
||||
</select>
|
||||
<br>
|
||||
<input type="submit" name="submit" value="Search Tests">
|
||||
</form>
|
||||
{% endif %}
|
||||
<table class="datatable">
|
||||
{% if tests %}
|
||||
<tr>
|
||||
<th>Date</th>
|
||||
<th>Engine</th>
|
||||
<th>User</th>
|
||||
<th>Test</th>
|
||||
<th>Diff</th>
|
||||
<th>Time</th>
|
||||
<th>Stats</th>
|
||||
</tr>
|
||||
{% endif %}
|
||||
{% for test in tests %}
|
||||
<tr>
|
||||
<td>{{test.creation|date:"y-m-d"}}</td>
|
||||
<td>{{test.engine}}</td>
|
||||
<td><a href="/viewUser/{{test.author}}">{{test.author}}</a></td>
|
||||
<td><a href="/viewTest/{{test.id}}">{{test.dev.name}}</a></td>
|
||||
<td class="textcenter"><a href="{{test|gitDiffLink}}">diff</a></td>
|
||||
<td>{{test.timecontrol}}</td>
|
||||
<td class='statblock {{test|testResultColour}}'><strong>{{test|shortStatBlock|linebreaksbr}}</strong></td>
|
||||
</tr>
|
||||
{% endfor %}
|
||||
</table>
|
||||
{% endblock %}
|
||||
Reference in new issue
Block a user