2009-11-13 11:02:33 +05:30
|
|
|
{% extends "view_page_detail.html" %}
|
|
|
|
{% load my_tags %}
|
|
|
|
|
|
|
|
{% block content %}
|
|
|
|
|
|
|
|
<script type="text/javascript">
|
2012-05-31 03:09:01 +05:30
|
|
|
$(function(){
|
|
|
|
$('#tabs').tabs({
|
|
|
|
'select': function(event, ui){
|
2012-05-31 05:03:44 +05:30
|
|
|
document.location.hash = ui.panel.id;
|
|
|
|
}
|
2012-05-31 03:09:01 +05:30
|
|
|
});
|
|
|
|
});
|
2009-11-13 11:02:33 +05:30
|
|
|
</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" %}
|
2011-10-16 22:30:32 +05:30
|
|
|
|
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 %}
|
2009-11-13 11:02:33 +05:30
|
|
|
<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>
|
2012-06-19 04:02:22 +05:30
|
|
|
<td rowspan="5">{% media_link media.handle user action %}</td>
|
2009-11-13 11:02:33 +05:30
|
|
|
</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>
|
2009-11-13 11:02:33 +05:30
|
|
|
</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>
|
2009-11-13 11:02:33 +05:30
|
|
|
</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>
|
2009-11-13 11:02:33 +05:30
|
|
|
</tr>
|
|
|
|
</table>
|
|
|
|
|
2013-12-03 08:21:01 +05:30
|
|
|
{% if user.is_superuser %}
|
|
|
|
{% if action == "edit" %}
|
|
|
|
{% make_button "Cancel" "/media/%s" media.handle args %}
|
|
|
|
<input type="hidden" name="action" value="save"/>
|
|
|
|
<input type="hidden" name="search" value="{{search}}"/>
|
|
|
|
<input type="hidden" name="page" value="{{page}}"/>
|
|
|
|
<input type="submit" value="Save"/>
|
|
|
|
{% else %}
|
|
|
|
{% ifequal action "add" %}
|
|
|
|
{% make_button "Cancel" "/media/" args %}
|
|
|
|
<input type="hidden" name="action" value="create"/>
|
|
|
|
<input type="hidden" name="search" value="{{search}}"/>
|
|
|
|
<input type="hidden" name="page" value="{{page}}"/>
|
|
|
|
<input type="submit" value="Create"/>
|
|
|
|
{% else %}
|
|
|
|
<div style="background-color: lightgray; padding: 2px 0px 0px 2px; clear: both;">
|
|
|
|
{% make_button "+Add Media" "/media/add" args %}
|
|
|
|
{% make_button "?Edit Media" "/media/%s/edit" media.handle args %}
|
|
|
|
{% make_button "-Delete Media" "/media/%s/delete" media.handle args %}
|
|
|
|
</div>
|
|
|
|
{% endifequal %}
|
|
|
|
{% endif %}
|
|
|
|
{% else %}
|
|
|
|
{% endif %}
|
|
|
|
|
2009-11-13 11:02:33 +05:30
|
|
|
<!-- Tabs -->
|
|
|
|
|
2012-07-25 06:17:09 +05:30
|
|
|
<div class="ui-tabs ui-widget ui-widget-content ui-corner-all" id="tabs" style="border: none;">
|
2009-11-13 11:02:33 +05:30
|
|
|
<ul class="ui-tabs-nav ui-helper-reset ui-helper-clearfix ui-widget-header ui-corner-all">
|
2012-07-27 20:37:36 +05:30
|
|
|
<li class="ui-state-default ui-corner-top ui-tabs-selected ui-state-active"><a class="tab-sources" href="#tab-sources" style=":hover {color: black;}">Citation</a></li>
|
|
|
|
<li class="ui-corner-top ui-state-default"><a class="tab-attributes" href="#tab-attributes">Attribute</a></li>
|
|
|
|
<li class="ui-corner-top ui-state-default"><a class="tab-notes" href="#tab-notes">Note</a></li>
|
|
|
|
<li class="ui-corner-top ui-state-default"><a class="tab-references" href="#tab-references">Reference</a></li>
|
|
|
|
<li class="ui-corner-top ui-state-default"><a class="tab-history" href="#tab-history">History</a></li>
|
2009-11-13 11:02:33 +05:30
|
|
|
</ul>
|
2012-07-25 06:17:09 +05:30
|
|
|
<div class="ui-tabs-panel ui-widget-content ui-corner-bottom ui-tabs-hide" id="tab-sources" style="background-color: #f4f0ec;">
|
2012-05-31 02:35:38 +05:30
|
|
|
{% citation_table media user action "/citation/$act/media/%s" media.handle %}
|
2012-05-26 10:02:48 +05:30
|
|
|
</div>
|
2012-07-25 06:17:09 +05:30
|
|
|
<div class="ui-tabs-panel ui-widget-content ui-corner-bottom ui-tabs-hide" id="tab-notes" style="background-color: #f4f0ec;">
|
2012-05-31 02:35:38 +05:30
|
|
|
{% note_table media user action "/note/$act/media/%s" media.handle %}
|
2012-05-30 21:24:51 +05:30
|
|
|
</div>
|
2012-07-25 06:17:09 +05:30
|
|
|
<div class="ui-tabs-panel ui-widget-content ui-corner-bottom ui-tabs-hide" id="tab-attributes" style="background-color: #f4f0ec;">
|
2012-05-31 02:35:38 +05:30
|
|
|
{% attribute_table media user action "/attribute/add/media/%s" media.handle %}
|
2012-05-30 21:24:51 +05:30
|
|
|
</div>
|
2012-07-25 06:17:09 +05:30
|
|
|
<div class="ui-tabs-panel ui-widget-content ui-corner-bottom" id="tab-references" style="background-color: #f4f0ec;">
|
2012-05-30 21:24:51 +05:30
|
|
|
{% media_reference_table media user action %}
|
2012-05-26 10:02:48 +05:30
|
|
|
</div>
|
2012-07-25 06:17:09 +05:30
|
|
|
<div class="ui-tabs-panel ui-widget-content ui-corner-bottom ui-tabs-hide" id="tab-history" style="background-color: #f4f0ec;">
|
2012-06-20 08:04:15 +05:30
|
|
|
{% history_table media user action %}
|
|
|
|
</div>
|
2009-11-13 11:02:33 +05:30
|
|
|
</div>
|
|
|
|
|
2012-05-26 10:02:48 +05:30
|
|
|
</form>
|
2009-11-13 11:02:33 +05:30
|
|
|
{% endblock %}
|
|
|
|
|