summaryrefslogtreecommitdiffstats
path: root/python/fatcat_web/templates
diff options
context:
space:
mode:
authorBryan Newbold <bnewbold@robocracy.org>2018-12-24 15:17:25 -0800
committerBryan Newbold <bnewbold@robocracy.org>2018-12-24 15:17:25 -0800
commit24ab203a00354f768fc48e0786b21de4afcd9c4a (patch)
tree7c5305dafc110fb58e0ab323ba8b58c1f61914ba /python/fatcat_web/templates
parentd7a4e4649e1da2c02ec8472173c79f7c708ce19b (diff)
downloadfatcat-24ab203a00354f768fc48e0786b21de4afcd9c4a.tar.gz
fatcat-24ab203a00354f768fc48e0786b21de4afcd9c4a.zip
implement release_year (and rustfmt)
Diffstat (limited to 'python/fatcat_web/templates')
-rw-r--r--python/fatcat_web/templates/creator_view.html5
-rw-r--r--python/fatcat_web/templates/release_search.html4
-rw-r--r--python/fatcat_web/templates/release_view.html6
-rw-r--r--python/fatcat_web/templates/work_view.html4
4 files changed, 13 insertions, 6 deletions
diff --git a/python/fatcat_web/templates/creator_view.html b/python/fatcat_web/templates/creator_view.html
index 2ce01fb6..802ca4c9 100644
--- a/python/fatcat_web/templates/creator_view.html
+++ b/python/fatcat_web/templates/creator_view.html
@@ -34,8 +34,9 @@
<p>This creator has contributed to:
<ul>
{% for release in releases %}
- <li>"{{ release.title }}", a {{ release.release_type }} published {{ release.release_date }}
- {% if release.release_status != None %}(status: <code>{{ release.release_status }})</code>{% endif %}.
+ <li>"{{ release.title }}", a {{ release.release_type }}
+ {% if release.release_year != None %}published in {{ release.release_year }}{% endif %}
+ {% if release.release_status != None %}(status: <code>{{ release.release_status or "(unknown)" }})</code>{% endif %}.
<br>Fatcat ID: <a href="/release/{{ release.ident }}"><code>{{ release.ident }}</code></a>
{% endfor %}
</ul>
diff --git a/python/fatcat_web/templates/release_search.html b/python/fatcat_web/templates/release_search.html
index 18bda117..c6a6df60 100644
--- a/python/fatcat_web/templates/release_search.html
+++ b/python/fatcat_web/templates/release_search.html
@@ -31,8 +31,8 @@
{% if paper.doi %}
DOI: <a href="https://doi.org/{{paper.doi }}" style="color: green;">{{ paper.doi }}</a>
- {{ paper.release_type }}
- {% if paper.release_date %}
- - {{ paper.release_date[:4] }}
+ {% if paper.release_year %}
+ - {{ paper.release_year }}
{% endif %}
<br>
{% endif %}
diff --git a/python/fatcat_web/templates/release_view.html b/python/fatcat_web/templates/release_view.html
index 85492eba..fd86b7c9 100644
--- a/python/fatcat_web/templates/release_view.html
+++ b/python/fatcat_web/templates/release_view.html
@@ -22,7 +22,11 @@
<div class="one wide column"></div>
<div class="ten wide column" style="font-size: 16px;">
-{% if release.release_date != None %}<p><b>Date (published):</b> {{ release.release_date }}{% endif %}
+{% if release.release_date != None %}
+ <p><b>Date (published):</b> {{ release.release_date }}
+{% elif release.release_year != None %}
+ <p><b>Date (published):</b> {{ release.release_year }}
+{% endif %}
{% if release.pmid != None %}
<br><b>PubMed:</b> <a href="https://www.ncbi.nlm.nih.gov/pubmed/{{ release.pmid }}">&nbsp;<code>{{ release.pmid }}</code></a>
{% endif %}
diff --git a/python/fatcat_web/templates/work_view.html b/python/fatcat_web/templates/work_view.html
index 87120e63..c767e1ba 100644
--- a/python/fatcat_web/templates/work_view.html
+++ b/python/fatcat_web/templates/work_view.html
@@ -34,7 +34,9 @@ still reference the same underlying "work".
{% if releases != [] %}
<ul>
{% for release in releases %}
- <li>"{{ release.title }}", a {{ release.release_type }} published {{ release.release_date }} as <code>{{ release.release_status }}</code>.
+ <li>"{{ release.title }}", a {{ release.release_type }} published
+ {% if release.release_year != None %}in {{ release.release_year }}{% endif %}
+ as <code>{{ release.release_status or "(unknown)" }}</code>.
<br><a href="/release/{{ release.ident }}"><code>{{ release.ident }}</code></a>
{% endfor %}
</ul>