{% extends request.is_ajax|yesno:"base_ajax.html,base.html" %}

{% block title %}Search Help{% endblock %}

{% block content %}
    <div class="row">
        {% if not request.is_ajax %}
            <div class="col-sm-12">
                <h1>Search Help</h1>
            </div>
        {% endif %}
        <div class="col-sm-12">
            <div class="card card-default">
              <div class="card-header">
                <h3 class="card-title">Searching Events</h3>
              </div>
              <div class="card-body">
                <p>
                Searches for entire query in:
                    <span class="badge badge-dark">name</span>
                    <span class="badge badge-dark">description</span> and
                    <span class="badge badge-dark">notes</span>
                </p>
                <p>You can search for an event by <span class="badge badge-dark">event_id</span> by entering an integer, or using the format <code>N01234</code></p>
                <p>On the search results page you can also specify the date range for the <span class="badge badge-dark">start_date</span> of the event</p>
                <p>Events are sorted in reverse <span class="badge badge-dark">start_date</span> order (most recent events at the top)</p>
              </div>
              <div class="card-header">
                <h3 class="card-title">Searching People/Organisations/Venues/Suppliers</h3>
              </div>
              <div class="card-body">
                <p>
                Searches for entire search phrase in:
                    <span class="badge badge-dark">name</span>
                    <span class="badge badge-dark">email</span>
                    <span class="badge badge-dark">address</span>
                    <span class="badge badge-dark">notes</span> and
                    <span class="badge badge-dark">phone</span>
                </p>
                <p>You can search for an entry by <span class="badge badge-dark">id</span> by entering an integer</p>
                <p>Entries are sorted in alphabetical order by <span class="badge badge-dark">name</span></p>
              </div>
              {% if perms.RIGS.view_invoice %}
              <div class="card-header">
                <h3 class="card-title">Searching Invoices</h3>
              </div>
              <div class="card-body">
                <p>
                Searches for entire search phrase in:
                    <span class="badge badge-dark">event__name</span>
                </p>
                <p>You can search for an event's invoice by entering the <span class="badge badge-dark">event_id</span> using the format <code>N01234</code></p>
                <p>You can search for an invoice by <span class="badge badge-dark">invoice_id</span> using the format <code>#01234</code></p>
                <p>Entering a raw integer will search by both <span class="badge badge-dark">invoice_id</span> and <span class="badge badge-dark">event_id</span></p>
                <p>Entries are sorted in reverse <span class="badge badge-dark">invoice_date</span> order</p>
              </div>
              {% endif %}
              <div class="card-header">
                <h3 class="card-title">Searching Assets</h3>
              </div>
              <div class="card-body">
                <p>
                Searches for entire search phrase in:
                    <span class="badge badge-dark">description</span> and
                    <span class="badge badge-dark">serial number</span>
                </p>
                <p>
                Will also attempt to exact match <span class="badge badge-dark">asset ID</span>
                </p>
                <p>Entries are sorted in alphanumerical order by <span class="badge badge-dark">asset ID</span></p>
              </div>
            </div>
        </div>
    </div>
{% endblock %}
