correct document_part template

populat_orgs
Castro0o 5 years ago
parent 0d9ed8a2d4
commit 5ba753199b

@ -12,33 +12,20 @@
<div class="metadata">
<h3>Metadata</h3>
{% for key, valuelist in printout_dict.items() %}
{% if key == 'Date' %}
<div class="metadata_{{key}}">
<span class="key">{{key}}</span>
<span class="value">{{valuelist.year}} {{valuelist.month}} {{valuelist.day}}</span>
{# Note: in Date valuelist is not a list but a dateitme object #}
</div>
<div class="metadata_{{key}}">
{% if key == 'Date' %}
<span class="key">{{key}}</span>
<span class="value">{{valuelist.year}} {{valuelist.month}} {{valuelist.day}}</span>
{% elif key == 'page' %}
<span class="key">{{key|upper}}</span>
<span class="key">{{valuelist}}</span>
<span class="value">{{valuelist}}</span>
{% else %}
{% if valuelist|length > 0 %}
<span class="key">{{key|upper}}</span>
{% for val in valuelist %}
<span class="key">{{key|upper}}</span>
{% endfor %}
<span class="value">{{valuelist | join(", ")}}</span>
{% endif %}
</div>
{# TODO: resolve all these metadata items #}
{% endif %}
</div>
{% endfor %}
</div>
</div>

Loading…
Cancel
Save