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-12-13 04:51:13 +05:30
{% include "detail_breadcrumb.html" %}
2009-11-18 08:28:29 +05:30
2012-05-25 18:08:09 +05:30
< 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 >
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 %} 4 cols {% endcomment %}
2009-11-18 08:28:29 +05:30
< tbody >
2012-05-26 05:11:47 +05:30
{% 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 %}
2012-05-25 07:15:16 +05:30
< form method = "post" > {% csrf_token %}
2009-11-13 11:02:33 +05:30
< tr >
2009-11-18 08:28:29 +05:30
< th colspan = "2" > Father< / th >
< th colspan = "2" > Mother< / th >
2009-11-13 11:02:33 +05:30
< / tr >
< tr >
2009-11-18 08:28:29 +05:30
< td class = "ColumnAttribute" > Name:< / td >
2012-06-07 06:19:02 +05:30
{% if user.is_authenticated or father.probably_alive %}
2012-05-25 18:08:09 +05:30
< td class = "ColumnValue" id = "data" > {% render familyform.father user action %}< / td >
2012-06-07 06:19:02 +05:30
{% else %}
< td class = "ColumnValue" id = "data" > {{family.father|render_name:user}}< / td >
{% endif %}
2009-11-18 08:28:29 +05:30
< td class = "ColumnAttribute" > Name:< / td >
2012-06-07 06:19:02 +05:30
{% if user.is_authenticated or mother.probably_alive %}
2012-05-25 18:08:09 +05:30
< td class = "ColumnValue" id = "data" > {% render familyform.mother user action %}< / td >
2012-06-07 06:19:02 +05:30
{% else %}
< td class = "ColumnValue" id = "data" > {{family.mother|render_name:user}}< / td >
{% endif %}
2009-11-13 11:02:33 +05:30
< / tr >
2012-05-25 07:15:16 +05:30
{% if user.is_authenticated or not familyform.father.probably_alive %}
2009-11-13 11:02:33 +05:30
< tr >
2009-11-18 08:28:29 +05:30
< td class = "ColumnAttribute" > Birth:< / td >
2012-05-26 05:11:47 +05:30
< td class = "ColumnValue" id = "data" > {{familyform.father.birth|date_as_text:user}}< / td >
2009-11-18 08:28:29 +05:30
< td class = "ColumnAttribute" > Birth:< / td >
2012-05-26 05:11:47 +05:30
< td class = "ColumnValue" id = "data" > {{familyform.mother.birth|date_as_text:user}}< / td >
2009-11-13 11:02:33 +05:30
< / tr >
2009-11-19 08:11:37 +05:30
{% else %}
< tr >
2012-05-25 18:08:09 +05:30
< td class = "ColumnAttribute" > Death:< / td >
2012-05-26 05:11:47 +05:30
< td class = "ColumnValue" id = "data" > {{familyform.father.death|date_as_text:user}}< / td >
2012-05-25 18:08:09 +05:30
< td class = "ColumnAttribute" > Death:< / td >
2012-05-26 05:11:47 +05:30
< td class = "ColumnValue" id = "data" > {{familyform.mother.death|date_as_text:user}}< / td >
2009-11-19 08:11:37 +05:30
< / tr >
{% endif %}
2009-11-13 11:02:33 +05:30
< tr >
2009-11-18 08:28:29 +05:30
< td class = "ColumnAttribute" > Death:< / td >
2012-05-26 05:11:47 +05:30
< td class = "ColumnValue" id = "data" > {{familyform.father.death|date_as_text:user}}< / td >
2009-11-18 08:28:29 +05:30
< td class = "ColumnAttribute" > Death:< / td >
2012-05-26 05:11:47 +05:30
< td class = "ColumnValue" id = "data" > {{familyform.mother.death|date_as_text:user}}< / 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 >
2010-01-02 07:39:09 +05:30
< table class = "infolist" >
2009-11-18 08:28:29 +05:30
< tbody >
< tr >
2010-01-02 07:39:09 +05:30
< th colspan = "4" > Relationship information< / th >
2009-11-18 08:28:29 +05:30
< / tr >
< tr >
2012-05-25 18:08:09 +05:30
< 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 >
2010-01-02 07:39:09 +05:30
< / tr >
< tr >
2012-05-25 18:08:09 +05:30
< 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 >
2009-11-18 08:28:29 +05:30
< / tr >
< / tbody >
< / table >
< / 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-16 04:17:43 +05:30
< 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-sources" > Sources< / 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 >
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-16 04:17:43 +05:30
< li class = "ui-corner-top ui-state-default" > < a href = "#tab-lds" > LDS< / 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-16 04:17:43 +05:30
< div class = "ui-tabs-panel ui-widget-content ui-corner-bottom" id = "tab-children" >
<!-- Events -->
2012-06-12 06:43:26 +05:30
{% children_table family user action "/person/$act/family/%s" family.handle %}
2009-11-16 04:17:43 +05:30
< / div >
< div class = "ui-tabs-panel ui-widget-content ui-corner-bottom ui-tabs-hide" id = "tab-events" >
2012-05-30 18:24:06 +05:30
{% event_table family user action "/event/$act/family/%s" family.handle %}
2009-11-16 04:17:43 +05:30
< / div >
< div class = "ui-tabs-panel ui-widget-content ui-corner-bottom ui-tabs-hide" id = "tab-sources" >
2012-05-30 18:24:06 +05:30
{% source_table family user action "/source/$act/family/%s" family.handle %}
2009-11-16 04:17:43 +05:30
< / div >
< div class = "ui-tabs-panel ui-widget-content ui-corner-bottom ui-tabs-hide" id = "tab-attributes" >
2012-05-27 02:26:27 +05:30
{% attribute_table family user action "/attribute/add/family/%s" family.handle %}
2009-11-16 04:17:43 +05:30
< / div >
< div class = "ui-tabs-panel ui-widget-content ui-corner-bottom ui-tabs-hide" id = "tab-notes" >
2012-05-30 18:24:06 +05:30
{% note_table family user action "/note/$act/family/%s" family.handle %}
2009-11-16 04:17:43 +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 family user action "/media/$act/family/%s" family.handle %}
2009-11-16 04:17:43 +05:30
< / div >
< div class = "ui-tabs-panel ui-widget-content ui-corner-bottom ui-tabs-hide" id = "tab-lds" >
2012-05-27 02:26:27 +05:30
{% lds_table family user action "/lds/add/family/%s" family.handle %}
2009-11-16 04:17:43 +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 family user action %}
< / div >
2009-11-13 11:02:33 +05:30
< / div >
2012-05-25 07:15:16 +05:30
{% if user.is_superuser %}
{% if action == "edit" %}
2012-06-05 07:18:39 +05:30
{% make_button "Cancel" "/family/%s" family.handle args %}
2012-05-25 07:15:16 +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-25 07:15:16 +05:30
< input type = "submit" value = "Save" / >
{% else %}
{% ifequal action "add" %}
2012-06-05 07:18:39 +05:30
{% make_button "Cancel" "/family/" args %}
2012-05-25 07:15:16 +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-25 07:15:16 +05:30
< input type = "submit" value = "Create" / >
{% else %}
2012-06-05 07:18:39 +05:30
{% 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 %}
2012-05-25 07:15:16 +05:30
{% endifequal %}
{% endif %}
{% else %}
{% endif %}
< / form >
2009-11-13 11:02:33 +05:30
{% endblock %}