diff options
| author | Bryan Newbold <bnewbold@robocracy.org> | 2019-02-20 19:21:19 -0800 | 
|---|---|---|
| committer | Bryan Newbold <bnewbold@robocracy.org> | 2019-02-20 19:21:23 -0800 | 
| commit | 7c04b83a6612b7a0c87afe4a1ed4bbb65568fea1 (patch) | |
| tree | 96eca26306465d8801d3bbb2eda62e611afb97c6 /python/fatcat_web/templates/container_search.html | |
| parent | 15ad67e4cd44c54a0f7a06f0eb0448d75c9ad1b6 (diff) | |
| download | fatcat-7c04b83a6612b7a0c87afe4a1ed4bbb65568fea1.tar.gz fatcat-7c04b83a6612b7a0c87afe4a1ed4bbb65568fea1.zip | |
add container search
And tweak release search a bit: DOIs aren't auto-replaced unless they
are the only word/query
This query code is very duplicative and should be refactored
Diffstat (limited to 'python/fatcat_web/templates/container_search.html')
| -rw-r--r-- | python/fatcat_web/templates/container_search.html | 49 | 
1 files changed, 49 insertions, 0 deletions
| diff --git a/python/fatcat_web/templates/container_search.html b/python/fatcat_web/templates/container_search.html new file mode 100644 index 00000000..9fc7aa98 --- /dev/null +++ b/python/fatcat_web/templates/container_search.html @@ -0,0 +1,49 @@ +{% extends "base.html" %} +{% block body %} + +<h1>Journal/Conference Search</h1> +<form class="" role="search" action="/container/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 container metadata"> +      <button class="ui button">Search</button> +    </div> +  </div> +</form> + +<br clear="all" /> + +{% if found %} +{% if found.results %} +  <i>Showing top {{ found.count_returned }} out of {{ found.count_found }} results for: <code>{{ found.query.q }}</code></i> +{% for entity in found.results %} +<div> +  <h4 style="margin-top: 1em; margin-bottom: 4px; font-size: 1.1em;"> +    <a href="/container/{{ entity.ident }}" style="color: #2224c7;">{{ entity['name'] }}</a> +    {% if entity.is_oa %}<i class="icon unlock orange small"></i>{% endif %} +  </h4> +  {% if entity.publisher %} +    <h5 style="margin-top: 4px; margin-bottom: 4px; font-size: 1em;">{{ entity.publisher }}</h5> +  {% endif %} +  {% if entity.issnl %} +    <a href="https://issn.org/{{entity.issnl }}" style="color: green;">ISSN {{ entity.issnl }}</a> +  {% endif %} +  {% if entity.container_type %} +   {{ entity.container_type }} +  {% endif %} +</div> +{% endfor %} +{% else %} +<div class="featurette-inner text-center" style="padding-top: 15%;"> +  <h3>No results found!</h3> +  <i>Query was: <code>{{ found.query.q }}</code></i> +  <br/> +  <p>Try:</p> +  <ul> +    <li>Search <a href="https://scholar.google.com/scholar?q={{ found.query.q | urlencode }}">Google Scholar</a></li> +  </ul> +</div> +{% endif %} +{% endif %} + +{% endblock %} | 
