From eb1c59c6b234938d7ee1cbfe77b8bd6e19ab8515 Mon Sep 17 00:00:00 2001 From: Bryan Newbold Date: Sat, 2 Mar 2019 16:07:10 -0800 Subject: macro-ify more entity view; fix release lists --- python/fatcat_web/templates/work_view.html | 35 +++++------------------------- 1 file changed, 5 insertions(+), 30 deletions(-) (limited to 'python/fatcat_web/templates/work_view.html') diff --git a/python/fatcat_web/templates/work_view.html b/python/fatcat_web/templates/work_view.html index 6a409542..7fd2bbb2 100644 --- a/python/fatcat_web/templates/work_view.html +++ b/python/fatcat_web/templates/work_view.html @@ -16,44 +16,19 @@
-{% if work.extra != None %} -

Extra Metadata (raw JSON)

-{% for (key, value) in work.extra.items() %} -{{ key }}: {{ value }}
-{% endfor %} +{% if entity.extra != None %} + {{ entity_macros.extra_metadata(entity.extra) }} {% endif %}

Releases

{% if releases != [] %} - - -{% for release in releases %} - -
- {% if release.release_date %}{{ release.release_date }}{% elif release.release_year %}{{ release.release_year }}{% endif %} - - {{ release.title }} -
{{ release.release_type or "unknown" }} - {{ release.release_status or "unknown" }} - {% if release.license_slug %} - {{ release.license_slug }}{% endif %} - {% if release.doi %} -
doi:{{ release.doi }} - {% endif %} -{% endfor %} -
+ {{ entity_macros.release_list(releases) }} {% else %}

There are no known releases associated with this work. {% endif %} -{% if work.extra %} -

Extra Metadata (raw JSON)

- - -{% for (key, value) in work.extra.items() %} - - -
{{ key }}{{ value }} -{% endfor %} -
+{% if entity.extra %} + {{ entity_macros.extra_metadata(entity.extra) }} {% endif %}

What is a "Work"?

-- cgit v1.2.3