gramps/src/data/templates/view_family_detail.html

160 lines
6.3 KiB
HTML

{% extends "view_page_detail.html" %}
{% load my_tags %}
{% block content %}
<script type="text/javascript">
$(function(){
$('#tabs').tabs({
'select': function(event, ui){
document.location.hash = ui.panel.id;
}
});
});
</script>
<div class="content" id="IndividualDetail">
{% include "detail_breadcrumb.html" %}
<h2><a href="/person/{{family.father.handle}}">{{family.father|render_name:user}}</a> and <a href="/person/{{family.mother.handle}}">{{family.mother|render_name:user}}</a></h2>
<div id="summaryarea">
<table class="infolist" style="width:90%;"> {% comment %} 4 cols {% endcomment %}
<tbody>
{% if familyform.errors %}
<hr>
<p id="error">The following fields have errors. Please correct and try again.</p>
<div id="error">{{familyform.errors}}</div>
<hr>
{% endif %}
<form method="post">{% csrf_token %}
<tr>
<th colspan="2">Father</th>
<th colspan="2">Mother</th>
</tr>
<tr>
<td class="ColumnAttribute">Name:</td>
{% if user.is_authenticated or father.probably_alive %}
<td class="ColumnValue" id="data">{% render familyform.father user action %}</td>
{% else %}
<td class="ColumnValue" id="data">{{family.father|render_name:user}}</td>
{% endif %}
<td class="ColumnAttribute">Name:</td>
{% if user.is_authenticated or family.mother.probably_alive %}
<td class="ColumnValue" id="data">{% render familyform.mother user action %}</td>
{% else %}
<td class="ColumnValue" id="data">{{family.mother|render_name:user}}</td>
{% endif %}
</tr>
{% if user.is_authenticated or not familyform.father.probably_alive %}
<tr>
<td class="ColumnAttribute">Birth:</td>
<td class="ColumnValue" id="data">{{familyform.father.birth|date_as_text:user}}</td>
<td class="ColumnAttribute">Birth:</td>
<td class="ColumnValue" id="data">{{familyform.mother.birth|date_as_text:user}}</td>
</tr>
{% else %}
<tr>
<td class="ColumnAttribute">Death:</td>
<td class="ColumnValue" id="data">{{familyform.father.death|date_as_text:user}}</td>
<td class="ColumnAttribute">Death:</td>
<td class="ColumnValue" id="data">{{familyform.mother.death|date_as_text:user}}</td>
</tr>
{% endif %}
<tr>
<td class="ColumnAttribute">Death:</td>
<td class="ColumnValue" id="data">{{familyform.father.death|date_as_text:user}}</td>
<td class="ColumnAttribute">Death:</td>
<td class="ColumnValue" id="data">{{familyform.mother.death|date_as_text:user}}</td>
</tr>
</tbody>
</table>
<table class="infolist">
<tbody>
<tr>
<th colspan="4">Relationship information</th>
</tr>
<tr>
<td class="ColumnAttribute">{{familyform.gramps_id.label}}:</td>
<td class="ColumnValue" id="data">{% render familyform.gramps_id user action %}</td>
<td class="ColumnAttribute">{{familyform.family_rel_type.label}}:</td>
<td class="ColumnValue" id="data">{% render familyform.family_rel_type user action %}</td>
</tr>
<tr>
<td class="ColumnAttribute">{{familyform.tags.label}}:</td>
<td class="ColumnValue" id="data">{% render familyform.tags user action %}</td>
<td class="ColumnAttribute">{{familyform.private.label}}:</td>
<td class="ColumnValue" id="data">{% render familyform.private user action %}</td>
</tr>
</tbody>
</table>
</div>
</div>
<!-- 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-children">Children</a></li>
<li class="ui-corner-top ui-state-default"><a href="#tab-events">Events</a></li>
<li class="ui-corner-top ui-state-default"><a href="#tab-citations">Citations</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-notes">Notes</a></li>
<li class="ui-corner-top ui-state-default"><a href="#tab-media">Media</a></li>
<li class="ui-corner-top ui-state-default"><a href="#tab-lds">LDS</a></li>
<li class="ui-corner-top ui-state-default"><a href="#tab-history">History</a></li>
</ul>
<div class="ui-tabs-panel ui-widget-content ui-corner-bottom" id="tab-children">
<!-- Events -->
{% children_table family user action "/person/$act/family/%s" family.handle %}
</div>
<div class="ui-tabs-panel ui-widget-content ui-corner-bottom ui-tabs-hide" id="tab-events">
{% event_table family user action "/event/$act/family/%s" family.handle %}
</div>
<div class="ui-tabs-panel ui-widget-content ui-corner-bottom ui-tabs-hide" id="tab-citations">
{% citation_table family user action "/citation/$act/family/%s" family.handle %}
</div>
<div class="ui-tabs-panel ui-widget-content ui-corner-bottom ui-tabs-hide" id="tab-attributes">
{% attribute_table family user action "/attribute/add/family/%s" family.handle %}
</div>
<div class="ui-tabs-panel ui-widget-content ui-corner-bottom ui-tabs-hide" id="tab-notes">
{% note_table family user action "/note/$act/family/%s" family.handle %}
</div>
<div class="ui-tabs-panel ui-widget-content ui-corner-bottom ui-tabs-hide" id="tab-media">
{% media_table family user action "/media/$act/family/%s" family.handle %}
</div>
<div class="ui-tabs-panel ui-widget-content ui-corner-bottom ui-tabs-hide" id="tab-lds">
{% lds_table family user action "/lds/add/family/%s" family.handle %}
</div>
<div class="ui-tabs-panel ui-widget-content ui-corner-bottom ui-tabs-hide" id="tab-history">
{% history_table family user action %}
</div>
</div>
{% if user.is_superuser %}
{% if action == "edit" %}
{% make_button "Cancel" "/family/%s" family.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" "/family/" 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 %}
{% make_button "Add Family" "/family/add" args %}
{% make_button "Edit Family" "/family/%s/edit" family.handle args %}
{% make_button "Delete Family" "/family/%s/delete" family.handle args %}
{% endifequal %}
{% endif %}
{% else %}
{% endif %}
</form>
{% endblock %}