diff options
author | Bryan Newbold <bnewbold@robocracy.org> | 2019-03-02 16:07:10 -0800 |
---|---|---|
committer | Bryan Newbold <bnewbold@robocracy.org> | 2019-03-02 16:07:10 -0800 |
commit | eb1c59c6b234938d7ee1cbfe77b8bd6e19ab8515 (patch) | |
tree | bc95c3544d1bcc21c7387652b7ecc34708bcd082 /python/fatcat_web/templates/work_view.html | |
parent | 3583a344b6ee390fba4baf26426e2c8eb0bf63b0 (diff) | |
download | fatcat-eb1c59c6b234938d7ee1cbfe77b8bd6e19ab8515.tar.gz fatcat-eb1c59c6b234938d7ee1cbfe77b8bd6e19ab8515.zip |
macro-ify more entity view; fix release lists
Diffstat (limited to 'python/fatcat_web/templates/work_view.html')
-rw-r--r-- | python/fatcat_web/templates/work_view.html | 35 |
1 files changed, 5 insertions, 30 deletions
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 @@ <div class="one wide column"></div> <div class="ten wide column" style="font-size: 16px;"> -{% if work.extra != None %} -<h3>Extra Metadata (raw JSON)</h3> -{% for (key, value) in work.extra.items() %} -<code><b>{{ key }}:</b> {{ value }}</code><br> -{% endfor %} +{% if entity.extra != None %} + {{ entity_macros.extra_metadata(entity.extra) }} {% endif %} <h3>Releases</h3> {% if releases != [] %} -<table class="ui very basic celled table"> -<tbody> -{% for release in releases %} - <tr><td class="two wide center aligned"> - {% if release.release_date %}{{ release.release_date }}{% elif release.release_year %}{{ release.release_year }}{% endif %} - <td class="five wide single line"> - <b><a href="/release/{{ release.ident }}">{{ release.title }}</a></b> - <br>{{ release.release_type or "unknown" }} - {{ release.release_status or "unknown" }} - {% if release.license_slug %} - {{ release.license_slug }}{% endif %} - {% if release.doi %} - <br><a href="https://doi.org/{{ release.doi }}" style="color:green;">doi:{{ release.doi }}</a> - {% endif %} -{% endfor %} -</tbody> -</table> + {{ entity_macros.release_list(releases) }} {% else %} <p>There are no known releases associated with this work. {% endif %} -{% if work.extra %} -<h3>Extra Metadata (raw JSON)</h3> -<table class="ui definition single line fixed compact small unstackable table"> -<tbody> -{% for (key, value) in work.extra.items() %} - <tr><td class="three wide right aligned"><code>{{ key }}</code></td> - <td class="seven wide"><code>{{ value }}</code> -{% endfor %} -</tbody> -</table> +{% if entity.extra %} + {{ entity_macros.extra_metadata(entity.extra) }} {% endif %} <h3>What is a "Work"?</h3> |