aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--fatcat_scholar/templates/search.html3
-rw-r--r--fatcat_scholar/templates/search_macros.html4
2 files changed, 4 insertions, 3 deletions
diff --git a/fatcat_scholar/templates/search.html b/fatcat_scholar/templates/search.html
index e7ccc1b..a4a5ba4 100644
--- a/fatcat_scholar/templates/search.html
+++ b/fatcat_scholar/templates/search.html
@@ -126,8 +126,9 @@
{% endif %}
{# search results (rendered via macro) #}
+ {% set expand_result = hits.query_type == 'lookup' %}
{% for paper in hits.results %}
- {{ search_macros.fulltext_search_result_row(paper, locale=locale, debug_mode=query.debug) }}
+ {{ search_macros.fulltext_search_result_row(paper, locale=locale, debug_mode=query.debug, expand=expand_result) }}
{% endfor %}
{% if hits.count_found > hits.limit %}
diff --git a/fatcat_scholar/templates/search_macros.html b/fatcat_scholar/templates/search_macros.html
index fb7068e..1fbfde6 100644
--- a/fatcat_scholar/templates/search_macros.html
+++ b/fatcat_scholar/templates/search_macros.html
@@ -169,11 +169,11 @@
{% endif %}
{% endmacro %}
-{% macro fulltext_search_result_row(paper, locale=None, debug_mode=False) -%}
+{% macro fulltext_search_result_row(paper, locale=None, debug_mode=False, expand=False) -%}
<div class="ui stackable doubling grid">
<div class="thirteen wide column biblio-record">
-<details class="access-options">
+<details class="access-options" {% if expand %}open{% endif %}>
<summary>
{# ### TITLE ROW #}
<h3 class="biblio-title">