correct document_part template

populat_orgs
Castro0o 5 years ago
parent 0d9ed8a2d4
commit 5ba753199b

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

Loading…
Cancel
Save