aboutsummaryrefslogtreecommitdiffstats
path: root/python/fatcat_web/templates
diff options
context:
space:
mode:
authorBryan Newbold <bnewbold@robocracy.org>2019-05-13 14:23:02 -0700
committerBryan Newbold <bnewbold@robocracy.org>2019-05-13 14:23:06 -0700
commit955d4942d5111cbbd8f4b99d4e3c6d79262dab6e (patch)
tree87757a7afdf00ab6de5ed7455267654bf49b5239 /python/fatcat_web/templates
parent287e892abb4adac8ea7f7211524a41c7cd06851c (diff)
downloadfatcat-955d4942d5111cbbd8f4b99d4e3c6d79262dab6e.tar.gz
fatcat-955d4942d5111cbbd8f4b99d4e3c6d79262dab6e.zip
partial python impl of ext_id and release_stage refactors
Diffstat (limited to 'python/fatcat_web/templates')
-rw-r--r--python/fatcat_web/templates/entity_macros.html6
-rw-r--r--python/fatcat_web/templates/release_edit.html4
-rw-r--r--python/fatcat_web/templates/release_view.html56
3 files changed, 33 insertions, 33 deletions
diff --git a/python/fatcat_web/templates/entity_macros.html b/python/fatcat_web/templates/entity_macros.html
index cefb0378..d1bf86c3 100644
--- a/python/fatcat_web/templates/entity_macros.html
+++ b/python/fatcat_web/templates/entity_macros.html
@@ -60,12 +60,12 @@
{% if release.release_date %}{{ release.release_date }}{% elif release.release_year %}{{ release.release_year }}{% else %}<i>unknown</i>{% endif %}
<td class="">
<b><a href="/release/{{ release.ident }}">{{ release.title }}</a></b>
- <br><small>{{ release.release_status or "unknown status" }}
+ <br><small>{{ release.release_stage or "unknown status" }}
| {{ release.release_type or "unknown type" }}
{% if release.license_slug %} | {{ release.license_slug }}{% endif %}
</small>
- {% if release.doi %}
- <br><a href="https://doi.org/{{ release.doi }}" style="color:green;">doi:{{ release.doi }}</a>
+ {% if release.ext_ids.doi %}
+ <br><a href="https://doi.org/{{ release.ext_ids.doi }}" style="color:green;">doi:{{ release.ext_ids.doi }}</a>
{% endif %}
{% endfor %}
</tbody>
diff --git a/python/fatcat_web/templates/release_edit.html b/python/fatcat_web/templates/release_edit.html
index 7bd4a00a..b3beec2b 100644
--- a/python/fatcat_web/templates/release_edit.html
+++ b/python/fatcat_web/templates/release_edit.html
@@ -20,7 +20,7 @@
<div class="twelve wide column" style="padding-bottom: 0px;">
<div class="ui equal width fields">
{{ edit_macros.form_field_basic(form.release_type, "required") }}
- {{ edit_macros.form_field_basic(form.release_status) }}
+ {{ edit_macros.form_field_basic(form.release_stage) }}
</div>
</div>
<div class="one wide column" style="padding-bottom: 0px;"></div>
@@ -133,7 +133,7 @@ $(document).ready(function() {
// these javascript dropdowns hide the original <input>, which breaks browser
// form focusing (eg, for required fields) :(
//$('#release_type').dropdown();
- //$('#release_status').dropdown();
+ //$('#release_stage').dropdown();
$('.ui.accordion').accordion();
var fixup_contrib_numbering = function(group_item) {
diff --git a/python/fatcat_web/templates/release_view.html b/python/fatcat_web/templates/release_view.html
index 403af653..820c2797 100644
--- a/python/fatcat_web/templates/release_view.html
+++ b/python/fatcat_web/templates/release_view.html
@@ -55,13 +55,13 @@
<meta name="DC.citation.spage" content="{{ release.pages }}">
<meta name="citation_first_page" content="{{ release.pages }}">
{% endif %}
- {% if release.doi %}
- <meta name="DC.identifier" content="doi:{{ release.doi }}">
- <meta name="citation_doi" content="{{ release.doi }}">
+ {% if release.ext_ids.doi %}
+ <meta name="DC.identifier" content="doi:{{ release.ext_ids.doi }}">
+ <meta name="citation_doi" content="{{ release.ext_ids.doi }}">
{% endif %}
- {% if release.isbn13 %}
- <meta name="DC.identifier" content="isbn:{{ release.isbn13}}">
- <meta name="citation_isbn" content="{{ release.isbn13}}">
+ {% if release.ext_ids.isbn13 %}
+ <meta name="DC.identifier" content="isbn:{{ release.ext_ids.isbn13}}">
+ <meta name="citation_isbn" content="{{ release.ext_ids.isbn13}}">
{% endif %}
{% for file in (entity.files or [])[:10] %}{% for url in (file.urls or [])[:10] %}
{% if '//web.archive.org/web/' in url.url %}
@@ -101,7 +101,7 @@
<div class="ui accordion">
<div class="title" itemprop="isPartOf" itemscope itemtype="http://schema.org/Periodical" itemid="#container">
- {% if release.release_status == 'published' %}
+ {% if release.release_stage == 'published' %}
<i class="dropdown icon"></i>Published in <a href="/container/{{ container.ident }}"><span itemprop="name">{{ container.name }}</span></a>
{% else %}
<i class="dropdown icon"></i>Released as a <i>{{ release.release_type }}</i>
@@ -323,13 +323,13 @@
<span class="ui top attached fluid huge grey button"><i class="file cross icon"></i>No Full Text Available</span>
{% endif %}
-{% if release.release_type or release.release_status or release.release_year %}
+{% if release.release_type or release.release_stage or release.release_year %}
<div class="ui segment attached">
{% if release.release_type %}
<b>Type</b> &nbsp;<code>{{ release.release_type }}</code><br>
{% endif %}
- {% if release.release_status %}
- <b>Status</b> &nbsp; <code>{{ release.release_status or 'unknown' }}</code><br>
+ {% if release.release_stage %}
+ <b>Status</b> &nbsp; <code>{{ release.release_stage or 'unknown' }}</code><br>
{% endif %}
{% if release.release_date %}
<meta itemprop="datePublished" content="{{ release.release_date }}">
@@ -341,22 +341,22 @@
</div>
{% endif %}
-{% if release.doi or release.pmid or release.pmcid or release.wikidata_qid %}
+{% if release.ext_ids.doi or release.ext_ids.pmid or release.ext_ids.pmcid or release.ext_ids.wikidata_qid %}
<div class="ui segment attached" style="word-wrap: break-word;">
-{% if release.doi %}
- <b>DOI </b> &nbsp;<a href="https://doi.org/{{ release.doi }}" title="{{ release.doi }}" itemprop="sameAs">{{ release.doi }}</a><br>
+{% if release.ext_ids.doi %}
+ <b>DOI </b> &nbsp;<a href="https://doi.org/{{ release.ext_ids.doi }}" title="{{ release.ext_ids.doi }}" itemprop="sameAs">{{ release.ext_ids.doi }}</a><br>
{% endif %}
-{% if release.pmid != None %}
- <b>PubMed</b> <a href="https://www.ncbi.nlm.nih.gov/pubmed/{{ release.pmid }}">&nbsp;<code>{{ release.pmid }}</code></a><br>
+{% if release.ext_ids.pmid != None %}
+ <b>PubMed</b> <a href="https://www.ncbi.nlm.nih.gov/pubmed/{{ release.ext_ids.pmid }}">&nbsp;<code>{{ release.ext_ids.pmid }}</code></a><br>
{% endif %}
-{% if release.pmcid != None %}
- <b>PMC</b> <a href="https://www.ncbi.nlm.nih.gov/pmc/articles/{{ release.pmcid }}">&nbsp;<code>{{ release.pmcid }}</code></a><br>
+{% if release.ext_ids.pmcid != None %}
+ <b>PMC</b> <a href="https://www.ncbi.nlm.nih.gov/pmc/articles/{{ release.ext_ids.pmcid }}">&nbsp;<code>{{ release.ext_ids.pmcid }}</code></a><br>
{% endif %}
-{% if release.wikidata_qid != None %}
- <b>Wikidata</b> <a href="https://www.wikidata.org/wiki/{{ release.wikidata_qid }}">&nbsp;<code>{{ release.wikidata_qid }}</code></a><br>
+{% if release.ext_ids.wikidata_qid != None %}
+ <b>Wikidata</b> <a href="https://www.wikidata.org/wiki/{{ release.ext_ids.wikidata_qid }}">&nbsp;<code>{{ release.ext_ids.wikidata_qid }}</code></a><br>
{% endif %}
-{% if release.isbn13 != None %}
- <b>ISBN-13 </b> &nbsp;<code>{{ release.isbn13 }}</code>
+{% if release.ext_ids.isbn13 != None %}
+ <b>ISBN-13 </b> &nbsp;<code>{{ release.ext_ids.isbn13 }}</code>
{% endif %}
</div>
{% endif %}
@@ -429,17 +429,17 @@
{% if container != None and container.issnl != None %}
<a href="http://www.sherpa.ac.uk/romeo/issn/{{ container.issnl }}/">SHERPA/RoMEO</a> (journal policies)<br/>
{% endif %}
- {% if container != None and container.doi != None %}
- <a href="https://oadoi.org/{{ release.doi }}">oaDOI/unpaywall</a><br/>
+ {% if release != None and release.ext_ids.doi != None %}
+ <a href="https://oadoi.org/{{ release.ext_ids.doi }}">oaDOI/unpaywall</a><br/>
{% endif %}
- {% if release.isbn13 != None %}
- <a href="https://openlibrary.org/search?isbn={{ release.isbn13 }}">Open Library</a><br>
- <a href="http://www.worldcat.org/search?q=bn%3A{{ release.isbn13 }}">Worldcat</a><br>
+ {% if release.ext_ids.isbn13 != None %}
+ <a href="https://openlibrary.org/search?isbn={{ release.ext_ids.isbn13 }}">Open Library</a><br>
+ <a href="http://www.worldcat.org/search?q=bn%3A{{ release.ext_ids.isbn13 }}">Worldcat</a><br>
{% else %}
<a href="http://www.worldcat.org/search?qt=worldcat_org_art&q={{ release.title|urlencode }}">Worldcat</a><br>
{% endif %}
- {% if release.doi %}
- <a href="https://api.crossref.org/v1/works/http://dx.doi.org/{{ release.doi }}">Crossref Metadata</a> (via API)<br>
+ {% if release.ext_ids.doi %}
+ <a href="https://api.crossref.org/v1/works/http://dx.doi.org/{{ release.ext_ids.doi }}">Crossref Metadata</a> (via API)<br>
{% endif %}
<a href="https://www.wikidata.org/w/index.php?search={{ release.title|urlencode }}">wikidata.org</a><br>
<a href="https://core.ac.uk/search?q={{ release.title|urlencode }}">CORE.ac.uk</a><br>