aboutsummaryrefslogtreecommitdiffstats
path: root/mediagoblin/templates
diff options
context:
space:
mode:
authortilly-Q <nattilypigeonfowl@gmail.com>2014-05-12 13:07:11 -0400
committertilly-Q <nattilypigeonfowl@gmail.com>2014-05-12 13:13:46 -0400
commit6b6b1b076bf0f2104dacdfa0f351555bcb6c98d6 (patch)
tree67555538f99764ebd690b9800d267cddea35d014 /mediagoblin/templates
parent7bcb3e100c38270342da8a84e63f5350f9c71f05 (diff)
downloadmediagoblin-6b6b1b076bf0f2104dacdfa0f351555bcb6c98d6.tar.lz
mediagoblin-6b6b1b076bf0f2104dacdfa0f351555bcb6c98d6.tar.xz
mediagoblin-6b6b1b076bf0f2104dacdfa0f351555bcb6c98d6.zip
Made some changes so that the metadata editing page works well with the updated
metadata tools.
Diffstat (limited to 'mediagoblin/templates')
-rw-r--r--mediagoblin/templates/mediagoblin/edit/metadata.html23
-rw-r--r--mediagoblin/templates/mediagoblin/utils/metadata_table.html11
2 files changed, 4 insertions, 30 deletions
diff --git a/mediagoblin/templates/mediagoblin/edit/metadata.html b/mediagoblin/templates/mediagoblin/edit/metadata.html
index d5d1fec5..b5a52e5f 100644
--- a/mediagoblin/templates/mediagoblin/edit/metadata.html
+++ b/mediagoblin/templates/mediagoblin/edit/metadata.html
@@ -49,7 +49,6 @@
}
$(document).ready(function(){
- var context_lines = {{ form.context | length }};
var metadata_lines = {{ form.media_metadata | length }};
$("#add_new_metadata_row").click(function(){
add_new_row("#metadata_list",
@@ -57,14 +56,8 @@
'media_metadata-');
metadata_lines += 1;
})
- $("#add_new_context_row").click(function(){
- add_new_row("#context_list",
- context_lines,
- 'context-');
- context_lines += 1;
})
$("#clear_empty_rows").click(function(){
- clear_empty_rows("#context_list");
clear_empty_rows("#metadata_list");
})
})
@@ -74,22 +67,6 @@
<h2>{% trans media_name=media.title -%}
Metadata for "{{ media_name }}"{% endtrans %}</h2>
<form action="" method="POST" id="metadata_form">
-<!-- This table holds all the information about the metadata's context.
- visit http:/wwww.json-ld.org for more information. -->
- <h3>{% trans %}Context{% endtrans %}</h3>
- <table class="metadata_editor" id="context_list">
- {{ wtforms_util.render_fieldlist_as_table_rows(form.context) }}
- </table>
-
- <table class="metadata_editor" id="buttons_top">
- <tr>
- <th></th>
- <td><input type=button value="{% trans %}Add new Row{% endtrans %}"
- class="button_action" id="add_new_context_row" /></td>
- <th></th>
- <td></td>
- </tr>
- </table>
<!-- This table holds all the information about the media entry's metadata -->
<h3>{% trans %}Data{% endtrans %}</h3>
diff --git a/mediagoblin/templates/mediagoblin/utils/metadata_table.html b/mediagoblin/templates/mediagoblin/utils/metadata_table.html
index 0c67264a..b4c37dbd 100644
--- a/mediagoblin/templates/mediagoblin/utils/metadata_table.html
+++ b/mediagoblin/templates/mediagoblin/utils/metadata_table.html
@@ -20,16 +20,13 @@
{%- set metadata=media_entry.media_metadata %}
{%- set metadata_context=metadata['@context'] %}
{%- if metadata %}
- <table prefix="{% for p in metadata_context %}{% if not loop.first %}
- {% endif %}{{ p }} {{ metadata_context[p] }}{% endfor -%}">
- {%- for key, value_dict in metadata.iteritems() if not key=='@context' %}
- {% if value_dict['@value'] -%}
+ <table context="{{ metadata_context }}">
+ {%- for key, value in metadata.iteritems() if not key=='@context' %}
<tr>
<td>{{ format_predicate(key) }}</td>
- <td property="{{ key }}" typeof="{{ value_dict['@type'] }}">
- {{ value_dict['@value'] }}</td>
+ <td property="{{ key }}" typeof="{{ value }}">
+ {{ value }}</td>
</tr>
- {%- endif -%}
{%- endfor %}
</table>
{% endif %}