gramps/src/data/templates/view_media_detail.html

99 lines
3.5 KiB
HTML
Raw Normal View History

{% extends "view_page_detail.html" %}
{% load my_tags %}
{% block content %}
<script type="text/javascript">
$(function(){
$('#tabs').tabs();
});
</script>
2012-05-26 10:02:48 +05:30
<div class="content" id="IndividualDetail">
2011-12-13 04:51:13 +05:30
{% include "detail_breadcrumb.html" %}
2012-05-26 10:02:48 +05:30
<div id="summaryarea">
<table class="infolist" style="width:90%;">
<tbody>
{% if mediaform.errors %}
<hr>
<p id="error">The following fields have errors. Please correct and try again.</p>
<div id="error">{{mediaform.errors}}</div>
<hr>
{% endif %}
<form method="post">{% csrf_token %}
<tr>
2012-05-26 10:02:48 +05:30
<td class="ColumnAttribute">{{mediaform.desc.label}}:</td>
<td class="ColumnValue" id="data" colspan="3">{% render mediaform.desc user action %}</td>
</tr>
<tr>
2012-05-26 10:02:48 +05:30
<td class="ColumnAttribute">{{mediaform.gramps_id.label}}:</td>
<td class="ColumnValue" id="data">{% render mediaform.gramps_id user action %}</td>
<td class="ColumnAttribute">{{mediaform.private.label}}:</td>
<td class="ColumnValue" id="data">{% render mediaform.private user action %}</td>
</tr>
<tr>
2012-05-26 10:02:48 +05:30
<td class="ColumnAttribute">{{mediaform.text.label}}:</td>
<td class="ColumnValue" id="data" colspan="3">{% render mediaform.text user action %}</td>
</tr>
<tr>
2012-05-26 10:02:48 +05:30
<td class="ColumnAttribute">{{mediaform.path.label}}:</td>
<td class="ColumnValue" id="data" colspan="3">{% render mediaform.path user action %}</td>
</tr>
<tr>
<td class="ColumnAttribute">{{mediaform.tags.label}}:</td>
<td class="ColumnValue" id="data" colspan="3">{% render mediaform.tags user action %}</td>
</tr>
</table>
<!-- Tabs -->
<div class="ui-tabs ui-widget ui-widget-content ui-corner-all" id="tabs">
<ul class="ui-tabs-nav ui-helper-reset ui-helper-clearfix ui-widget-header ui-corner-all">
<li class="ui-state-default ui-corner-top ui-tabs-selected ui-state-active"><a href="#tab-sources" style=":hover {color: black;}">Sources</a></li>
<li class="ui-corner-top ui-state-default"><a href="#tab-notes">Notes</a></li>
<li class="ui-corner-top ui-state-default"><a href="#tab-gallery">Gallery</a></li>
<li class="ui-corner-top ui-state-default"><a href="#tab-attributes">Attributes</a></li>
<li class="ui-corner-top ui-state-default"><a href="#tab-references">References</a></li>
</ul>
<div class="ui-tabs-panel ui-widget-content ui-corner-bottom ui-tabs-hide" id="tab-sources">
2012-05-26 10:02:48 +05:30
</div>
<div class="ui-tabs-panel ui-widget-content ui-corner-bottom ui-tabs-hide" id="tab-notes">
2012-05-26 10:02:48 +05:30
</div>
<div class="ui-tabs-panel ui-widget-content ui-corner-bottom ui-tabs-hide" id="tab-gallery">
</div>
<div class="ui-tabs-panel ui-widget-content ui-corner-bottom ui-tabs-hide" id="tab-attributes">
</div>
<div class="ui-tabs-panel ui-widget-content ui-corner-bottom" id="tab-references">
{% media_reference_table media user action %}
2012-05-26 10:02:48 +05:30
</div>
</div>
2012-05-26 10:02:48 +05:30
{% if user.is_superuser %}
{% if action == "edit" %}
{% make_button "Back to Media" "/media/%s" media.handle %}
<input type="hidden" name="action" value="save"/>
<input type="submit" value="Save"/>
{% else %}
{% ifequal action "add" %}
{% make_button "Cancel" "/media/" %}
<input type="hidden" name="action" value="create"/>
<input type="submit" value="Create"/>
{% else %}
{% make_button "Back to Media" "/media" %}
{% make_button "Add Media" "/media/add" %}
{% make_button "Edit Media" "/media/%s/edit" media.handle %}
{% make_button "Delete Media" "/media/%s/delete" media.handle %}
{% endifequal %}
{% endif %}
{% else %}
{% endif %}
</form>
{% endblock %}