-
Notifications
You must be signed in to change notification settings - Fork 3
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Showing
7 changed files
with
106 additions
and
35 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,11 +1,13 @@ | ||
{% load maps_extras %} | ||
{% load i18n %} | ||
<section class="home__search"> | ||
<form role="search" method="get" class="search-form search-form--inverse" action="/"> | ||
<form role="search" method="get" class="search-form search-form--inverse" action="{% url 'search_results' %}"> | ||
<!-- {% csrf_token %} --> | ||
<label> | ||
<span class="screen-reader-text">search</span> | ||
<input id="s" name="s" placeholder="Search by co-op or individual name, details, or tags…" type="search"> | ||
<span class="screen-reader-text">{% trans 'search' %}</span> | ||
<input id="s" name="s" placeholder="{% trans 'Search by co-op or individual name, details, or tags…' %}" type="search"> | ||
</label> | ||
<button type="submit" class="button button--search" disabled><span class="screen-reader-text">submit search</span> {% icon 'search' %} | ||
<button type="submit" class="button button--search"><span class="screen-reader-text">{% trans 'submit search' %}</span> {% icon 'search' %} | ||
</button> | ||
</form> | ||
</section> |
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 |
---|---|---|
@@ -1,8 +1,10 @@ | ||
{% load maps_extras %} | ||
<form role="search" method="get" class="search-form" action="/"> | ||
{% load i18n %} | ||
<form role="search" method="get" class="search-form" action="{% url 'search_results' %}"> | ||
<!-- {% csrf_token %} --> | ||
<label> | ||
<span class="screen-reader-text">search</span> | ||
<input id="s" name="s" placeholder="Search by co-op or individual name, details, or tags…" type="search"> | ||
<span class="screen-reader-text">{% trans 'search' %}</span> | ||
<input id="s" name="s" placeholder="{% trans 'Search…' %}" type="search"> | ||
</label> | ||
<button type="submit" class="button button--search"><span class="screen-reader-text">submit search</span> {% icon 'search' %}</button> | ||
<button type="submit" class="button button--search"><span class="screen-reader-text">{% trans 'submit search' %}</span> {% icon 'search' %}</button> | ||
</form> |
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,34 @@ | ||
{% extends 'maps/base.html' %} | ||
{% load i18n %} | ||
{% load maps_extras %} | ||
{% block title %}{{ 'Search results' |titlify }}{% endblock %} | ||
{% block bodyclass %}results{% endblock %} | ||
{% block content %} | ||
<div class="page-header"> | ||
<p><a class="link--breadcrumb" href="/">{% trans 'Home' %}</a></p> | ||
<h1>{% blocktrans with search_term=search_term %}Search results for “{{ search_term }}”{% endblocktrans %}</h1> | ||
</div> | ||
{% include 'maps/partials/messages.html' %} | ||
{% if object_list %} | ||
<h2 aria-role="status">{% if object_list|length > 1 %}{% blocktrans with org_count=object_list|length %}{{org_count}} organizations found{% endblocktrans %}{% else %}{% trans '1 organization found' %}{% endif %}</h2> | ||
<ul class="cards"> | ||
{% for organization in object_list %} | ||
{% include 'maps/partials/card_organization.html' %} | ||
{% endfor %} | ||
</ul> | ||
{% else %} | ||
<h2 aria-role="status">{% trans 'No organizations found' %}</h2> | ||
<p>{% trans 'No organizations matched your search term.' %}</p> | ||
{% endif %} | ||
{% if individual_list %} | ||
<h2 aria-role="status">{% if individual_list|length > 1 %}{% blocktrans with individual_count=individual_list|length %}{{individual_count}} individuals found{% endblocktrans %}{% else %}{% trans '1 individual found' %}{% endif %}</h2> | ||
<ul class="cards"> | ||
{% for individual in individual_list %} | ||
{% include 'maps/partials/card_individual.html' %} | ||
{% endfor %} | ||
</ul> | ||
{% else %} | ||
<h2 aria-role="status">{% trans 'No individuals found' %}</h2> | ||
<p>{% trans 'No individuals matched your search term.' %}</p> | ||
{% endif %} | ||
{% 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