{% extends 'base.html' %} {% load bootstrap3 %} {% load bootstrap_pagination %} {% block content %}

{% if request.GET.q %} Search Results {% else %} Search {% endif %}


{% if query %} {% for result in page.object_list %} {% if result.object.url %} {% comment %} Skip Posts with no URL. {% endcomment %} {% if result.content_type = 'plugins.story' %} {% with result.object as story %}
NEWS
{% include "plugins/story.html" %} {% endwith %} {% elif result.content_type = 'plugins.event' %} {% with result.object as event %}
EVENT
{% include "plugins/event.html" %} {% endwith %} {% elif result.content_type = 'plugins.job' %} {% with result.object as job %}
JOB
{% include "plugins/job.html" %} {% endwith %} {% elif result.content_type = 'plugins.newresource' %} {% with result.object as new_resource %}
RESOURCE
{% include "plugins/new_resource.html" %} {% endwith %} {% elif result.content_type = 'plugins.opportunity' %} {% with result.object as opportunity %}
OPPORTUNITY
{% include "plugins/opportunity.html" %} {% endwith %} {% endif %} {% endif %} {% empty %}
No results found.
{% endfor %} {% if page.has_previous or page.has_next %}
{% bootstrap_paginate page range=10 show_first_last="true" %}
{% endif %} {% else %} {# Show some example queries to run, maybe query syntax, something else? #} {% endif %} {% endblock %} {% block end_of_body %} {% endblock %}