diff --git a/fec/fec/static/scss/components/_overlay.scss b/fec/fec/static/scss/components/_overlay.scss index 78da27702..20906c09c 100644 --- a/fec/fec/static/scss/components/_overlay.scss +++ b/fec/fec/static/scss/components/_overlay.scss @@ -27,4 +27,11 @@ background-repeat: no-repeat; background-position: 50% 20%; } + + &.position-top { + background-position: 50% 100px !important; + } + } + + diff --git a/fec/legal/templates/legal-search-results.jinja b/fec/legal/templates/legal-search-results.jinja index 61f92345a..fea4551c9 100644 --- a/fec/legal/templates/legal-search-results.jinja +++ b/fec/legal/templates/legal-search-results.jinja @@ -57,6 +57,7 @@ Search legal resources
+
{% if query %}

Results for “{{ query }}” in {{document_types[result_type]}}

{% endif %} @@ -195,4 +196,47 @@ Search legal resources + {% endblock %} \ No newline at end of file diff --git a/fec/legal/templates/macros/legal.jinja b/fec/legal/templates/macros/legal.jinja index bbabe622e..33b05e633 100644 --- a/fec/legal/templates/macros/legal.jinja +++ b/fec/legal/templates/macros/legal.jinja @@ -8,7 +8,7 @@
- + @@ -175,7 +175,6 @@ {% endif %} {% endmacro %} -{# TODO: Re-use keyword_search macro above to use {{ query }} as the input name attr and update AO, MUR, ADR, AF, Rulemakings filters accordingly #} {% macro keyword_search_q(result_type, query ) %}
diff --git a/fec/legal/views.py b/fec/legal/views.py index 0f556b707..804ad5317 100644 --- a/fec/legal/views.py +++ b/fec/legal/views.py @@ -1362,18 +1362,16 @@ def legal_doc_search_statutes(request): def get_legal_category_order(results, result_type): """ Return categories in pre-defined order, moving categories with empty - results to the end. Move chosen category(result_type) to top when not searching 'all' + results to the end. """ categories = ['admin_fines', 'advisory_opinions', 'adrs', 'murs', 'regulations', 'rulemakings', 'statutes'] if not settings.FEATURES['rulemakings']: categories.remove('rulemakings') - category_order = [x for x in categories if results.get('total_' + x, 0) > 0] +\ + category_order = [x for x in categories if results.get('total_' + x, 0) > 0] + \ [x for x in categories if results.get('total_' + x, 0) == 0] # Default to 'admin_fines' first if result_type is 'all', because we dont want 'all' in category_order result_type = 'admin_fines' if result_type == 'all' else result_type - # Move chosen search type to the top if not searching 'all' - category_order.insert(0, category_order.pop(category_order.index(result_type))) return category_order