Made the metadata table look pretty

This commit is contained in:
tilly-Q 2014-05-12 14:27:26 -04:00
parent 7d52eb7705
commit 9ceea31c5b
2 changed files with 24 additions and 4 deletions

View File

@ -610,6 +610,24 @@ a img.media_image {
cursor: zoom-in; cursor: zoom-in;
} }
table.metadata_info {
font-size:85%;
margin-left:10px;
}
table.metadata_info tr.highlight {
color:#f7f7f7;
}
table.metadata_info th {
font-weight: bold;
border-spacing: 10px;
text-align: left;
}
table.metadata_info td {
padding: 4px 8px;
}
/* icons */ /* icons */
img.media_icon { img.media_icon {

View File

@ -20,10 +20,12 @@
{%- set metadata=media_entry.media_metadata %} {%- set metadata=media_entry.media_metadata %}
{%- set metadata_context=metadata['@context'] %} {%- set metadata_context=metadata['@context'] %}
{%- if metadata %} {%- if metadata %}
<table context="{{ metadata_context }}"> <h3>{% trans %}Metadata Information{% endtrans %}</h3>
{%- for key, value in metadata.iteritems() if not key=='@context' %} <table context="{{ metadata_context }}" class="metadata_info">
<tr> {%- for key, value in metadata.iteritems() if (
<td>{{ format_predicate(key) }}</td> not key=='@context' and value) %}
<tr {% if loop.index%2 == 1 %}class="highlight"{% endif %}>
<th>{{ format_predicate(key) }}</th>
<td property="{{ key }}" typeof="{{ value }}"> <td property="{{ key }}" typeof="{{ value }}">
{{ value }}</td> {{ value }}</td>
</tr> </tr>