2012-05-16 01:58:46 +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(){
var selectedTab = 0;
$('#tabs li a').each(function(index) {
if ($(this).attr('href').replace("#", "#tab-") == document.location.hash) {
selectedTab = index;
}
});
$('#tabs').tabs({
'select': function(event, ui){
document.location.hash = "tab-" + ui.panel.id;
},
'selected' : selectedTab
});
});
2012-05-16 01:58:46 +05:30
< / script >
< div class = "content" id = "IndividualDetail" >
{% 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 %}
< h3 > {{person|make_name:user}} [{{person.gramps_id}}]< / h3 >
< div id = "summaryarea" >
2012-05-17 17:26:59 +05:30
< table class = "infolist" style = "width:90%;" > {% comment %} 4 cols {% endcomment %}
2012-05-16 01:58:46 +05:30
< tbody >
2012-05-24 17:58:34 +05:30
{% for error in form.errors %}
< p id = "error" > {{error}}< / p >
{% endfor %}
2012-05-16 01:58:46 +05:30
< form method = "post" > {% csrf_token %}
< tr >
2012-05-22 00:20:03 +05:30
< td class = "ColumnAttribute" > {{surnameform.name_origin_type.label}}:< / td >
< td class = "ColumnValue" id = "data" > {% render surnameform.name_origin_type user action %}< / td >
2012-05-16 01:58:46 +05:30
< / tr >
< tr >
2012-05-22 00:20:03 +05:30
< td class = "ColumnAttribute" > {{surnameform.primary.label}}:< / td >
< td class = "ColumnValue" id = "data" > {% render surnameform.primary user action %}< / td >
< / tr >
2012-05-16 01:58:46 +05:30
< tr >
2012-05-22 00:20:03 +05:30
< td class = "ColumnAttribute" > {{surnameform.prefix.label}}:< / td >
< td class = "ColumnValue" id = "data" > {% render surnameform.prefix user action %}< / td >
2012-05-16 01:58:46 +05:30
< / tr >
< tr >
2012-05-22 00:20:03 +05:30
< td class = "ColumnAttribute" > {{surnameform.surname.label}}:< / td >
< td class = "ColumnValue" id = "data" > {% render surnameform.surname user action %}< / td >
2012-05-16 01:58:46 +05:30
< / tr >
< tr >
2012-05-22 00:20:03 +05:30
< td class = "ColumnAttribute" > {{surnameform.connector.label}}:< / td >
< td class = "ColumnValue" id = "data" > {% render surnameform.connector user action %}< / td >
2012-05-16 01:58:46 +05:30
< / 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-general" > General< / 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-notes" > Notes< / a > < / li >
< / ul >
< / div >
{% if user.is_authenticated %}
2012-05-24 17:58:34 +05:30
{% if action == "edit" %}
< input type = "button"
value="Cancel"
onclick="document.location.href='/person/{{person.handle}}/name/{{order}}/surname/{{sorder}}'"/>
2012-05-16 01:58:46 +05:30
< input type = "hidden" name = "action" value = "save" / >
< input type = "submit" value = "Save" >
2012-05-24 17:58:34 +05:30
{% else %}
{% if action == "add" %}
2012-05-16 01:58:46 +05:30
< input type = "button"
value="Cancel"
2012-05-25 02:21:46 +05:30
onclick="document.location.href='/person/{{person.handle}}/name/{{order}}'"/>
2012-05-24 17:58:34 +05:30
< input type = "hidden" name = "action" value = "create" / >
< input type = "submit" value = "Save" >
{% else %}
2012-05-31 01:10:32 +05:30
< input type = "button"
value="Add Surname"
onclick="document.location.href='/person/{{person.handle}}/name/{{order}}/surname/add'"/>
2012-05-24 17:58:34 +05:30
< input type = "button"
value="Edit Surname"
onclick="document.location.href='/person/{{person.handle}}/name/{{order}}/surname/{{sorder}}/edit'"/>
< input type = "button"
value="Delete Surname"
onclick="document.location.href='/person/{{person.handle}}/name/{{order}}/surname/{{sorder}}/delete'"/>
{% endif %}
{% endif %}
2012-05-16 01:58:46 +05:30
{% endif %}
< / form >
{% endblock %}