diff options
-rw-r--r-- | fatcat_covid19/search.py | 2 | ||||
-rw-r--r-- | fatcat_covid19/templates/fulltext_search.html | 35 | ||||
-rw-r--r-- | fatcat_covid19/transform.py | 2 |
3 files changed, 10 insertions, 29 deletions
diff --git a/fatcat_covid19/search.py b/fatcat_covid19/search.py index 7d4596d..d39e665 100644 --- a/fatcat_covid19/search.py +++ b/fatcat_covid19/search.py @@ -81,7 +81,7 @@ def do_fulltext_search(q, limit=25, offset=0, filter_time=None, filter_type=None # type filters if filter_type == "papers": - search = search.filter("terms", release_type=[ "article-journal", "paper-conference", ]) + search = search.filter("terms", release_type=[ "article-journal", "paper-conference", "chapter", ]) elif filter_type == "reports": search = search.filter("terms", release_type=[ "report", "standard", ]) elif filter_type == "datasets": diff --git a/fatcat_covid19/templates/fulltext_search.html b/fatcat_covid19/templates/fulltext_search.html index 174acd9..55b25cc 100644 --- a/fatcat_covid19/templates/fulltext_search.html +++ b/fatcat_covid19/templates/fulltext_search.html @@ -14,7 +14,7 @@ <div class="ui vertical stripe segment" style="background-color: #EEE; padding-top: 2.5em; padding-bottom: 0.5em;"> <div class="ui container text"> - <h1>{{ _("Search COVID-19 documents") }}</h1> + <h1>{{ _("Search COVID-19 Research") }}</h1> <form class="" role="search" action="/fulltext/search" method="get"> <div class="ui form"> <div class="ui action input huge fluid"> @@ -23,34 +23,15 @@ </div> <div style="padding-top: 0.85em; padding-left: 1em;"> - Include: - -{# - <div class="ui inline dropdown"> - <input type="hidden" name="filter_time"> - <div class="text">{{ filter_time or 'any' }}</div> - <i class="dropdown icon"></i> - <div class="menu"> - <div class="header"> - <i class="filter icon"></i> - Publication Stage - </div> - <div class="divider"></div> - <div class="{% if filter_type == 'any' %}active{% endif %} item" data-value="any" >{{ _("any stage") }}</div> - <div class="{% if filter_type == 'published' %}active{% endif %} item" data-value="published" >{{ _("only published") }}</div> - <div class="{% if filter_type == 'pre_print' %}active{% endif %} item" data-value="pre_print" >{{ _("only pre-print") }}</div> - </div> - </div> -#} - + {{ _("Include") }} <div class="ui inline dropdown"> - <input type="hidden" name="filter_type" value="{{ filter_type }}"> + <input type="hidden" name="filter_type" value="{{ filter_type or 'papers' }}"> <div class="text">{{ filter_type or "papers" }}</div> <i class="dropdown icon"></i> <div class="menu"> <div class="header"> <i class="filter icon"></i> - Resource Type + {{ _("Resource Type") }} </div> <div class="divider"></div> <div class="{% if filter_type == 'papers' %}active{% endif %} item" data-value="papers" >{{ _("papers") }}</div> @@ -60,15 +41,15 @@ </div> </div> - from + {{ _("from") }} <div class="ui inline dropdown"> - <input type="hidden" name="filter_time" vale="{{ filter_time }}"> - <div class="text">{{ filter_time or "all time" }}</div> + <input type="hidden" name="filter_time" value="{{ filter_time or 'all' }}"> + <div class="text">{{ (filter_time and filter_time.replace("_", " ")) or "all time" }}</div> <i class="dropdown icon"></i> <div class="menu"> <div class="header"> <i class="filter icon"></i> - Time Period + {{ _("Time Period") }} </div> <div class="divider"></div> <div class="{% if filter_type == 'all' %}active{% endif %} item" data-value="all" >{{ _("all time") }}</div> diff --git a/fatcat_covid19/transform.py b/fatcat_covid19/transform.py index 9616c57..1002c10 100644 --- a/fatcat_covid19/transform.py +++ b/fatcat_covid19/transform.py @@ -170,7 +170,7 @@ def fulltext_to_elasticsearch(row, force_bool=True): # special-case medrxiv/biorxiv content if not t.get('release_stage') and not t.get('container_name') and t.get('doi', '').startswith('10.1101/20'): - t['container_name'] = 'biorXiv / medrXiv' + t['container_name'] = 'biorXiv/medrXiv' t['release_stage'] = 'draft' if t.get('release_type') in ['post', None]: t['release_type'] = 'article-journal' |