aboutsummaryrefslogtreecommitdiffstats
path: root/python
diff options
context:
space:
mode:
authorBryan Newbold <bnewbold@robocracy.org>2021-10-13 16:46:02 -0700
committerBryan Newbold <bnewbold@robocracy.org>2021-10-13 16:46:02 -0700
commit316b25455a6fc96023ac8457ec53fad3777d79af (patch)
treef32821df52f46792d3c8ca9d8c5916911529c32e /python
parentb77692ccb27a5b8f4a172939caec6ecd79eaff25 (diff)
downloadfatcat-316b25455a6fc96023ac8457ec53fad3777d79af.tar.gz
fatcat-316b25455a6fc96023ac8457ec53fad3777d79af.zip
web: container lookup and display features
Diffstat (limited to 'python')
-rw-r--r--python/fatcat_web/routes.py2
-rw-r--r--python/fatcat_web/templates/container_lookup.html14
-rw-r--r--python/fatcat_web/templates/container_view.html4
3 files changed, 13 insertions, 7 deletions
diff --git a/python/fatcat_web/routes.py b/python/fatcat_web/routes.py
index 71dadfa1..41027710 100644
--- a/python/fatcat_web/routes.py
+++ b/python/fatcat_web/routes.py
@@ -146,7 +146,7 @@ def container_lookup():
return generic_lookup_view(
'container',
'container_lookup.html',
- ('issnl', 'wikidata_qid'),
+ ('issn', 'issne', 'issnp', 'issnl', 'wikidata_qid'),
lambda p: api.lookup_container(**p))
@app.route('/creator/lookup', methods=['GET'])
diff --git a/python/fatcat_web/templates/container_lookup.html b/python/fatcat_web/templates/container_lookup.html
index 798e5587..8a3d4bdf 100644
--- a/python/fatcat_web/templates/container_lookup.html
+++ b/python/fatcat_web/templates/container_lookup.html
@@ -18,11 +18,9 @@ Couldn't find a container with that identifier (<b><code>{{ lookup_key }}:{{
lookup_value }}</code></b>). If you think it should be in the catalog, you could
search for an existing record missing that identifier, or create a new container
entity.
-{% if lookup_key == "issnl" %}
-<p>You can check if it is a registered ISSN-L by visiting:
+{% if lookup_key == "issnl" or lookup_key == "issn" or lookup_key == "issne" or lookup_key == "issnp" %}
+<p>You can check if it is a registered ISSN by visiting:
<b><a href="https://portal.issn.org/api/search?search[]=MUST=allissnbis={{ lookup_value }}">https://portal.issn.org/api/search?search[]=MUST=allissnbis={{ lookup_value }}</a></b>.
-If this is a valid electronic or print ISSN, but not the ISSN-L for the
-container, you need to use the indicated "linking" ISSN.
{% 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>
@@ -32,6 +30,14 @@ container, you need to use the indicated "linking" ISSN.
<div class="ui top attached segment">
+<h2>ISSN</h2>
+<p>Lookup container with the given ISSN as any of the ISSN-L, ISSN-E (electronic) or ISSN-P (print) ISSNs.
+{{ entity_macros.lookup_form("container", "issn", "1234-567X", lookup_key, lookup_value, lookup_error) }}
+<i>&nbsp; Must include the dash</i>
+
+</div>
+<div class="ui attached segment">
+
<h2>ISSN-L</h2>
<p>The "linking" ISSN for a journal or other publication is one of the
"print" or "electronic"
diff --git a/python/fatcat_web/templates/container_view.html b/python/fatcat_web/templates/container_view.html
index ddad07ae..e1c49197 100644
--- a/python/fatcat_web/templates/container_view.html
+++ b/python/fatcat_web/templates/container_view.html
@@ -89,8 +89,8 @@
{% endif %}
<div class="ui segment attached">
- <b>Type</b> &nbsp;{{ container.container_type or 'Unknown' }}
- <b>Status</b> &nbsp;{{ container.publication_status or 'Unknown' }}
+ <b>Type</b> &nbsp;<code>{{ container.container_type or 'unknown' }}</code><br>
+ <b>Status</b> &nbsp;<code>{{ container.publication_status or 'Unknown' }}</code><br>
</div>
{% if container.issnl != None or container.issne != None or container.issnp != None or container.wikidata_qid != None %}