summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorBryan Newbold <bnewbold@robocracy.org>2018-06-30 21:36:25 -0700
committerBryan Newbold <bnewbold@robocracy.org>2018-06-30 21:36:25 -0700
commit742c33a2958a5c444e4d90c57110b96d9f10339b (patch)
tree035881e6088af5538f4385228bf485b69c7b234e
parent983271083bd40d12766d38f6dfbf8ea3835670d4 (diff)
downloadfatcat-742c33a2958a5c444e4d90c57110b96d9f10339b.tar.gz
fatcat-742c33a2958a5c444e4d90c57110b96d9f10339b.zip
better extra json printing
-rw-r--r--python/fatcat/templates/container_view.html7
-rw-r--r--python/fatcat/templates/creator_view.html7
-rw-r--r--python/fatcat/templates/file_view.html6
-rw-r--r--python/fatcat/templates/release_view.html7
-rw-r--r--python/fatcat/templates/work_view.html6
5 files changed, 22 insertions, 11 deletions
diff --git a/python/fatcat/templates/container_view.html b/python/fatcat/templates/container_view.html
index 4aae2f0d..1b8903b2 100644
--- a/python/fatcat/templates/container_view.html
+++ b/python/fatcat/templates/container_view.html
@@ -24,9 +24,12 @@
{% if (container.extra != None) and (container.extra.url != None) %}
<p><b>Homepage:</b> <a href="{{ container.extra.url }}">&nbsp;<code>{{ container.extra.url }}</code></a>
{% endif %}
+
{% if container.extra != None %}
-<p><b>Additional Metadata (raw JSON):</b>
-&nbsp;<code>{{ container.extra }}</code>
+<h3>Extra Metadata (raw JSON)</h3>
+{% for (key, value) in container.extra.items() %}
+<code><b>{{ key }}:</b> {{ value }}</code><br>
+{% endfor %}
{% endif %}
<!--
diff --git a/python/fatcat/templates/creator_view.html b/python/fatcat/templates/creator_view.html
index 97708863..67d5e67b 100644
--- a/python/fatcat/templates/creator_view.html
+++ b/python/fatcat/templates/creator_view.html
@@ -15,9 +15,12 @@
<p><b>Given ("first") name:</b> {{ creator.given_name}}
<p><b>Sur ("family"/"last") name:</b> {{ creator.surname }}
+
{% if creator.extra != None %}
-<p><b>Additional Metadata (raw JSON):</b>
-&nbsp;<code>{{ creator.extra }}</code>
+<h3>Extra Metadata (raw JSON)</h3>
+{% for (key, value) in creator.extra.items() %}
+<code><b>{{ key }}:</b> {{ value }}</code><br>
+{% endfor %}
{% endif %}
<br>
diff --git a/python/fatcat/templates/file_view.html b/python/fatcat/templates/file_view.html
index 7f6cc143..e42d7d75 100644
--- a/python/fatcat/templates/file_view.html
+++ b/python/fatcat/templates/file_view.html
@@ -14,8 +14,10 @@
<div class="ten wide column">
{% if file.extra != None %}
-<p><b>Additional Metadata (raw JSON):</b>
-<code>{{ file.extra }}</code>
+<h3>Extra Metadata (raw JSON)</h3>
+{% for (key, value) in file.extra.items() %}
+<code><b>{{ key }}:</b> {{ value }}</code><br>
+{% endfor %}
{% endif %}
<h3>Releases</h3>
diff --git a/python/fatcat/templates/release_view.html b/python/fatcat/templates/release_view.html
index 14889244..07c03a30 100644
--- a/python/fatcat/templates/release_view.html
+++ b/python/fatcat/templates/release_view.html
@@ -54,10 +54,11 @@ linked to the same work.
</div>
{% endif %}
-
{% if release.extra != None %}
-<p><b>Additional Metadata (raw JSON):</b>
-<code>{{ release.extra }}</code>
+<h3>Extra Metadata (raw JSON)</h3>
+{% for (key, value) in release.extra.items() %}
+<code><b>{{ key }}:</b> {{ value }}</code><br>
+{% endfor %}
{% endif %}
<!--
diff --git a/python/fatcat/templates/work_view.html b/python/fatcat/templates/work_view.html
index 6fe900bf..9225e8a4 100644
--- a/python/fatcat/templates/work_view.html
+++ b/python/fatcat/templates/work_view.html
@@ -14,8 +14,10 @@
<div class="ten wide column">
{% if work.extra != None %}
-<p><b>Additional Metadata (raw JSON):</b>
-&nbsp;<code>{{ work.extra }}</code>
+<h3>Extra Metadata (raw JSON)</h3>
+{% for (key, value) in work.extra.items() %}
+<code><b>{{ key }}:</b> {{ value }}</code><br>
+{% endfor %}
{% endif %}
<!--