Commit e351a3da authored by Daniel W Bond's avatar Daniel W Bond

added beginning of search

parent 4e08c0a1
......@@ -11,12 +11,13 @@
<li><a href="#">Compare</a></li>
</ul>
<ul class="nav navbar-nav navbar-right">
<li><a href="#">Search</a></li>
{% if user.is_authenticated %}
<li><a href="{% url 'django.contrib.auth.views.logout' %}">Logout</a></li>
{% else %}
<li><a href="{% url 'django.contrib.auth.views.login' %}">Log In</a></li>
{% endif %}
{% endif %}
</ul>
</div><!--/.nav-collapse -->
</div>
......
{% extends 'layout/base.html' %}
{% load staticfiles %}
{% block title %}
Search | YourSchool Advisor
{% endblock %}
{% block content %}
<div class="page-header" id="banner">
<div class="row">
<div class="col-lg-12 text-center">
<h1>Search</h1>
</div>
</div>
</div>
<div class="row">
<div class="col-lg-8 col-lg-offset-2">
<form class="form-horizontal" role="form" method="get">
<div class="input-group">
<span class="input-group-addon">
<span class="glyphicon glyphicon-search"></span>
</span>
{{ form.q }}
</div>
</form>
</div>
</div>
{% if query %}
<hr />
<div class="row">
<div class="col-lg-8 col-lg-offset-2">
{% if page.object_list %}
<h3 class="text-center">Search Results</h3>
<div class="list-group">
{% endif %}
{% for result in page.object_list %}
<a class="list-group-item" href="{{ result.object.get_absolute_url }}">
<strong>{{ result.object }}</strong>
</a>
{% empty %}
<h3 class="text-center">No results found.</h3>
{% endfor %}
{% if page.object_list %}
</div>
{% endif %}
</div>
</div>
</div>
<div class="row">
<div class="col-lg-4 col-lg-offset-4">
<ul class="pager">
{% if page.has_previous %}
<li class="previous">
<a href="?q={{ query }}&amp;page={{ page.previous_page_number }}">
&larr; Previous
</a>
</li>
{% else %}
<li class="previous disabled">
<a>
&larr; Previous
</a>
</li>
{% endif %}
{% if page.has_next %}
<li class="next">
<a href="?q={{ query }}&amp;page={{ page.next_page_number }}">
Next &rarr;
</a>
</li>
{% else %}
<li class="next disabled">
<a>
Next &rarr;
</a>
</li>
{% endif %}
</ul>
</div>
</div>
{% endif %}
{% endblock %}
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment