2009-12-06 10:39:43 +05:30
{% extends "view_page_detail.html" %}
{% load my_tags %}
{% block content %}
< script type = "text/javascript" >
$(function(){
$('#tabs').tabs();
});
< / script >
< div class = "content" id = "IndividualDetail" >
2011-10-16 22:30:32 +05:30
2011-12-13 04:51:13 +05:30
{% filter breadcrumb %}
{% format "/browse|Browse,/person|People,/person/%s|Person [%s],/person/%s/name/%s|Name #%s" object.handle object.gramps_id object.handle order order %}
{% endfilter %}
2011-10-16 22:30:32 +05:30
2009-12-27 23:53:59 +05:30
< h3 > {{person|make_name:user}} [{{person.gramps_id}}]< / h3 >
2009-12-06 10:39:43 +05:30
< div id = "summaryarea" >
2009-12-07 05:05:46 +05:30
< table class = "infolist" > {% comment %} 4 cols {% endcomment %}
2009-12-06 10:39:43 +05:30
< tbody >
{% if user.is_authenticated %}
2009-12-17 05:34:22 +05:30
{% ifequal action "edit" %}
{% for error in form.errors %}
{{error}}< br >
{% endfor %}
{% endifequal %}
2009-12-20 08:04:04 +05:30
{% endif %}
2012-05-15 20:15:47 +05:30
< form method = "post" > {% csrf_token %}
2009-12-06 10:39:43 +05:30
< tr >
2009-12-17 09:40:41 +05:30
< td class = "ColumnAttribute" > {{form.surname.label}}:< / td >
2012-05-15 20:15:47 +05:30
< td class = "ColumnValue" id = "data" > {% render form.surname user action %}< / td >
2009-12-17 09:40:41 +05:30
< td class = "ColumnAttribute" > {{form.prefix.label}}:< / td >
2012-05-15 20:15:47 +05:30
< td class = "ColumnValue" id = "data" > {% render form.prefix user action %}< / td >
2009-12-06 10:39:43 +05:30
< / tr >
2011-10-13 08:03:20 +05:30
< tr >
2009-12-17 09:40:41 +05:30
< td class = "ColumnAttribute" > {{form.first_name.label}}:< / td >
2010-01-01 20:46:20 +05:30
< td class = "ColumnValue" id = "data" > {% render form.first_name user action %}< / td >
2009-12-17 09:40:41 +05:30
< td class = "ColumnAttribute" > {{form.call.label}}:< / td >
2010-01-01 20:46:20 +05:30
< td class = "ColumnValue" id = "data" > {% render form.call user action %}< / td >
2009-12-06 10:39:43 +05:30
< tr >
< / tr >
2009-12-17 09:40:41 +05:30
< td class = "ColumnAttribute" > {{form.title.label}}:< / td >
2010-01-01 20:46:20 +05:30
< td class = "ColumnValue" id = "data" > {% render form.title user action %}< / td >
2009-12-17 09:40:41 +05:30
< td class = "ColumnAttribute" > {{form.suffix.label}}:< / td >
2010-01-01 20:46:20 +05:30
< td class = "ColumnValue" id = "data" > {% render form.suffix user action %}< / td >
2009-12-06 10:39:43 +05:30
< tr >
2009-12-17 09:40:41 +05:30
< td class = "ColumnAttribute" > {{form.name_type.label}}:< / td >
2010-01-01 20:46:20 +05:30
< td class = "ColumnValue" id = "data" > {% render form.name_type user action %}< / td >
2009-12-07 05:05:46 +05:30
< / tr >
2009-12-17 09:40:41 +05:30
< tr >
< td class = "ColumnAttribute" > {{form.preferred.label}}:< / td >
{% if form.model.preferred %}
2010-01-01 20:46:20 +05:30
< td class = "ColumnValue" id = "data" > True< / td >
2009-12-17 09:40:41 +05:30
{% else %}
2010-01-01 20:46:20 +05:30
< td class = "ColumnValue" id = "data" > {% render form.preferred user action %}< / td >
2009-12-17 09:40:41 +05:30
{% endif %}
2010-01-01 20:46:20 +05:30
< td class = "ColumnAttribute" > {{form.private.label}}:< / td >
< td class = "ColumnValue" id = "data" > {% render form.private user action %}< / td >
2009-12-06 10:39:43 +05:30
< / tr >
< / tbody >
< / table >
< / div >
< / div >
2009-12-20 08:04:04 +05:30
2009-12-06 10:39:43 +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-12-07 05:05:46 +05:30
< li class = "ui-state-default ui-corner-top ui-tabs-selected ui-state-active" > < a href = "#tab-general" > General< / a > < / li >
2012-05-15 20:15:47 +05:30
< li class = "ui-corner-top ui-state-default" > < a href = "#tab-surnames" > Surnames< / a > < / li >
< li class = "ui-corner-top ui-state-default" > < a href = "#tab-names" > Other Names< / a > < / li >
2009-12-06 10:39:43 +05:30
< 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-notes" > Notes< / a > < / li >
< / ul >
2009-12-26 11:10:32 +05:30
2009-12-27 23:53:59 +05:30
< div class = "ui-tabs-panel ui-widget-content ui-corner-bottom"
id="tab-general">
2011-10-13 06:59:46 +05:30
< div style = "overflow: auto; height:150px;" >
2009-12-27 23:53:59 +05:30
< table border = "1" >
< tr > < td style = "background-color: #FFF2C5;" > {{form.group_as.label}}: < / td >
2010-01-01 20:46:20 +05:30
< td > {% render form.group_as user action %}< / td >
2009-12-26 11:10:32 +05:30
< / tr >
2009-12-27 23:53:59 +05:30
< tr > < td style = "background-color: #FFF2C5;" > {{form.sort_as.label}}: < / td >
2010-01-01 20:46:20 +05:30
< td > {% render form.sort_as user action %}< / td >
2009-12-26 11:10:32 +05:30
< / tr >
2009-12-27 23:53:59 +05:30
< tr > < td style = "background-color: #FFF2C5;" > {{form.display_as.label}}: < / td >
2010-01-01 20:46:20 +05:30
< td > {% render form.display_as user action %}< / td >
2009-12-26 11:10:32 +05:30
< / tr >
2009-12-27 23:53:59 +05:30
< tr > < td style = "background-color: #FFF2C5;" > {{form.text.label}}: < / td >
2010-01-01 20:46:20 +05:30
< td > {% render form.text user action %}< / td >
2009-12-26 11:10:32 +05:30
< / tr >
< / table >
2009-12-27 23:53:59 +05:30
< / div >
2009-12-06 10:39:43 +05:30
< / div >
2012-05-15 20:15:47 +05:30
< div class = "ui-tabs-panel ui-widget-content ui-corner-bottom ui-tabs-hide" id = "tab-surnames" >
{% surname_table person user action "/person/%s/name/%s/surname" person.handle form.model.order %}
< / div >
2010-01-01 20:46:20 +05:30
< div class = "ui-tabs-panel ui-widget-content ui-corner-bottom ui-tabs-hide" id = "tab-names" >
{% name_table person user action "/person/%s/name" person.handle %}
< / div >
2009-12-06 10:39:43 +05:30
< div class = "ui-tabs-panel ui-widget-content ui-corner-bottom ui-tabs-hide" id = "tab-sources" >
2009-12-27 23:53:59 +05:30
{% source_table form.model user action "/person/%s/name/%s/source" person.handle form.model.order %}
2009-12-06 10:39:43 +05:30
< / div >
2009-12-27 23:53:59 +05:30
< div class = "ui-tabs-panel ui-widget-content ui-corner-bottom
ui-tabs-hide" id="tab-notes">
{% note_table form.model user action "/person/%s/name/%s/note" person.handle form.model.order %}
2009-12-06 10:39:43 +05:30
< / div >
< / div >
2012-05-15 20:15:47 +05:30
< input type = "button"
value="Back to Person"
onclick="document.location.href='/person/{{person.handle}}'"/>
2009-12-17 05:34:22 +05:30
{% if user.is_authenticated %}
{% ifequal action "edit" %}
< input type = "hidden" name = "action" value = "save" / >
2012-05-15 20:15:47 +05:30
< input type = "submit" value = "Save" / >
2009-12-17 05:34:22 +05:30
{% else %}
2012-05-15 20:15:47 +05:30
< input type = "button"
value="Edit Name"
onclick="document.location.href='/person/{{person.handle}}/name/{{order}}/edit'"/>
< input type = "button"
value="Add Name"
onclick="document.location.href='/person/{{person.handle}}/name/add'"/>
< input type = "button"
value="Delete Name"
onclick="document.location.href='/person/{{person.handle}}/name/{{order}}/delete'"/>
2009-12-17 05:34:22 +05:30
{% endifequal %}
{% else %}
{% endif %}
2012-05-15 20:15:47 +05:30
< / form >
2009-12-06 10:39:43 +05:30
{% endblock %}