diff options
Diffstat (limited to 'python/fatcat_web')
-rw-r--r-- | python/fatcat_web/forms.py | 6 | ||||
-rw-r--r-- | python/fatcat_web/routes.py | 6 | ||||
-rw-r--r-- | python/fatcat_web/templates/container_view.html | 15 | ||||
-rw-r--r-- | python/fatcat_web/templates/entity_macros.html | 11 | ||||
-rw-r--r-- | python/fatcat_web/templates/release_lookup.html | 13 | ||||
-rw-r--r-- | python/fatcat_web/templates/release_view.html | 5 |
6 files changed, 45 insertions, 11 deletions
diff --git a/python/fatcat_web/forms.py b/python/fatcat_web/forms.py index 19176a59..a856ef22 100644 --- a/python/fatcat_web/forms.py +++ b/python/fatcat_web/forms.py @@ -133,6 +133,8 @@ class ReleaseEntityForm(EntityEditForm): #core_id #arxiv_id #jstor_id + #oai + #hdl volume = StringField('Volume') issue = StringField('Issue') pages = StringField('Pages') @@ -226,8 +228,8 @@ container_type_options = ( ) CONTAINER_SIMPLE_ATTRS = ['name', 'container_type', 'publisher', 'issnl', - 'wikidata_qid'] -CONTAINER_EXTRA_ATTRS = ['issne', 'issnp', 'original_name', 'country'] + 'wikidata_qid', 'issne', 'issnp'] +CONTAINER_EXTRA_ATTRS = ['original_name', 'country'] class ContainerEntityForm(EntityEditForm): name = StringField('Name/Title', diff --git a/python/fatcat_web/routes.py b/python/fatcat_web/routes.py index ab060c45..71dadfa1 100644 --- a/python/fatcat_web/routes.py +++ b/python/fatcat_web/routes.py @@ -179,7 +179,7 @@ def release_lookup(): 'release', 'release_lookup.html', ('doi', 'wikidata_qid', 'pmid', 'pmcid', 'isbn13', 'jstor', 'arxiv', - 'core', 'ark', 'mag'), + 'core', 'ark', 'mag', 'oai', 'hdl'), lambda p: api.lookup_release(**p)) @app.route('/work/lookup', methods=['GET']) @@ -672,7 +672,9 @@ def release_save(ident): elif release.ext_ids.arxiv: form.base_url.data = "https://arxiv.org/pdf/{}.pdf".format(release.ext_ids.arxiv) elif release.ext_ids.pmcid: - form.base_url.data = "http://europepmc.org/backend/ptpmcrender.fcgi?accid={}&blobtype=pdf".format(release.ext_ids.pmcid) + form.base_url.data = "https://europepmc.org/backend/ptpmcrender.fcgi?accid={}&blobtype=pdf".format(release.ext_ids.pmcid) + elif release.ext_ids.hdl: + form.base_url.data = "https://hdl.handle.net/{}".format(release.ext_ids.hdl) return render_template('release_save.html', entity=release, form=form), 200 ### Search ################################################################## diff --git a/python/fatcat_web/templates/container_view.html b/python/fatcat_web/templates/container_view.html index 0d572c63..ddad07ae 100644 --- a/python/fatcat_web/templates/container_view.html +++ b/python/fatcat_web/templates/container_view.html @@ -88,17 +88,22 @@ {% endif %} {% endif %} -{% if container.issnl != None or container.wikidata_qid != None %} +<div class="ui segment attached"> + <b>Type</b> {{ container.container_type or 'Unknown' }} + <b>Status</b> {{ container.publication_status or 'Unknown' }} +</div> + +{% if container.issnl != None or container.issne != None or container.issnp != None or container.wikidata_qid != None %} <div class="ui segment attached"> {% if container.issnl != None %} <b>ISSN-L<sup><a href="https://en.wikipedia.org/wiki/International_Standard_Serial_Number#Linking_ISSN">?</a></sup></b> <code>{{ container.issnl }}</code> {% endif %} - {% if container.extra != None and container.extra.issnp != None and (container.extra.issnp|length > 0) %} - <br><i class="icon paperclip"></i>Print: <code>{{ container.extra.issnp }}</code> + {% if container.issnp or (container.extra != None and container.extra.issnp != None and (container.extra.issnp|length > 0)) %} + <br><i class="icon paperclip"></i>Print: <code>{{ container.issnp or container.extra.issnp }}</code> {% endif %} - {% if container.extra != None and container.extra.issne != None and (container.extra.issne|length > 0) %} - <br><i class="icon plug"></i>Electronic: <code>{{ container.extra.issne }}</code> + {% if container.issne or (container.extra != None and container.extra.issne != None and (container.extra.issne|length > 0)) %} + <br><i class="icon plug"></i>Electronic: <code>{{ container.issne or container.extra.issne }}</code> {% endif %} <br> {% if container.wikidata_qid != None %} diff --git a/python/fatcat_web/templates/entity_macros.html b/python/fatcat_web/templates/entity_macros.html index 6b565f69..9ebff060 100644 --- a/python/fatcat_web/templates/entity_macros.html +++ b/python/fatcat_web/templates/entity_macros.html @@ -228,7 +228,7 @@ {% endif %} {# ### IDENTIFIERS #} - {% if paper.doi or paper.pmcid or paper.pmid or paper.arxiv_id or paper.jstor_id or paper.doaj_id or paper.dblp_id %} + {% if paper.doi or paper.pmcid or paper.pmid or paper.arxiv_id or paper.jstor_id or paper.doaj_id or paper.dblp_id or paper.hdl %} <br> {% endif %} {% if paper.doi %} @@ -251,6 +251,9 @@ {% if paper.dblp_id %} <a href="https://dblp.org/rec/{{ paper.dblp_id }}.html" style="color: green;">dblp:{{ paper.dblp_id }}</a> {% endif %} + {% if paper.hdl %} + <a href="https://hdl.handle.net/{{ paper.hdl }}" style="color: green;">hdl:{{ paper.hdl}}</a> + {% endif %} {# WIP: elastic release work grouping searches <br> @@ -276,6 +279,9 @@ {% if entity.container_type %} {{ entity.container_type }} {% endif %} + {% if entity.publication_status and entity.publication_status != "active" %} + {{ entity.publication_status }} + {% endif %} </div> {% endmacro %} @@ -449,6 +455,9 @@ yellow {% if release.ext_ids.dblp %} <a href="#" style="color:green;">dblp:{{ release.ext_ids.dblp }}</a> {% endif %} + {% if release.ext_ids.hdl %} + <a href="https://hdl.handle.net/{{ release.ext_ids.hdl }}" style="color:green;">hdl:{{ release.ext_ids.hdl }}</a> + {% endif %} {% endmacro %} {# similar to the release_summary above, but for CSL-JSON #} diff --git a/python/fatcat_web/templates/release_lookup.html b/python/fatcat_web/templates/release_lookup.html index add8da93..a0ef3bb3 100644 --- a/python/fatcat_web/templates/release_lookup.html +++ b/python/fatcat_web/templates/release_lookup.html @@ -38,6 +38,9 @@ you don't know the version, you can append "v1" to get the first version. {% 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> +{% elif lookup_key == "hdl" %} +<p>You can check if it is a real Handle entity by visiting: +<b><a href="https://hdl.handle.net/{{ lookup_value }}">https://hdl.handle.net/{{ lookup_value }}</a></b> {% endif %} </div> {% endif %} @@ -120,6 +123,16 @@ releases must be versioned; if you don't know the version you can always lookup <i> Old and new style supported, but version always required for exact lookups.</i> </div> +<div class="ui attached segment"> + +<h2>Handle</h2> +<p><a href="https://handle.net">Handle identifiers</a> are registered under the +hierarchal handle.net system, maintained by CNRI. While technically all DOIs +are Handles, our system treats them as distinct identifiers. +{{ entity_macros.lookup_form("release", "hdl", "20.500.12690/RIN/IDDOAH/BTNH25", lookup_key, lookup_value, lookup_error) }} +<i> Only include the identifier itself</i> + +</div> <div class="ui attached bottom segment"> <h2>JSTOR</h2> diff --git a/python/fatcat_web/templates/release_view.html b/python/fatcat_web/templates/release_view.html index 4652f4a2..01769b1b 100644 --- a/python/fatcat_web/templates/release_view.html +++ b/python/fatcat_web/templates/release_view.html @@ -266,7 +266,7 @@ accessible version. </div> {% endif %} -{% if release.number or release.ext_ids.doi or release.ext_ids.pmid or release.ext_ids.pmcid or release.ext_ids.wikidata_qid or release.ext_ids.isbn13 or release.ext_ids.arxiv or release.ext_ids.jstor or release.ext_ids.ark or release.ext_ids.doaj or release.ext_ids.dblp %} +{% if release.number or release.ext_ids.doi or release.ext_ids.pmid or release.ext_ids.pmcid or release.ext_ids.wikidata_qid or release.ext_ids.isbn13 or release.ext_ids.arxiv or release.ext_ids.jstor or release.ext_ids.ark or release.ext_ids.doaj or release.ext_ids.dblp or release.ext_ids.hdl %} <div class="ui segment attached" style="word-wrap: break-word;"> {% if release.number %} <b>Number</b> <code>{{ release.number }}</code><br> @@ -301,6 +301,9 @@ accessible version. {% if release.ext_ids.dblp != None %} <b>dblp</b> <a href="https://dblp.org/rec/{{ release.ext_ids.dblp }}.html"><code>{{ release.ext_ids.dblp }}</code></a><br> {% endif %} +{% if release.ext_ids.hdl != None %} + <b>Handle</b> <a href="https://hdl.handle.net/{{ release.ext_ids.hdl}}"><code>{{ release.ext_ids.hdl }}</code></a><br> +{% endif %} </div> {% endif %} |