Adjust links on each child row; fix typo on surname detail page
svn: r20053
This commit is contained in:
parent
95a604f2c6
commit
07942011c1
@ -19,7 +19,8 @@
|
||||
{% format "/browse|Browse" %} ||
|
||||
{% format "/person|People" %} ||
|
||||
{% format "/person/%s|Person [%s]" object.handle object.gramps_id %} ||
|
||||
{% format "/person/%s/name/%s|Name #%s" object.handle order order %}
|
||||
{% format "/person/%s/name/%s|Name #%s" object.handle order order %} ||
|
||||
{% format "/person/%s/name/%s/surname/%s|Surname #%s" object.handle order sorder sorder %}
|
||||
{% endfilter %}
|
||||
|
||||
<h3>{{person|make_name:user}} [{{person.gramps_id}}]</h3>
|
||||
@ -55,17 +56,6 @@
|
||||
</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_superuser %}
|
||||
{% if action == "edit" %}
|
||||
{% make_button "Cancel" "/person/%s/name/%s/surname/%s" person.handle order sorder args %}
|
||||
@ -83,7 +73,7 @@
|
||||
{% else %}
|
||||
{% make_button "Add Surname" "/person/%s/name/%s/surname/add" person.handle order args %}
|
||||
{% make_button "Edit Surname" "/person/%s/name/%s/surname/%s/edit" person.handle order sorder args %}
|
||||
{% make_button "Add Surname" "/person/%s/name/%s/surname/%s/delete" person.handle order sorder args %}
|
||||
{% make_button "Delete Surname" "/person/%s/name/%s/surname/%s/delete" person.handle order sorder args %}
|
||||
{% endif %}
|
||||
{% endif %}
|
||||
{% endif %}
|
||||
|
@ -848,7 +848,7 @@ def children_table(obj, user, act, url=None, *args):
|
||||
_("Maternal"),
|
||||
_("Birth Date"),
|
||||
)
|
||||
#table.column_widths = [3] + [98/6] * 6
|
||||
table.column_widths = [10, 3, 8, 30, 8, 8, 8, 25]
|
||||
|
||||
family = obj
|
||||
obj_type = ContentType.objects.get_for_model(family)
|
||||
@ -859,7 +859,7 @@ def children_table(obj, user, act, url=None, *args):
|
||||
for childref in childrefs:
|
||||
child = childref.ref_object
|
||||
if user.is_authenticated():
|
||||
table.row(Link("[[x]][[^]][[v]]"),
|
||||
table.row(Link("[[x%d]][[^%d]][[v%d]]" % (count, count, count)),
|
||||
str(count),
|
||||
"[%s]" % child.gramps_id,
|
||||
render_name(child, user),
|
||||
@ -886,9 +886,12 @@ def children_table(obj, user, act, url=None, *args):
|
||||
count += 1
|
||||
table.links(links)
|
||||
retval += table.get_html()
|
||||
retval = retval.replace("[[x]]", make_button("x", "/person/remove/family/%s" % family.handle))
|
||||
retval = retval.replace("[[^]]", make_button("^", "/person/up/family/%s" % family.handle))
|
||||
retval = retval.replace("[[v]]", make_button("v", "/person/down/family/%s" % family.handle))
|
||||
count = 1
|
||||
for childref in childrefs:
|
||||
retval = retval.replace("[[x%d]]" % count, make_button("x", "/family/%s/remove/child/%d" % (family.handle, count)))
|
||||
retval = retval.replace("[[^%d]]" % count, make_button("^", "/family/%s/up/child/%d" % (family.handle, count)))
|
||||
retval = retval.replace("[[v%d]]" % count, make_button("v", "/family/%s/down/child/%d" % (family.handle, count)))
|
||||
count += 1
|
||||
if user.is_superuser and url and act == "view":
|
||||
retval += make_button(_("Add New Person as Child"), (url.replace("$act", "add") % args))
|
||||
retval += make_button(_("Add Existing Person as Child"), (url.replace("$act", "share") % args))
|
||||
|
Loading…
Reference in New Issue
Block a user