Commit 77a1a42c authored by felix.herrmann's avatar felix.herrmann
Browse files

fix(search): reduce GET parameters in search url

parent c2830c20
{% load static i18n core_tags %}
<div class="list-group">
<button class="list-group-item active search-filter-button" type="button" data-toggle="collapse" data-target="#collapse-{{ filtertype }}-filter" aria-expanded="false" aria-controls="collapse-{{ filtertype }}-filter">
{% trans "Search for" %}: {% if filter_applied == 'dataset_index' %}Datasets{% else %}Users{% endif %} <span class="search-filter-caret"><span class="i-drop-down-arrow-md"></span></span>
{% trans "Search for" %}: {% if filter_applied == 'dataset_index' %}{% trans 'Datasets' %}{% elif filter_applied == 'user_index' %}{% trans 'Users' %}{% else %}{% trans 'Help' %}{% endif %} <span class="search-filter-caret"><span class="i-drop-down-arrow-md"></span></span>
</button>
</div>
<div class="collapse show" id="collapse-{{ filtertype }}-filter">
<div class="list-group search-filter smallskip">
{# user_index #}
<input type="radio" value="user_index" aria-label="{% trans 'Users' %}" {% if filter_applied == 'user_index' %} checked{% else %}ic-get-from="{% url 'ddusers:search' %}" ic-push-url="true" ic-push-params="q,countries,categories" ic-include=".search-middle" ic-target="#content"{% endif %} id="search-filter-user_index" />
<input type="radio" value="user_index" aria-label="{% trans 'Users' %}" {% if filter_applied == 'user_index' %} checked{% else %}ic-get-from="{% url 'ddusers:search' %}{{ search_params|add_url_search_params }}" ic-push-url="true" ic-include=".search-middle" ic-target="#content"{% endif %} id="search-filter-user_index" />
<label class="list-group-item" for="search-filter-user_index">{% trans 'Users' %}</label>
{# dataset_index #}
<input type="radio" value="dataset_index" aria-label="{% trans 'Datasets' %}" {% if filter_applied == 'dataset_index' %} checked{% else %}ic-get-from="{% url 'dddatasets:search' %}" ic-push-url="true" ic-push-params="q,countries,categories" ic-include=".search-middle" ic-target="#content"{% endif %} id="search-filter-dataset_index" />
<input type="radio" value="dataset_index" aria-label="{% trans 'Datasets' %}" {% if filter_applied == 'dataset_index' %} checked{% else %}ic-get-from="{% url 'dddatasets:search' %}{{ search_params|add_url_search_params }}" ic-push-url="true" ic-include=".search-middle" ic-target="#content"{% endif %} id="search-filter-dataset_index" />
<label class="list-group-item" for="search-filter-dataset_index">{% trans 'Datasets' %}</label>
{# help_index #}
<input type="radio" value="help_index" aria-label="{% trans 'Help' %}" {% if filter_applied == 'help_index' %} checked{% else %}ic-get-from="{% url 'core:help_search' %}" ic-push-url="true" ic-push-params="q,countries,categories" ic-include=".search-middle" ic-target="#content"{% endif %} id="search-filter-help_index" />
<input type="radio" value="help_index" aria-label="{% trans 'Help' %}" {% if filter_applied == 'help_index' %} checked{% else %}ic-get-from="{% url 'core:help_search' %}" ic-push-url="true" ic-include=".search-middle" ic-target="#content"{% endif %} id="search-filter-help_index" />
<label class="list-group-item" for="search-filter-help_index">{% trans 'Help' %}</label>
</div>
</div>
\ No newline at end of file
......@@ -9,7 +9,7 @@
<div class="collapse navbar-collapse" id="navbarSupportedContent">
<div class="input-group w-25 mx-auto">
<input class="form-control search-top search-data" type="text" {% if query %}value="{{ query }}" {% else %}placeholder="Search"{% endif %} name="q" aria-label="Search">
<input class="form-control search-top" type="text" {% if query %}value="{{ query }}" {% else %}placeholder="Search"{% endif %} name="q" aria-label="Search">
<div class="input-group-append">
<button class="input-group-text search-button" type="button" ic-include=".search-data" ic-push-url="true" ic-push-params="q,countries,categories" ic-get-from="{% url 'ddusers:search' %}" ic-target="#content"><span class="i-search-md"></span></button>
</div>
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment