This repository has been archived by the owner on Jun 28, 2021. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #338 from TakwimuAfrica/feature/search_backend
Add Search
- Loading branch information
Showing
8 changed files
with
141 additions
and
8 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,35 @@ | ||
{% extends 'takwimu/_layouts/page.html' %} | ||
{% load wagtailcore_tags %} | ||
{% load staticfiles %} | ||
|
||
{% block content %} | ||
|
||
{% include 'takwimu/_includes/homepage/hero.html' %} | ||
|
||
<div class="container"> | ||
<div class="m-2"> | ||
<form action="{% url 'search' %}" method="get"> | ||
<input type="text" name="q" value="{{ search_query }}" class="form-control"> | ||
<input type="submit" value="Search" class="btn btn-primary"> | ||
</form> | ||
</div> | ||
|
||
{% if search_results %} | ||
<ul> | ||
{% for result in search_results %} | ||
<li> | ||
<h4><a href="{% pageurl result %}">{{ result }}</a></h4> | ||
{% if result.search_description %} | ||
{{ result.search_description|safe }} | ||
{% endif %} | ||
</li> | ||
{% endfor %} | ||
</ul> | ||
{% elif search_query %} | ||
No results found | ||
{% else %} | ||
Please type something into the search box | ||
{% endif %} | ||
</div> | ||
|
||
{% endblock %} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters