aboutsummaryrefslogtreecommitdiffstats
path: root/python/fatcat_web
diff options
context:
space:
mode:
Diffstat (limited to 'python/fatcat_web')
-rw-r--r--python/fatcat_web/templates/release_search.html97
1 files changed, 75 insertions, 22 deletions
diff --git a/python/fatcat_web/templates/release_search.html b/python/fatcat_web/templates/release_search.html
index 0e00279c..e1e76030 100644
--- a/python/fatcat_web/templates/release_search.html
+++ b/python/fatcat_web/templates/release_search.html
@@ -1,19 +1,26 @@
{% extends "base.html" %}
-{% block body %}
+{% block fullmain %}
-<h1>Search all Releases</h1>
-<form class="" role="search" action="/release/search" method="get">
- <div class="ui form">
- <div class="ui action input huge fluid">
- <input type="text" placeholder="Query..." name="q" value="{% if query %}{{ query }}{% endif %}" aria-label="search release metadata">
- <button class="ui button">Search</button>
- </div>
- <div class="ui checkbox" style="float: right; margin: 1em;">
- <input type="checkbox" name="fulltext_only" value="true" {% if fulltext_only %}checked{% endif %}>
- <label>Fulltext Available Only</label>
- </div>
+<div class="ui vertical stripe segment" style="background-color: #EEE; padding-top: 4.5em;">
+ <div class="ui container text">
+ <h1>Search all Releases</h1>
+ <form class="" role="search" action="/release/search" method="get">
+ <div class="ui form">
+ <div class="ui action input huge fluid">
+ <input type="text" placeholder="Query..." name="q" value="{% if query %}{{ query }}{% endif %}" aria-label="search release metadata">
+ <button class="ui primary button">Search</button>
+ </div>
+ <div class="ui checkbox" style="float: right; margin: 1em;">
+ <input type="checkbox" name="fulltext_only" value="true" {% if fulltext_only %}checked{% endif %}>
+ <label>Fulltext Available Only</label>
+ </div>
+ <br>Can also lookup by <b><a href="/release/lookup">identifier</a></b> or search <b><a href="/container/search?q={{ query or "" }}">containers</a></b>.
+ </div>
+ </form>
</div>
-</form>
+</div>
+
+<div class="ui container text">
<br clear="all" />
@@ -22,21 +29,50 @@
<i>Showing top {{ found.count_returned }} out of {{ found.count_found }} results for: <code>{{ found.query.q }}</code></i>
{% for paper in found.results %}
<div>
- <h4 style="margin-top: 1em; margin-bottom: 4px; font-size: 1.1em;"><a href="/release/{{ paper.ident }}" style="color: #2224c7;">{{ paper['title'] }}</a>
+ <h4 style="margin-top: 1em; margin-bottom: 0px; font-size: 1.1em;">
+ <a href="/release/{{ paper.ident }}" style="color: #2224c7;">
+ {% if paper.title %}
+ {{ paper.title[:512] }}
+ {% if paper.title|length > 512 %}...{% endif %}
+ {% else %}
+ [blank]
+ {% endif %}
+ </a>
+ </h4>
{% if paper.best_pdf_url %}
- &nbsp;&nbsp;<a href="{{ paper.best_pdf_url }}" class="ui label small"><i class="file icon"></i>fulltext</a>
+ <div style="float: right; padding: 4px;">
+ &nbsp;&nbsp;<a href="{{ paper.best_pdf_url }}" class="ui violet tag label"><i class="file icon"></i>fulltext</a>
+ </div>
{% endif %}
- </h4>
+ {#
<h5 style="margin-top: 4px; margin-bottom: 4px; font-size: 1em;">{{ ", ".join(paper.contrib_names[:12]) }}
{% if paper.contrib_names|length > 12 %}<i>(+{{ paper.contrib_names|length - 12 }} others)</i>{% endif %}
</h5>
- {% if paper.doi %}
- DOI: <a href="https://doi.org/{{paper.doi }}" style="color: green;">{{ paper.doi }}</a>
- - {{ paper.release_type }}
- {% if paper.release_year %}
- - {{ paper.release_year }}
+ #}
+ {% if paper.contrib_names %}
+ <div style="margin-top: 0px; margin-bottom: 0px; font-size: 1em;">
+ <b>
+ {{ ", ".join(paper.contrib_names[:12]) }}
+ {% if paper.contrib_names|length > 12 %}<i>(+{{ paper.contrib_names|length - 12 }} others)</i>{% endif %}
+ </b>
+ </div>
+ {% endif %}
+ {% if paper.release_year %}
+ {{ paper.release_year }}
+ {% endif %}
+ {% if paper.release_type %}
+ {% if paper.release_type in ("article-journal", "paper-conference") %}
+ <span class="ui black basic label small">{{ paper.release_type }}</span>
+ {% elif paper.release_type in ("book") %}
+ <span class="ui brown basic label small">{{ paper.release_type }}</span>
+ {% else %}
+ <span class="ui grey basic label small">{{ paper.release_type }}</span>
{% endif %}
- <br>
+ {% endif %}
+ {% if paper.release_status and paper.release_status != "published" %}
+ <span class="ui pink label small">{{ paper.release_status }}</span>
+ {% elif not paper.release_status %}
+ <span class="ui red label small">unknown</span>
{% endif %}
{% if paper.container_name %}
{% if paper.container_issnl %}
@@ -46,6 +82,22 @@
{% endif %}
{% if paper.container_is_oa %}<i class="icon unlock orange small"></i>{% endif %}
{% endif %}
+ {% if paper.doi or paper.pmid or paper.arxiv_id or paper.jstor_id %}
+ <br>
+ {% endif %}
+ {% if paper.doi %}
+ <a href="https://doi.org/{{paper.doi }}" style="color: green;">doi:{{ paper.doi }}</a> &nbsp;
+ {% endif %}
+ {% if paper.pmid %}
+ <a href="https://www.ncbi.nlm.nih.gov/pubmed/{{paper.pmid }}" style="color: green;">pmid:{{ paper.pmid }}</a> &nbsp;
+ {% endif %}
+ {% if paper.arxiv_id %}
+ <a href="https://arxiv.org/abs/{{paper.arxiv_id }}" style="color: green;">arXiv:{{ paper.arxiv_id }}</a> &nbsp;
+ {% endif %}
+ {% if False %} {# XXX: elastic release work grouping searches #}
+ <br>
+ <a href="/work/{{ paper.work_id }}"><i class="sitemap icon"></i> and 5 other versions of the same work!</a>
+ {% endif %}
</div>
{% endfor %}
{% if found.results|length > 8 %}
@@ -67,4 +119,5 @@
{% endif %}
{% endif %}
+</div>
{% endblock %}