aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--fatcat_covid19/templates/fulltext_search.html4
-rw-r--r--fatcat_covid19/webface.py4
2 files changed, 4 insertions, 4 deletions
diff --git a/fatcat_covid19/templates/fulltext_search.html b/fatcat_covid19/templates/fulltext_search.html
index 55b25cc..f668b19 100644
--- a/fatcat_covid19/templates/fulltext_search.html
+++ b/fatcat_covid19/templates/fulltext_search.html
@@ -43,7 +43,7 @@
{{ _("from") }}
<div class="ui inline dropdown">
- <input type="hidden" name="filter_time" value="{{ filter_time or 'all' }}">
+ <input type="hidden" name="filter_time" value="{{ filter_time or 'all_time' }}">
<div class="text">{{ (filter_time and filter_time.replace("_", " ")) or "all time" }}</div>
<i class="dropdown icon"></i>
<div class="menu">
@@ -52,7 +52,7 @@
{{ _("Time Period") }}
</div>
<div class="divider"></div>
- <div class="{% if filter_type == 'all' %}active{% endif %} item" data-value="all" >{{ _("all time") }}</div>
+ <div class="{% if filter_type == 'all_time' %}active{% endif %} item" data-value="all_time" >{{ _("all time") }}</div>
<div class="{% if filter_type == 'past_week' %}active{% endif %} item" data-value="past_week" >{{ _("past week") }}</div>
<div class="{% if filter_type == 'this_year' %}active{% endif %} item" data-value="this_year" >{{ _("this year") }}</div>
<div class="{% if filter_type == 'since_2000' %}active{% endif %} item" data-value="since_2000" >{{ _("since 2000") }}</div>
diff --git a/fatcat_covid19/webface.py b/fatcat_covid19/webface.py
index aa604df..8db807b 100644
--- a/fatcat_covid19/webface.py
+++ b/fatcat_covid19/webface.py
@@ -83,8 +83,8 @@ def page_home():
def fulltext_search():
query = request.args.get('q')
- filter_type = request.args.get('filter_type') or None
- filter_time = request.args.get('filter_time') or None
+ filter_type = request.args.get('filter_type') or 'papers'
+ filter_time = request.args.get('filter_time') or 'all_time'
offset = request.args.get('offset', '0')
offset = max(0, int(offset)) if offset.isnumeric() else 0