{% extends "template.html" %}
{% block title%}Search{% endblock %}
{% block content %}
<h1>Search</h1>
<div id="content-main">
    <form method="POST" id="search">{% csrf_token %}
        <div>
            {% include "includes/noc_fieldset.html" %}
            
            <div class="submit-row" >
                <input type="submit" value="Search" class="default" name="_save" />
            </div>
        </div>
    </form>
</div>

{% if result %}
    <div class="module">
        <table width="100%">
            <caption>Search Result</caption>
            {% for r in result %}
                <tr class="{% cycle 'row1' 'row2'}">
                    <td>
                        <A HREF="{{r.url}}">{{r.title}}</A><BR/>
                        {{r.text}}<BR/>
                        Relevancy: {{r.relevancy}}
                    </td>
                </tr>
            {% endfor %}
        </table>
    </div>
{% endif %}
{% endblock %}
