Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
SRCT
advisor
Commits
e351a3da
Commit
e351a3da
authored
Mar 02, 2014
by
Daniel W Bond
Browse files
added beginning of search
parent
4e08c0a1
Changes
2
Hide whitespace changes
Inline
Side-by-side
advisor/templates/layouts/navbar.html
View file @
e351a3da
...
...
@@ -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>
...
...
advisor/templates/search.html
0 → 100644
View file @
e351a3da
{% 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 }}&page={{ page.previous_page_number }}"
>
←
Previous
</a>
</li>
{% else %}
<li
class=
"previous disabled"
>
<a>
←
Previous
</a>
</li>
{% endif %}
{% if page.has_next %}
<li
class=
"next"
>
<a
href=
"?q={{ query }}&page={{ page.next_page_number }}"
>
Next
→
</a>
</li>
{% else %}
<li
class=
"next disabled"
>
<a>
Next
→
</a>
</li>
{% endif %}
</ul>
</div>
</div>
{% endif %}
{% endblock %}
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment