{% macro fulltext_search_result_row(paper) -%}

{% if paper.title %} {{ paper.title[:512] }} {% if paper.title|length > 512 %}...{% endif %} {% else %} [blank] {% endif %}

{% if paper.best_pdf_url %}
  fulltext
{% endif %} {#
{{ ", ".join(paper.contrib_names[:12]) }} {% if paper.contrib_names|length > 12 %}(+{{ paper.contrib_names|length - 12 }} others){% endif %}
#} {% if paper.contrib_names %}
{{ ", ".join(paper.contrib_names[:12]) }} {% if paper.contrib_names|length > 12 %}(+{{ paper.contrib_names|length - 12 }} others){% endif %}
{% endif %} {% if paper.release_year %} {{ paper.release_year }} {% endif %} {% if paper.release_type %} {% if paper.release_type in ("article-journal", "paper-conference") %} {{ paper.release_type }} {% elif paper.release_type in ("book") %} {{ paper.release_type }} {% else %} {{ paper.release_type }} {% endif %} {% endif %} {% if paper.withdrawn_status %} {{ paper.withdrawn_status }} {% endif %} {% if paper.release_stage and paper.release_stage != "published" %} {{ paper.release_stage }} {% elif not paper.release_stage %} unknown {% endif %} {% if paper.container_name %} {% if paper.container_id %} {{ paper.container_name }} {% else %} {{ paper.container_name }} {% endif %} {% if paper.container_is_oa %}{% endif %} {% endif %} {% if paper.doi or paper.pmid or paper.arxiv_id or paper.jstor_id %}
{% endif %} {% if paper.doi %} doi:{{ paper.doi }}   {% endif %} {% if paper.pmid %} pmid:{{ paper.pmid }}   {% endif %} {% if paper.arxiv_id %} arXiv:{{ paper.arxiv_id }}   {% endif %} {% if False %} {# XXX: elastic release work grouping searches #}
and 5 other versions of the same work! {% endif %}
{% endmacro %} {% macro top_results(found) -%} Showing {% if found.offset == 0 %} first {% else %} results {{ found.offset }} — {% endif %} {{ found.offset + found.count_returned }} out of {{ found.count_found }} results {%- endmacro %} {% macro bottom_results(found, endpoint='search.fulltext_search') -%} {% if found.offset > 0 %} {% if found.offset - found.limit < 0 %} « Previous {% else %} « Previous {% endif %} {% else %} « Previous {% endif %}   Showing results {{ found.offset }} — {{ found.offset + found.count_returned }} out of {{ found.count_found }} results   {% if found.offset + found.limit < found.count_found and found.offset + found.limit < found.deep_page_limit %} Next » {% else %} Next » {% endif %} {%- endmacro %}