Skip to content

Commit

Permalink
4531 revise layout copy for search screens (#4671)
Browse files Browse the repository at this point in the history
* Updatd search alert and screen in line with
designs

* updated search headings

* Updated test and applied formatting to div

* Ran black to format

* Formatted p tags

* Changed text color for accessability

* Added rel reference to _blank target
  • Loading branch information
anagradova authored Jan 30, 2025
1 parent 810879c commit fc0fc8b
Show file tree
Hide file tree
Showing 3 changed files with 15 additions and 31 deletions.
36 changes: 7 additions & 29 deletions backend/dissemination/templates/search-alert-info.html
Original file line number Diff line number Diff line change
@@ -1,34 +1,12 @@
{% load humanize %}
{% load sprite_helper %}
<div class="usa-alert usa-alert--info">
<div class="usa-alert__body">
<h2 class="usa-alert__heading">Searching the FAC database</h2>
{% if advanced_search_flag %}
<p class="usa-alert__text padding-bottom-2">
Learn more about how our advanced search filters work on <a href='https://www.fac.gov/search-resources/advanced/' target='_blank'>our resources page</a>.
</p>
{% else %}
<p class="usa-alert__text padding-bottom-2">
Learn more about how our search filters work on <a href='https://www.fac.gov/search-resources/filters/' target='_blank'>our resources page</a>.
</p>
{% endif %}

<h2 class="usa-alert__heading">Summary reports</h2>
<p class="usa-alert__text padding-bottom-2">
For search results of {{ summary_report_download_limit|intcomma }} submissions or less, you can download a combined spreadsheet of all data.
If you need to download more than {{ summary_report_download_limit|intcomma }} submissions, try limiting your search parameters to download in batches.
<div class="margin-y-2 display-flex">
<div class="text-family-public-sans">
<p class="usa-alert__text">
<a href="{% url 'dissemination:Search' %}">Basic Search</a> is updated in real time and can be used to confirm that an audit submission has been accepted. <a href="{% url 'dissemination:AdvancedSearch' %}">Advanced Search</a> is updated once daily at 12am EST and includes additional filters to support our Federal partners.
</p>
<p class="usa-alert__text">
Learn how Basic and Advanced search filters work on our <a href='https://www.fac.gov/search-resources/filters/' target='_blank' rel="noopener noreferrer">Search resources page</a>.
</p>

{% if advanced_search_flag %}
<h2 class="usa-alert__heading">Basic search</h2>
<p class="usa-alert__text">
We update advanced search nightly with new submissions. <a href="{% url 'dissemination:Search' %}">Basic search</a> is always up-to-date. This is best for users wanting to confirm their submissions are complete.
</p>
{% else %}
<h2 class="usa-alert__heading">Advanced search</h2>
<p class="usa-alert__text">
Audit resolution officials may want to use the <a href="{% url 'dissemination:AdvancedSearch' %}">advanced search</a> for additional filters.
</p>
{% endif %}
</div>
</div>
6 changes: 5 additions & 1 deletion backend/dissemination/templates/search.html
Original file line number Diff line number Diff line change
Expand Up @@ -92,7 +92,11 @@ <h3>Filters</h3>
</form>
</div>
<div class="grid-col audit-search-results">
<h1 class="font-sans-2xl">Search single audit reports</h1>
{% if advanced_search_flag %}
<h1 class="font-sans-2xl">Audit Submissions Advanced Search </h1>
{% else %}
<h1 class="font-sans-2xl">Audit Submissions Basic Search </h1>
{% endif %}
{% include "search-alert-info.html" %}
{% if form.errors %}
{% include "search-alert-error.html" %}
Expand Down
4 changes: 3 additions & 1 deletion backend/dissemination/test_views.py
Original file line number Diff line number Diff line change
Expand Up @@ -179,7 +179,9 @@ def test_allows_anonymous(self):

def test_search(self):
response = self.anon_client.post(self._search_url(), {})
self.assertContains(response, "Search single audit reports")
self.assertContains(
response, "is updated in real time and can be used to confirm"
)
# If there are results, we'll see "results in x seconds" somewhere.
self.assertNotContains(response, "results in")

Expand Down

0 comments on commit fc0fc8b

Please sign in to comment.