diff options
Diffstat (limited to 'python/fatcat_web/templates/release_lookup.html')
-rw-r--r-- | python/fatcat_web/templates/release_lookup.html | 39 |
1 files changed, 12 insertions, 27 deletions
diff --git a/python/fatcat_web/templates/release_lookup.html b/python/fatcat_web/templates/release_lookup.html index 0495da36..924d70db 100644 --- a/python/fatcat_web/templates/release_lookup.html +++ b/python/fatcat_web/templates/release_lookup.html @@ -1,22 +1,5 @@ {% extends "base.html" %} - -{% macro lookup_form(key, example, lookup_key, lookup_value, lookup_error) -%} -<form class="ui form" role="search" action="/release/lookup" method="get"> - <div class="ui form"> - <div class="field {% if key == lookup_key %}{% if lookup_error == 400 %}error{% elif lookup_error == 404 %}warning{% endif %}{% endif %}"> - {% if key == lookup_key and lookup_error == 400 %} - <div class="ui pointing below red label"> - Not correct syntax. Expected, eg, {{ example }} - </div> - {% endif %} - <div class="ui action input big fluid"> - <input type="text" placeholder="{% if example %}eg, {{ example }}{% endif %}" name="{{ key }}" value="{% if key == lookup_key %}{{ lookup_value }}{% endif %}" aria-label="{{ key }} lookup"> - <button class="ui button">Go!</button> - </div> - </div> - </div> -</form> -{%- endmacro %} +{% import "entity_macros.html" as entity_macros %} {% block body %} @@ -41,7 +24,9 @@ entity. {% elif lookup_key == "pmcid" %} <p>You can check if it is a real PMCID by visiting: <b><a href="https://www.ncbi.nlm.nih.gov/pmc/articles/{{ lookup_value }}/">https://www.ncbi.nlm.nih.gov/pmc/articles/{{ lookup_value }}/</a></b> -{% else %} +{% elif lookup_key == "wikidata_qid" %} +<p>You can check if it is a real Wikidata entity by visiting: +<b><a href="https://www.wikidata.org/wiki/{{ lookup_value }}/">https://www.wikidata.org/wiki/{{ lookup_value }}/</a></b> {% endif %} </div> {% endif %} @@ -56,7 +41,7 @@ digital objects. Fatcat doesn't include all DOIs (eg, for granular components or TV shows), but it should for all complete research publications. DOIs are generated by publishers, who pay a fee to registrars like Crossref, Datacite, or JALC. -{{ lookup_form("doi", "10.1234/abc.5489", lookup_key, lookup_value, lookup_error) }} +{{ entity_macros.lookup_form("release", "doi", "10.1234/abc.5489", lookup_key, lookup_value, lookup_error) }} <i> Don't include a URL like "http://dx.doi.org/"</i> </div> @@ -68,7 +53,7 @@ catalog of biomedical publications. Catalog updates are published frequently, and may include deletions. Fatcat currently is only updated with new entries, it does not delete PMIDs. PubMed is edited by a large staff of trained catalogers, and has strict inclusion criteria for journals. -{{ lookup_form("pmid", "823835", lookup_key, lookup_value, lookup_error) }} +{{ entity_macros.lookup_form("release", "pmid", "823835", lookup_key, lookup_value, lookup_error) }} <br> <p><a href="https://en.wikipedia.org/wiki/PubMed_Central#PMCID">PubMed Central @@ -76,7 +61,7 @@ Identifiers (PMCID)</a> reference works deposited in the US (or European) PMC repositories. Not all works with a PMCID have a PMID. PMCIDs can be versioned (eg, with a trailing ".2"), but these are rare and most Fatcat releases only have the non-versioned PMCID. -{{ lookup_form("pmcid", "PMC93932", lookup_key, lookup_value, lookup_error) }} +{{ entity_macros.lookup_form("release", "pmcid", "PMC93932", lookup_key, lookup_value, lookup_error) }} <i> Include the "PMC" prefix.</i> </div> @@ -88,7 +73,7 @@ structured, machine-readable database that complements Wikipedia. Entities, which can include bibliographic entities like books and papers, are identified by a "QID". Fatcat also links container (journal) and creator (author) entities to Wikidata by QID. Anybody can edit Wikidata and create QIDs. -{{ lookup_form("wikidata_qid", "Q94324", lookup_key, lookup_value, lookup_error) }} +{{ entity_macros.lookup_form("release", "wikidata_qid", "Q94324", lookup_key, lookup_value, lookup_error) }} <i> Include the "Q" prefix.</i> </div> @@ -98,7 +83,7 @@ to Wikidata by QID. Anybody can edit Wikidata and create QIDs. <p><a href="https://en.wikipedia.org/wiki/Archival_Resource_Key">Archival Resource Keys</a> are no-cost, distributed identifiers based on URLs. Mostly used by archival systems (as opposed to publishers or repositories). -{{ lookup_form("ark", "ark:2349/sddd92", lookup_key, lookup_value, lookup_error) }} +{{ entity_macros.lookup_form("release", "ark", "ark:2349/sddd92", lookup_key, lookup_value, lookup_error) }} <i> Only the identifier part (starting with "ark:"), not the full URL.</i> </div> @@ -108,7 +93,7 @@ used by archival systems (as opposed to publishers or repositories). <p><a href="https://en.wikipedia.org/wiki/International_Standard_Book_Number"> International Standard Book Number</a>, assigned to specific published versions of a book (including ebooks). -{{ lookup_form("isbn13", "978-3-16-148410-0", lookup_key, lookup_value, lookup_error) }} +{{ entity_macros.lookup_form("release", "isbn13", "978-3-16-148410-0", lookup_key, lookup_value, lookup_error) }} <i> Canonical ISBN-13 number (not ISBN-9), with hyphens</i> </div> @@ -120,7 +105,7 @@ generated for works deposited in the free arxiv.org pre-print repository. Identifiers are generated for each version of a work, eg ending in "v3". Fatcat releases must be versioned; if you don't know the version you can always lookup "v1" and then look for other releases under the same work. -{{ lookup_form("arxiv", "0706.0001v1 or math-GT/0309136v2", lookup_key, lookup_value, lookup_error) }} +{{ entity_macros.lookup_form("release", "arxiv", "0706.0001v1 or math-GT/0309136v2", lookup_key, lookup_value, lookup_error) }} <i> Old and new style supported, but version always required for exact lookups.</i> </div> @@ -133,7 +118,7 @@ are numbers internally assigned to works archived on number after a <code>10.2307/</code> prefix, but not all works have such a DOI. Fatcat mostly has JSTOR identifiers for works in the "Early Journal Collection", which are in the public domain. -{{ lookup_form("jstor", "92492", lookup_key, lookup_value, lookup_error) }} +{{ entity_macros.lookup_form("release", "jstor", "92492", lookup_key, lookup_value, lookup_error) }} </div> |