Skip to content

Commit

Permalink
Merge pull request #32 from SADiLaR/feature/search_page
Browse files Browse the repository at this point in the history
Add search page
  • Loading branch information
OnaMosimege authored Apr 25, 2024
2 parents f652041 + b3eb836 commit 13a9297
Show file tree
Hide file tree
Showing 4 changed files with 27 additions and 1 deletion.
1 change: 1 addition & 0 deletions app/app/urls.py
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,7 @@
path("_health/", views.health, name="health"),
path("", views.home, name="home"),
path("institutions/", views.institutions, name="institutions"),
path("search/", views.search, name="search"),
]

handler400 = "app.views.error_400"
Expand Down
7 changes: 7 additions & 0 deletions app/app/views.py
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,13 @@ def institutions(request):
return render(request, template_name=template, context=context)


def search(request):
template = "app/search.html"
context = {"search_page": "active"}

return render(request, template_name=template, context=context)


def error_400(request, exception):
template = "400.html"
context = {}
Expand Down
18 changes: 18 additions & 0 deletions app/templates/app/search.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
{% extends "base.html" %}
{% load static %}

{% block content %}

<div class="body">
<div class="section mt-3 mb-3">
<div class="card content-card">
<div class="card-body">
<h5 class="card-title">Search a term</h5>
<p class="card-text text-center">
Functionality of this page coming soon
</p>
</div>
</div>
</div>

{% endblock content %}
2 changes: 1 addition & 1 deletion app/templates/base.html
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@
<a class="nav-link {{ home_page }}" aria-current="page" href="{% url 'home' %}">Home</a>
</li>
<li class="nav-item">
<a class="nav-link" href="#">Search</a>
<a class="nav-link {{ search_page }}" aria-current="page" href="{% url 'search' %}">Search</a>
</li>
<li class="nav-item">
<a class="nav-link {{ institutions_page }}" href="{% url 'institutions' %}">Institutions</a>
Expand Down

0 comments on commit 13a9297

Please sign in to comment.