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>
|
|
|
|
|
2009-11-18 08:28:29 +05:30
|
|
|
<div class="content" id="IndividualDetail">
|
2011-10-16 22:30:32 +05:30
|
|
|
|
2011-12-13 04:51:13 +05:30
|
|
|
{% include "detail_breadcrumb.html" %}
|
2011-10-16 22:30:32 +05:30
|
|
|
|
2009-11-23 08:04:35 +05:30
|
|
|
<h3>{{source.title|escape}}</h3>
|
2009-11-18 08:28:29 +05:30
|
|
|
<div id="summaryarea">
|
2012-05-17 17:26:59 +05:30
|
|
|
<table class="infolist" style="width:90%;"> {% comment %} 2 cols {% endcomment %}
|
2009-11-18 08:28:29 +05:30
|
|
|
<tbody>
|
2012-05-27 00:18:20 +05:30
|
|
|
{% if sourceform.errors %}
|
|
|
|
<hr>
|
|
|
|
<p id="error">The following fields have errors. Please correct and try again.</p>
|
|
|
|
<div id="error">{{sourceform.errors}}</div>
|
|
|
|
<hr>
|
|
|
|
{% endif %}
|
|
|
|
<form method="post">{% csrf_token %}
|
2009-11-13 11:02:33 +05:30
|
|
|
<tr>
|
2012-05-27 00:18:20 +05:30
|
|
|
<td class="ColumnAttribute">{{sourceform.title.label}}:</td>
|
|
|
|
<td class="ColumnValue" id="data">{% render sourceform.title user action %}</td>
|
2009-11-13 11:02:33 +05:30
|
|
|
</tr>
|
|
|
|
<tr>
|
2012-05-27 00:18:20 +05:30
|
|
|
<td class="ColumnAttribute">{{sourceform.gramps_id.label}}:</td>
|
|
|
|
<td class="ColumnValue" id="data">{% render sourceform.gramps_id user action %}</td>
|
2009-11-13 11:02:33 +05:30
|
|
|
</tr>
|
|
|
|
<tr>
|
2012-05-27 00:18:20 +05:30
|
|
|
<td class="ColumnAttribute">{{sourceform.abbrev.label}}:</td>
|
|
|
|
<td class="ColumnValue" id="data">{% render sourceform.abbrev user action %}</td>
|
2009-11-13 11:02:33 +05:30
|
|
|
</tr>
|
|
|
|
<tr>
|
2012-05-27 00:18:20 +05:30
|
|
|
<td class="ColumnAttribute">{{sourceform.pubinfo.label}}:</td>
|
|
|
|
<td class="ColumnValue" id="data">{% render sourceform.pubinfo user action %}</td>
|
2009-11-13 11:02:33 +05:30
|
|
|
</tr>
|
2009-11-18 08:28:29 +05:30
|
|
|
</tbody>
|
2009-11-13 11:02:33 +05:30
|
|
|
</table>
|
2009-11-18 08:28:29 +05:30
|
|
|
</div>
|
|
|
|
</div>
|
2009-11-13 11:02:33 +05:30
|
|
|
|
|
|
|
<!-- 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">
|
2009-11-23 08:04:35 +05:30
|
|
|
<li class="ui-state-default ui-corner-top ui-tabs-selected ui-state-active"><a href="#tab-notes">Notes</a></li>
|
2012-05-31 02:35:38 +05:30
|
|
|
<li class="ui-corner-top ui-state-default"><a href="#tab-media">Media</a></li>
|
2009-11-23 08:04:35 +05:30
|
|
|
<li class="ui-corner-top ui-state-default"><a href="#tab-data">Data</a></li>
|
|
|
|
<li class="ui-corner-top ui-state-default"><a href="#tab-repositories">Repositories</a></li>
|
2009-11-18 08:28:29 +05:30
|
|
|
<li class="ui-corner-top ui-state-default"><a href="#tab-references">References</a></li>
|
2012-06-20 08:04:15 +05:30
|
|
|
<li class="ui-corner-top ui-state-default"><a href="#tab-history">History</a></li>
|
2009-11-13 11:02:33 +05:30
|
|
|
</ul>
|
2009-11-23 08:04:35 +05:30
|
|
|
<div class="ui-tabs-panel ui-widget-content ui-corner-bottom" id="tab-notes">
|
2012-05-31 02:35:38 +05:30
|
|
|
{% note_table source user action "/note/$act/source/%s" source.handle %}
|
2009-11-18 08:28:29 +05:30
|
|
|
</div>
|
2012-05-31 02:35:38 +05:30
|
|
|
<div class="ui-tabs-panel ui-widget-content ui-corner-bottom ui-tabs-hide" id="tab-media">
|
|
|
|
{% media_table source user action "/media/$act/source/%s" source.handle %}
|
2009-11-18 08:28:29 +05:30
|
|
|
</div>
|
2009-11-23 08:04:35 +05:30
|
|
|
<div class="ui-tabs-panel ui-widget-content ui-corner-bottom ui-tabs-hide" id="tab-data">
|
2012-05-31 02:35:38 +05:30
|
|
|
{% data_table source user action "/data/add/source/%s" source.handle %}
|
2009-11-18 08:28:29 +05:30
|
|
|
</div>
|
2009-11-23 08:04:35 +05:30
|
|
|
<div class="ui-tabs-panel ui-widget-content ui-corner-bottom ui-tabs-hide" id="tab-repositories">
|
2012-05-31 02:35:38 +05:30
|
|
|
{% repository_table source user action "/repository/$act/source/%s" source.handle %}
|
2009-11-18 08:28:29 +05:30
|
|
|
</div>
|
|
|
|
<div class="ui-tabs-panel ui-widget-content ui-corner-bottom ui-tabs-hide" id="tab-references">
|
2012-05-31 02:35:38 +05:30
|
|
|
{% source_reference_table source user action %}
|
2009-11-18 08:28:29 +05:30
|
|
|
</div>
|
2012-06-20 08:04:15 +05:30
|
|
|
<div class="ui-tabs-panel ui-widget-content ui-corner-bottom ui-tabs-hide" id="tab-history">
|
|
|
|
{% history_table source user action %}
|
|
|
|
</div>
|
2009-11-13 11:02:33 +05:30
|
|
|
</div>
|
|
|
|
|
2012-05-27 00:18:20 +05:30
|
|
|
{% if user.is_superuser %}
|
|
|
|
{% if action == "edit" %}
|
2012-06-05 07:18:39 +05:30
|
|
|
{% make_button "Cancel" "/source/%s" source.handle args %}
|
2012-05-27 00:18:20 +05:30
|
|
|
<input type="hidden" name="action" value="save"/>
|
2012-06-05 07:18:39 +05:30
|
|
|
<input type="hidden" name="search" value="{{search}}"/>
|
|
|
|
<input type="hidden" name="page" value="{{page}}"/>
|
2012-05-27 00:18:20 +05:30
|
|
|
<input type="submit" value="Save"/>
|
|
|
|
{% else %}
|
|
|
|
{% ifequal action "add" %}
|
2012-06-05 07:18:39 +05:30
|
|
|
{% make_button "Cancel" "/source/" args %}
|
2012-05-27 00:18:20 +05:30
|
|
|
<input type="hidden" name="action" value="create"/>
|
2012-06-05 07:18:39 +05:30
|
|
|
<input type="hidden" name="search" value="{{search}}"/>
|
|
|
|
<input type="hidden" name="page" value="{{page}}"/>
|
2012-05-27 00:18:20 +05:30
|
|
|
<input type="submit" value="Create"/>
|
|
|
|
{% else %}
|
2012-06-05 07:18:39 +05:30
|
|
|
{% make_button "Add Source" "/source/add" args %}
|
|
|
|
{% make_button "Edit Source" "/source/%s/edit" source.handle args %}
|
|
|
|
{% make_button "Delete Source" "/source/%s/delete" source.handle args %}
|
2012-05-27 00:18:20 +05:30
|
|
|
{% endifequal %}
|
|
|
|
{% endif %}
|
|
|
|
{% else %}
|
|
|
|
{% endif %}
|
|
|
|
</form>
|
2009-11-13 11:02:33 +05:30
|
|
|
{% endblock %}
|