Latest advancement in privacy issues; reworked proxy + forms

svn: r13929
This commit is contained in:
Doug Blank
2009-12-27 18:23:59 +00:00
parent ef3a25815a
commit 7ca0d94563
11 changed files with 315 additions and 275 deletions

View File

@@ -83,25 +83,25 @@
</ul>
<div class="ui-tabs-panel ui-widget-content ui-corner-bottom" id="tab-children">
<!-- Events -->
{{ family|family_children_table:user|safe }}
{% children_table family user action "/family/%s/children" family.handle %}
</div>
<div class="ui-tabs-panel ui-widget-content ui-corner-bottom ui-tabs-hide" id="tab-events">
{{ family|family_event_table:user|safe }}
{% event_table family user action "/family/%s/children" family.handle %}
</div>
<div class="ui-tabs-panel ui-widget-content ui-corner-bottom ui-tabs-hide" id="tab-sources">
{{ family|source_table:user|safe }}
{% source_table family user action "/family/%s/children" family.handle %}
</div>
<div class="ui-tabs-panel ui-widget-content ui-corner-bottom ui-tabs-hide" id="tab-attributes">
{{ family|family_attribute_table:user|safe }}
{% attribute_table family user action "/family/%s/children" family.handle %}
</div>
<div class="ui-tabs-panel ui-widget-content ui-corner-bottom ui-tabs-hide" id="tab-notes">
{{ family|family_note_table:user|safe }}
{% note_table family user action "/family/%s/children" family.handle %}
</div>
<div class="ui-tabs-panel ui-widget-content ui-corner-bottom ui-tabs-hide" id="tab-gallery">
{{ family|family_gallery_table:user|safe }}
{% gallery_table family user action "/family/%s/children" family.handle %}
</div>
<div class="ui-tabs-panel ui-widget-content ui-corner-bottom ui-tabs-hide" id="tab-lds">
{{ family|family_lds_table:user|safe }}
{% lds_table family user action "/family/%s/children" family.handle %}
</div>
</div>
{% endblock %}

View File

@@ -11,7 +11,7 @@
</script>
<div class="content" id="IndividualDetail">
<h3>Name for Person [{{person.gramps_id}}]</h3>
<h3>{{person|make_name:user}} [{{person.gramps_id}}]</h3>
<div id="summaryarea">
<table class="infolist"> {% comment %} 4 cols {% endcomment %}
<tbody>
@@ -69,26 +69,32 @@
<li class="ui-corner-top ui-state-default"><a href="#tab-notes">Notes</a></li>
</ul>
<div class="ui-tabs-panel ui-widget-content ui-corner-bottom" id="tab-general">
<table>
<tr><td>{{form.group_as.label}}: </td>
<div class="ui-tabs-panel ui-widget-content ui-corner-bottom"
id="tab-general">
<div style="overflow: auto; height:150px; color: black; background-color: white;">
<table border="1">
<tr><td style="background-color: #FFF2C5;">{{form.group_as.label}}: </td>
<td>{{form.group_as|render:action}}</td>
</tr>
<tr><td>{{form.sort_as.label}}: </td>
<tr><td style="background-color: #FFF2C5;">{{form.sort_as.label}}: </td>
<td>{{form.sort_as|render:action}}</td>
</tr>
<tr><td>{{form.display_as.label}}: </td>
<tr><td style="background-color: #FFF2C5;">{{form.display_as.label}}: </td>
<td>{{form.display_as|render:action}}</td>
</tr>
<tr><td>{{form.text.label}}: </td>
<tr><td style="background-color: #FFF2C5;">{{form.text.label}}: </td>
<td>{{form.text|render:action}}</td>
</tr>
</table>
</div>
&nbsp;
</div>
<div class="ui-tabs-panel ui-widget-content ui-corner-bottom ui-tabs-hide" id="tab-sources">
{% source_table form.model user action "/person/%s/name/%s/source/add" person.handle form.model.order %}
{% source_table form.model user action "/person/%s/name/%s/source" person.handle form.model.order %}
</div>
<div class="ui-tabs-panel ui-widget-content ui-corner-bottom ui-tabs-hide" id="tab-notes">
<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 %}
</div>
</div>

View File

@@ -24,7 +24,7 @@
{% if person %}
<td><a href="{{person.handle}}/" class="noThumb">{{ forloop.counter|row_count:page }}</a>
</td>
<td><a href="{{person.handle}}/" class="noThumb">{{person|make_name}}</a>
<td><a href="{{person.handle}}/" class="noThumb">{{person|make_name:user}}</a>
</td>
<td><a href="{{person.handle}}/" class="grampsid">[{{person.gramps_id}}]</a></td>
<td><a href="{{person.handle}}/" class="noThumb">{{person.gender_type}}</a></td>

View File

@@ -11,49 +11,61 @@
</script>
<div class="content" id="IndividualDetail">
<h3></h3>
<h3>{{nameform|make_name:user}} [{{person.gramps_id}}]</h3>
<div id="summaryarea">
<table class="infolist"> {% comment %} 5 cols {% endcomment %}
<tbody>
{% if user.is_authenticated %}
{% ifequal action "edit" %}
{% for error in personform.errors %}
{{error}}<br>
{% endfor %}
{% for error in nameform.errors %}
{{error}}<br>
{% endfor %}
<form method="post">
{% endifequal %}
{% endif %}
<tr>
<td class="ColumnAttribute">Family:</td>
<td class="ColumnValue" id="data">{{name.surname}}</td>
<td class="ColumnAttribute">Prefix:</td>
<td class="ColumnValue" id="data">{{name.prefix}}</td>
<td class="ColumnAttribute">{{nameform.surname.label}}</td>
<td class="ColumnValue" id="data">{{nameform.surname|render:action}}</td>
<td class="ColumnAttribute">{{nameform.prefix.label}}</td>
<td class="ColumnValue" id="data">{{nameform.prefix|render:action}}</td>
<td rowspan="6" colspan="2" style="border:solid 2px #7D5925;">Image:</td>
</tr>
<tr>
<td class="ColumnAttribute" colspan="2"></td>
<td class="ColumnAttribute">Suffix:</td>
<td class="ColumnValue" id="data">{{name.suffix}}</td>
<td class="ColumnAttribute">{{nameform.suffix.label}}</td>
<td class="ColumnValue" id="data">{{nameform.suffix|render:action}}</td>
</tr>
<tr>
<td class="ColumnAttribute">Given:</td>
<td class="ColumnValue" id="data">{{name.first_name}}</td>
<td class="ColumnAttribute">Call Name:</td>
<td class="ColumnValue" id="data">{{name.call}}</td>
<td class="ColumnAttribute">{{nameform.first_name.label}}</td>
<td class="ColumnValue" id="data">{{nameform.first_name|render:action}}</td>
<td class="ColumnAttribute">{{nameform.call.label}}</td>
<td class="ColumnValue" id="data">{{nameform.call|render:action}}</td>
</tr>
<tr>
<td class="ColumnAttribute">Type:</td>
<td class="ColumnValue" id="data">{{name.name_type}}</td>
<td class="ColumnAttribute">Patronymic:</td>
<td class="ColumnValue" id="data">{{name.patronymic}}</td>
<td class="ColumnAttribute">{{nameform.name_type.label}}</td>
<td class="ColumnValue" id="data">{{nameform.name_type|render:action}}</td>
<td class="ColumnAttribute">{{nameform.patronymic.label}}</td>
<td class="ColumnValue" id="data">{{nameform.patronymic|render:action}}</td>
</tr>
<tr>
<td class="ColumnAttribute" colspan="2"></td>
<td class="ColumnAttribute">Title:</td>
<td class="ColumnValue" id="data">{{name.title}}</td>
<td class="ColumnAttribute">{{nameform.title.label}}</td>
<td class="ColumnValue" id="data">{{nameform.title|render:action}}</td>
</tr>
<tr>
<td class="ColumnAttribute">Gender:</td>
<td class="ColumnValue" id="data">{{person.gender_type}}</td>
<td class="ColumnAttribute">ID:</td>
<td class="ColumnValue" id="data">{{person.gramps_id}}</td>
<td class="ColumnAttribute">{{personform.gender_type.label}}</td>
<td class="ColumnValue" id="data">{{personform.gender_type|render:action}}</td>
<td class="ColumnAttribute">{{personform.gramps_id.label}}</td>
<td class="ColumnValue" id="data">{{personform.gramps_id|render:action}}</td>
</tr>
<tr>
<td class="ColumnAttribute">Marker:</td>
<td class="ColumnValue" id="data">{{person.marker_type}}</td>
<td class="ColumnAttribute">{{personform.marker_type.label}}</td>
<td class="ColumnValue" id="data">{{personform.marker_type|render:action}}</td>
<td class="ColumnAttribute" colspan="3"></td>
</tr>
</tbody>
@@ -80,40 +92,54 @@
</ul>
<div class="ui-tabs-panel ui-widget-content ui-corner-bottom" id="tab-events">
<!-- Events -->
{{ person|person_event_table:user|safe }}
{% event_table person user action "/person/%s/event" person.handle %}
</div>
<div class="ui-tabs-panel ui-widget-content ui-corner-bottom ui-tabs-hide" id="tab-names">
{{ person|person_name_table:user|safe }}
{% name_table person user action "/person/%s/name" person.handle %}
</div>
<div class="ui-tabs-panel ui-widget-content ui-corner-bottom ui-tabs-hide" id="tab-sources">
{% source_table person user action "/person/%s/source/add" person.handle %}
{% source_table person user action "/person/%s/source" person.handle %}
</div>
<div class="ui-tabs-panel ui-widget-content ui-corner-bottom ui-tabs-hide" id="tab-attributes">
{{ person|person_attribute_table:user|safe }}
{% attribute_table person user action "/person/%s/attribute" person.handle %}
</div>
<div class="ui-tabs-panel ui-widget-content ui-corner-bottom ui-tabs-hide" id="tab-addresses">
{{ person|person_address_table:user|safe }}
{% address_table person user action "/person/%s/address" person.handle %}
</div>
<div class="ui-tabs-panel ui-widget-content ui-corner-bottom ui-tabs-hide" id="tab-notes">
{{ person|person_note_table:user|safe }}
<div class="ui-tabs-panel ui-widget-content ui-corner-bottom
ui-tabs-hide" id="tab-notes">
{% note_table person user action "/person/%s/note" person.handle %}
</div>
<div class="ui-tabs-panel ui-widget-content ui-corner-bottom ui-tabs-hide" id="tab-gallery">
{{ person|person_gallery_table:user|safe }}
{% gallery_table person user action "/person/%s/gallery" person.handle %}
</div>
<div class="ui-tabs-panel ui-widget-content ui-corner-bottom ui-tabs-hide" id="tab-internet">
{{ person|person_internet_table:user|safe }}
{% internet_table person user action "/person/%s/internet" person.handle %}
</div>
<div class="ui-tabs-panel ui-widget-content ui-corner-bottom ui-tabs-hide" id="tab-association">
{{ person|person_association_table:user|safe }}
{% association_table person user action "/person/%s/association" person.handle %}
</div>
<div class="ui-tabs-panel ui-widget-content ui-corner-bottom ui-tabs-hide" id="tab-lds">
{{ person|person_lds_table:user|safe }}
{% lds_table person user action "/person/%s/lds" person.handle %}
</div>
<div class="ui-tabs-panel ui-widget-content ui-corner-bottom ui-tabs-hide" id="tab-references">
{{ person|person_reference_table:user|safe }}
{% reference_table person user action "/person/%s/reference" person.handle %}
</div>
</div>
{% if user.is_authenticated %}
{% ifequal action "edit" %}
{% make_button "Back to Person" "/person/%s" person.handle %}
<input type="hidden" name="action" value="save"/>
<input type="submit" value="Submit"/>
</form>
{% else %}
{% make_button "Back to People" "/person/" %}
{% make_button "Edit Person" "/person/%s/edit" person.handle %}
{% make_button "Delete Person" "/person/%s/delete" person.handle %}
{% endifequal %}
{% else %}
{% endif %}
{% endblock %}