Skip to content

Commit

Permalink
obl search
Browse files Browse the repository at this point in the history
  • Loading branch information
longhotsummer committed Jul 24, 2023
1 parent 0c4020f commit a15b078
Show file tree
Hide file tree
Showing 3 changed files with 20 additions and 11 deletions.
3 changes: 3 additions & 0 deletions obl_microsites/settings.py
Original file line number Diff line number Diff line change
Expand Up @@ -32,3 +32,6 @@
"website": "https://www.matzikamamunicipality.co.za/",
},
}

# rely on open-by-laws to manage search indexing
ELASTICSEARCH_DSL_AUTOSYNC = False
4 changes: 4 additions & 0 deletions obl_microsites/templates/peachjam/_header.html
Original file line number Diff line number Diff line change
Expand Up @@ -23,3 +23,7 @@
href="{% url 'municipal_by_laws' code=MICROSITE.locality.code %}">{{ MICROSITE.locality.name }} By-laws</a>
</li>
{% endblock %}
{% block search-form %}
{{ block.super }}
<input type="hidden" name="locality" value="{{ MICROSITE.locality.name }}"/>
{% endblock %}
24 changes: 13 additions & 11 deletions peachjam/templates/peachjam/_header.html
Original file line number Diff line number Diff line change
Expand Up @@ -26,17 +26,19 @@
{% if request.path == '/' %}
{% else %}
<form method="get" action="{% url 'search:search' %}">
<div class="input-group">
<input type="text"
class="form-control"
placeholder="{% blocktrans %}Search {{ APP_NAME }}{% endblocktrans %}"
aria-label="{% blocktrans %}Search {{ APP_NAME }}{% endblocktrans %}"
aria-describedby="button-addon2"
name="q"/>
<button class="btn btn-dark" type="submit" id="button-addon2">
<i class="bi bi-search text-white"></i>
</button>
</div>
{% block search-form %}
<div class="input-group">
<input type="text"
class="form-control"
placeholder="{% blocktrans %}Search {{ APP_NAME }}{% endblocktrans %}"
aria-label="{% blocktrans %}Search {{ APP_NAME }}{% endblocktrans %}"
aria-describedby="button-addon2"
name="q"/>
<button class="btn btn-dark" type="submit" id="button-addon2">
<i class="bi bi-search text-white"></i>
</button>
</div>
{% endblock %}
</form>
{% endif %}
{% if user.is_authenticated %}
Expand Down

0 comments on commit a15b078

Please sign in to comment.