Fixed the sorting in class EventListPage. Changed elements in stylesheet.

svn: r13835
This commit is contained in:
Rob G. Healey
2009-12-17 07:22:29 +00:00
parent b4512427af
commit 1191bb227d
2 changed files with 32 additions and 27 deletions

View File

@ -2330,8 +2330,8 @@ class EventListPage(BasePage):
Html("th", label, class_ = "Column" + colclass, inline = True)
for (label, colclass) in [
[THEAD, "Type"],
[GRAMPSID, "GRAMPSID"],
[DHEAD, "Date"],
[GRAMPSID, "GRAMPSID"],
[_PERSON, "Person"] ]
)
@ -2342,10 +2342,7 @@ class EventListPage(BasePage):
for (evt_type, datalist) in sort_event_types(db, event_types, event_handle_list):
first_event = True
# sort the datalist by gramps id, date, and event handle
datalist.sort()
for (gid, date, event_handle) in datalist:
for (date, gid, event_handle) in datalist:
event = db.get_event_from_handle(event_handle)
trow = Html("tr")
@ -2362,11 +2359,6 @@ class EventListPage(BasePage):
else:
tcell += " "
# GRAMPS ID
trow += ( Html("td", class_ = "ColumnGRAMPSID") +
self.event_grampsid_link(event_handle, gid, None)
)
# event date
tcell = Html("td", class_ = "ColumnDate", inline = True)
trow += tcell
@ -2375,6 +2367,11 @@ class EventListPage(BasePage):
else:
tcell += " "
# GRAMPS ID
trow += ( Html("td", class_ = "ColumnGRAMPSID") +
self.event_grampsid_link(event_handle, gid, None)
)
# Person
if evt_type in ["Divorce", "Marriage"]:
handle_list = db.find_backlink_handles(event_handle,
@ -6090,7 +6087,7 @@ def sort_event_types(db, event_types, event_handle_list):
# add (gramps_id, date, handle) from this event
if etype in event_dict:
event_dict[etype].append(
(event.gramps_id, event.get_date_object(), handle)
(event.get_date_object(), event.gramps_id, handle)
)
for tup_list in event_dict.values():