2009-11-13 05:32:33 +00:00
{% extends "view_page_detail.html" %}
{% load my_tags %}
{% block content %}
< script type = "text/javascript" >
2012-05-30 21:39:01 +00:00
$(function(){
$('#tabs').tabs({
'select': function(event, ui){
2012-05-30 23:33:44 +00:00
document.location.hash = ui.panel.id;
}
2012-05-30 21:39:01 +00:00
});
});
2009-11-13 05:32:33 +00:00
< / script >
2009-11-18 02:58:29 +00:00
< div class = "content" id = "IndividualDetail" >
2011-12-12 23:21:13 +00:00
{% include "detail_breadcrumb.html" %}
2009-11-18 02:58:29 +00:00
2012-05-25 12:38:09 +00:00
< 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 02:58:29 +00:00
< div id = "summaryarea" >
2012-05-17 11:56:59 +00:00
< table class = "infolist" style = "width:90%;" > {% comment %} 4 cols {% endcomment %}
2009-11-18 02:58:29 +00:00
< tbody >
2012-05-25 23:41:47 +00:00
{% 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-07-31 20:49:19 +00:00
< form method = "post" onsubmit = "setReturnValues()" > {% csrf_token %}
2009-11-13 05:32:33 +00:00
< tr >
2009-11-18 02:58:29 +00:00
< th colspan = "2" > Father< / th >
< th colspan = "2" > Mother< / th >
2009-11-13 05:32:33 +00:00
< / tr >
< tr >
2009-11-18 02:58:29 +00:00
< td class = "ColumnAttribute" > Name:< / td >
2012-06-07 00:49:02 +00:00
{% if user.is_authenticated or father.probably_alive %}
2012-07-31 20:49:19 +00:00
< td class = "ColumnValue" id = "data" >
{% if action != "view" %}
< script type = "text/javascript" >
$(function() {
$('#father').flexbox('/json/?field=father', {
watermark: 'Father',
width: 300,
paging: {
pageSize: 10
},
initialValue: '{{family.father.get_selection_string}}',
initialId: '{{family.father.handle}}'
});
});
// < / script >
< div id = "father" > < / div >
2012-06-07 00:49:02 +00:00
{% else %}
2012-07-31 20:49:19 +00:00
{{family.father|render_name:user}}
2012-06-07 00:49:02 +00:00
{% endif %}
2012-07-31 20:49:19 +00:00
< / td >
{% else %}
{{family.father|render_name:user}}
{% endif %}
< / td >
2009-11-18 02:58:29 +00:00
< td class = "ColumnAttribute" > Name:< / td >
2012-07-21 17:43:20 +00:00
{% if user.is_authenticated or family.mother.probably_alive %}
2012-07-31 20:49:19 +00:00
< td class = "ColumnValue" id = "data" >
{% if action != "view" %}
< script type = "text/javascript" >
$(function() {
$('#mother').flexbox('/json/?field=mother', {
watermark: 'Mother',
width: 300,
paging: {
pageSize: 10
},
initialValue: '{{family.mother.get_selection_string}}',
initialId: '{{family.mother.handle}}'
});
});
// < / script >
< div id = "mother" > < / div >
{% else %}
{{family.mother|render_name:user}}
{% endif %}
2012-06-07 00:49:02 +00:00
{% else %}
2012-07-31 20:49:19 +00:00
{{family.mother|render_name:user}}
2012-06-07 00:49:02 +00:00
{% endif %}
2012-07-31 20:49:19 +00:00
< / td >
2009-11-13 05:32:33 +00:00
< / tr >
2012-05-25 01:45:16 +00:00
{% if user.is_authenticated or not familyform.father.probably_alive %}
2009-11-13 05:32:33 +00:00
< tr >
2009-11-18 02:58:29 +00:00
< td class = "ColumnAttribute" > Birth:< / td >
2012-05-25 23:41:47 +00:00
< td class = "ColumnValue" id = "data" > {{familyform.father.birth|date_as_text:user}}< / td >
2009-11-18 02:58:29 +00:00
< td class = "ColumnAttribute" > Birth:< / td >
2012-05-25 23:41:47 +00:00
< td class = "ColumnValue" id = "data" > {{familyform.mother.birth|date_as_text:user}}< / td >
2009-11-13 05:32:33 +00:00
< / tr >
2009-11-19 02:41:37 +00:00
{% else %}
< tr >
2012-05-25 12:38:09 +00:00
< td class = "ColumnAttribute" > Death:< / td >
2012-05-25 23:41:47 +00:00
< td class = "ColumnValue" id = "data" > {{familyform.father.death|date_as_text:user}}< / td >
2012-05-25 12:38:09 +00:00
< td class = "ColumnAttribute" > Death:< / td >
2012-05-25 23:41:47 +00:00
< td class = "ColumnValue" id = "data" > {{familyform.mother.death|date_as_text:user}}< / td >
2009-11-19 02:41:37 +00:00
< / tr >
{% endif %}
2009-11-13 05:32:33 +00:00
< tr >
2009-11-18 02:58:29 +00:00
< td class = "ColumnAttribute" > Death:< / td >
2012-05-25 23:41:47 +00:00
< td class = "ColumnValue" id = "data" > {{familyform.father.death|date_as_text:user}}< / td >
2009-11-18 02:58:29 +00:00
< td class = "ColumnAttribute" > Death:< / td >
2012-05-25 23:41:47 +00:00
< td class = "ColumnValue" id = "data" > {{familyform.mother.death|date_as_text:user}}< / td >
2009-11-13 05:32:33 +00:00
< / tr >
2009-11-18 02:58:29 +00:00
< / tbody >
2009-11-13 05:32:33 +00:00
< / table >
2010-01-02 02:09:09 +00:00
< table class = "infolist" >
2009-11-18 02:58:29 +00:00
< tbody >
< tr >
2010-01-02 02:09:09 +00:00
< th colspan = "4" > Relationship information< / th >
2009-11-18 02:58:29 +00:00
< / tr >
< tr >
2012-05-25 12:38:09 +00:00
< 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 02:09:09 +00:00
< / tr >
< tr >
2012-05-25 12:38:09 +00:00
< 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 02:58:29 +00:00
< / tr >
< / tbody >
< / table >
< / div >
< / div >
2009-11-13 05:32:33 +00:00
<!-- Tabs -->
2012-07-25 00:47:09 +00:00
< div class = "ui-tabs ui-widget ui-widget-content ui-corner-all" id = "tabs" style = "border: none;" >
2009-11-13 05:32:33 +00:00
< ul class = "ui-tabs-nav ui-helper-reset ui-helper-clearfix ui-widget-header ui-corner-all" >
2012-07-27 15:07:36 +00:00
< li class = "ui-state-default ui-corner-top ui-tabs-selected ui-state-active" > < a class = "tab-children" href = "#tab-children" > Children< / a > < / li >
< li class = "ui-corner-top ui-state-default" > < a class = "tab-events" href = "#tab-events" > Event< / a > < / li >
< li class = "ui-corner-top ui-state-default" > < a class = "tab-citations" href = "#tab-citations" > 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-media" href = "#tab-media" > Media< / a > < / li >
< li class = "ui-corner-top ui-state-default" > < a class = "tab-lds" href = "#tab-lds" > LDS< / a > < / li >
< li class = "ui-corner-top ui-state-default" > < a class = "tab-history" href = "#tab-history" > History< / a > < / li >
2009-11-13 05:32:33 +00:00
< / ul >
2012-07-25 00:47:09 +00:00
< div class = "ui-tabs-panel ui-widget-content ui-corner-bottom" id = "tab-children" style = "background-color: #f4f0ec;" >
2009-11-15 22:47:43 +00:00
<!-- Events -->
2012-06-12 01:13:26 +00:00
{% children_table family user action "/person/$act/family/%s" family.handle %}
2009-11-15 22:47:43 +00:00
< / div >
2012-07-25 00:47:09 +00:00
< div class = "ui-tabs-panel ui-widget-content ui-corner-bottom ui-tabs-hide" id = "tab-events" style = "background-color: #f4f0ec;" >
2012-05-30 12:54:06 +00:00
{% event_table family user action "/event/$act/family/%s" family.handle %}
2009-11-15 22:47:43 +00:00
< / div >
2012-07-25 00:47:09 +00:00
< div class = "ui-tabs-panel ui-widget-content ui-corner-bottom ui-tabs-hide" id = "tab-citations" style = "background-color: #f4f0ec;" >
2012-07-20 17:40:54 +00:00
{% citation_table family user action "/citation/$act/family/%s" family.handle %}
2009-11-15 22:47:43 +00:00
< / div >
2012-07-25 00:47:09 +00:00
< div class = "ui-tabs-panel ui-widget-content ui-corner-bottom ui-tabs-hide" id = "tab-attributes" style = "background-color: #f4f0ec;" >
2012-05-26 20:56:27 +00:00
{% attribute_table family user action "/attribute/add/family/%s" family.handle %}
2009-11-15 22:47:43 +00:00
< / div >
2012-07-25 00:47:09 +00:00
< div class = "ui-tabs-panel ui-widget-content ui-corner-bottom ui-tabs-hide" id = "tab-notes" style = "background-color: #f4f0ec;" >
2012-05-30 12:54:06 +00:00
{% note_table family user action "/note/$act/family/%s" family.handle %}
2009-11-15 22:47:43 +00:00
< / div >
2012-07-25 00:47:09 +00:00
< div class = "ui-tabs-panel ui-widget-content ui-corner-bottom ui-tabs-hide" id = "tab-media" style = "background-color: #f4f0ec;" >
2012-05-30 21:05:38 +00:00
{% media_table family user action "/media/$act/family/%s" family.handle %}
2009-11-15 22:47:43 +00:00
< / div >
2012-07-25 00:47:09 +00:00
< div class = "ui-tabs-panel ui-widget-content ui-corner-bottom ui-tabs-hide" id = "tab-lds" style = "background-color: #f4f0ec;" >
2012-05-26 20:56:27 +00:00
{% lds_table family user action "/lds/add/family/%s" family.handle %}
2009-11-15 22:47:43 +00:00
< / div >
2012-07-25 00:47:09 +00:00
< div class = "ui-tabs-panel ui-widget-content ui-corner-bottom ui-tabs-hide" id = "tab-history" style = "background-color: #f4f0ec;" >
2012-06-20 02:34:15 +00:00
{% history_table family user action %}
< / div >
2009-11-13 05:32:33 +00:00
< / div >
2012-05-25 01:45:16 +00:00
{% if user.is_superuser %}
{% if action == "edit" %}
2012-06-05 01:48:39 +00:00
{% make_button "Cancel" "/family/%s" family.handle args %}
2012-07-31 20:49:19 +00:00
< input type = "hidden" id = "father_return" name = "father_return" value = "" / >
< input type = "hidden" id = "mother_return" name = "mother_return" value = "" / >
2012-05-25 01:45:16 +00:00
< input type = "hidden" name = "action" value = "save" / >
2012-06-05 01:48:39 +00:00
< input type = "hidden" name = "search" value = "{{search}}" / >
< input type = "hidden" name = "page" value = "{{page}}" / >
2012-05-25 01:45:16 +00:00
< input type = "submit" value = "Save" / >
{% else %}
{% ifequal action "add" %}
2012-06-05 01:48:39 +00:00
{% make_button "Cancel" "/family/" args %}
2012-07-31 20:49:19 +00:00
< input type = "hidden" id = "father_return" name = "father_return" value = "" / >
< input type = "hidden" id = "mother_return" name = "mother_return" value = "" / >
2012-05-25 01:45:16 +00:00
< input type = "hidden" name = "action" value = "create" / >
2012-06-05 01:48:39 +00:00
< input type = "hidden" name = "search" value = "{{search}}" / >
< input type = "hidden" name = "page" value = "{{page}}" / >
2012-05-25 01:45:16 +00:00
< input type = "submit" value = "Create" / >
{% else %}
2012-12-01 22:13:30 +00:00
< div style = "background-color: lightgray; padding: 2px 0px 0px 2px; clear: both;" >
{% 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 %}
< / div >
2012-05-25 01:45:16 +00:00
{% endifequal %}
{% endif %}
{% else %}
{% endif %}
< / form >
2009-11-13 05:32:33 +00:00
{% endblock %}