Refinements on gramps-connect editing people, families, and events
svn: r13957
This commit is contained in:
@@ -97,6 +97,9 @@ def logout_page(request):
|
||||
context["view"] = 'home'
|
||||
context["tview"] = _('Home')
|
||||
logout(request)
|
||||
# TODO: allow this once we have an error page
|
||||
#if request.GET.has_key("next"):
|
||||
# return redirect(request.GET.get("next"), context)
|
||||
return HttpResponseRedirect('/')
|
||||
|
||||
def user_page(request, username):
|
||||
@@ -626,7 +629,7 @@ def view(request, view):
|
||||
context["search"] = search
|
||||
context["total"] = total
|
||||
context["object_list"] = object_list
|
||||
context["next"] = "/person/"
|
||||
context["next"] = "/%s/" % view
|
||||
if search:
|
||||
context["search_query"] = ("&search=%s" % search)
|
||||
else:
|
||||
|
@@ -449,11 +449,40 @@ def children_table(obj, user, action, url=None, *args):
|
||||
_("Maternal"),
|
||||
_("Birth Date"),
|
||||
)
|
||||
#if user.is_authenticated():
|
||||
#for djfamily:
|
||||
# table.row("test")
|
||||
|
||||
family = obj
|
||||
obj_type = ContentType.objects.get_for_model(family)
|
||||
childrefs = dji.ChildRef.filter(object_id=family.id,
|
||||
object_type=obj_type).order_by("order")
|
||||
links = []
|
||||
count = 1
|
||||
for childref in childrefs:
|
||||
child = childref.ref_object
|
||||
if user.is_authenticated():
|
||||
table.row(str(count),
|
||||
"[%s]" % child.gramps_id,
|
||||
render_name(child, user),
|
||||
child.gender_type,
|
||||
childref.father_rel_type,
|
||||
childref.mother_rel_type,
|
||||
render_date(child.birth, user),
|
||||
)
|
||||
links.append(('URL', ("/person/%s" % child.handle)))
|
||||
else:
|
||||
table.row(str(count),
|
||||
"[%s]" % child.gramps_id,
|
||||
render_name(child, user),
|
||||
child.gender_type,
|
||||
"[Private]",
|
||||
"[Private]",
|
||||
"[Private]",
|
||||
)
|
||||
links.append(('URL', ("/person/%s" % child.handle)))
|
||||
count += 1
|
||||
table.links(links)
|
||||
retval += table.get_html()
|
||||
retval += nbsp("") # to keep tabs same height
|
||||
return table.get_html()
|
||||
return retval
|
||||
|
||||
## FIXME: these dji function wrappers just use the functions
|
||||
## written for the import/export. Can be done much more directly.
|
||||
|
Reference in New Issue
Block a user