Removed ColumnMedia from FamilyListPage, and Benny said it would take a huge hit on bandwidth and load timing.

svn: r18061
This commit is contained in:
Rob G. Healey 2011-08-24 07:12:54 +00:00
parent a9cff60f04
commit a2e4669a3a
2 changed files with 29 additions and 38 deletions

View File

@ -2584,9 +2584,9 @@ class FamilyListPage(BasePage):
# add alphabet navigation # add alphabet navigation
menu_set = get_first_letters(db, ind_list, _KEYPERSON) menu_set = get_first_letters(db, ind_list, _KEYPERSON)
alpha_nav, menu_set = alphabet_navigation(menu_set) alpha_nav, menu_set = alphabet_navigation(menu_set)
if alpha_nav is not None: if alpha_nav:
relationlist += alpha_nav relationlist += alpha_nav
ltr_displayed = {} ltrs_displayed = {}
# begin families table and table head # begin families table and table head
with Html("table", class_ ="infolist relationships") as table: with Html("table", class_ ="infolist relationships") as table:
@ -2606,8 +2606,8 @@ class FamilyListPage(BasePage):
(_("Partner 1"), "ColumnPartner"), (_("Partner 1"), "ColumnPartner"),
(_("Partner 2"), "ColumnPartner"), (_("Partner 2"), "ColumnPartner"),
(_("Marriage"), "ColumnMarriage"), (_("Marriage"), "ColumnMarriage"),
(_("Divorce"), "ColumnDivorce"), (_("Divorce"), "ColumnDivorce") ]
(_("Media"), "ColumnMedia") ] ) )
tbody = Html("tbody") tbody = Html("tbody")
table += tbody table += tbody
@ -2641,11 +2641,12 @@ class FamilyListPage(BasePage):
tcell = Html("td", class_ ="ColumnRowLabel") tcell = Html("td", class_ ="ColumnRowLabel")
trow += tcell trow += tcell
if letter not in ltr_displayed: if letter not in ltrs_displayed:
trow.attr = 'id ="FirstLetter"' trow.attr = 'class ="BeginLetter"'
tcell += Html("a", letter, name =letter, title ="Families: " + letter, inline =True) tcell += Html("a", letter, name =letter,
title ="Families: " + letter, inline =True)
ltr_displayed[letter] = True ltrs_displayed[letter] = True
else: else:
tcell += ' ' tcell += ' '
@ -2653,10 +2654,11 @@ class FamilyListPage(BasePage):
trow += tcell trow += tcell
if first_family: if first_family:
trow.attr += ' class ="FirstFamily"' trow.attr = 'class ="BeginFamily"'
url = self.report.build_url_fname_html(fhandle, "fam") url = self.report.build_url_fname_html(fhandle, "fam")
tcell += self.family_link(url, self.get_name(person), person.gramps_id) tcell += self.family_link(url, self.get_name(person),
person.get_gramps_id())
first_family = False first_family = False
else: else:
@ -2672,7 +2674,8 @@ class FamilyListPage(BasePage):
if partner: if partner:
if check_person_database(partner, ind_list): if check_person_database(partner, ind_list):
url = self.report.build_url_fname_html(fhandle, "fam") url = self.report.build_url_fname_html(fhandle, "fam")
tcell += self.family_link(url, self.get_name(partner), partner.gramps_id) tcell += self.family_link(url, self.get_name(partner),
partner.get_gramps_id())
else: else:
tcell += self.get_name(partner) tcell += self.get_name(partner)
else: else:
@ -2689,7 +2692,8 @@ class FamilyListPage(BasePage):
event = db.get_event_from_handle(evt_ref.ref) event = db.get_event_from_handle(evt_ref.ref)
if event: if event:
evt_type = event.get_type() evt_type = event.get_type()
if evt_type in [gen.lib.EventType.MARRIAGE, gen.lib.EventType.DIVORCE]: if evt_type in [gen.lib.EventType.MARRIAGE,
gen.lib.EventType.DIVORCE]:
if evt_type == gen.lib.EventType.MARRIAGE: if evt_type == gen.lib.EventType.MARRIAGE:
tcell1 += _dd.display(event.get_date_object()) tcell1 += _dd.display(event.get_date_object())
@ -2703,29 +2707,6 @@ class FamilyListPage(BasePage):
else: else:
tcell1 += ' ' tcell1 += ' '
tcell2 += ' ' tcell2 += ' '
# Family media reference list...
tcell = Html("td", class_ ="ColumnMedia")
trow += tcell
if self.create_media:
media_list = family.get_media_list()
if media_list:
mediaref = media_list[0]
if mediaref:
media_hnd = mediaref.get_reference_handle()
if media_hnd:
photo = db.get_object_from_handle(media_hnd)
if photo:
real_path, newpath = self.report.prepare_copy_media(photo)
newpath = self.report.build_url_fname(newpath)
tcell += self.media_link(media_hnd, newpath, '', up =True)
else:
tcell += ' '
else:
tcell += ' '
first_family = False first_family = False
# add clearline for proper styling # add clearline for proper styling

View File

@ -521,22 +521,32 @@ table.surname tbody tr td.ColumnParents {
div#Relationships { div#Relationships {
margin: 0 auto; margin: 0 auto;
padding: 0; padding: 0;
width: 100%;
} }
table.relationships { table.relationships {
width: 100%; width: 100%;
margin: 0; margin: 0;
padding: 0; padding: 0;
} }
table.relationships thead tr th.ColumnRowLabel {
width: 2%;
}
table.relationships thead tr th.ColumnPartner {
width: 30%;
}
table.relationships thead tr th.ColumnMarriage, table.relationships thead tr th.ColumnMarriage,
table.relationships thead tr th.ColumnDivorce { table.relationships thead tr th.ColumnDivorce {
width: 10%; width: 10%;
} }
table.relationships thead tr th.ColumnMedia { table.relationships tbody tr td.BeginLetter {
width: 15%; border-bottom: solid 1px #000;
} }
table.relationships tbody tr td { table.relationships tbody tr td {
border-bottom: dashed 1px #000; border-bottom: dashed 1px #000;
} }
table.relationships tbody tr td.ColumnRowLabel a {
background: none;
}
table.relationships tbody tr td.ColumnPartner { table.relationships tbody tr td.ColumnPartner {
font-size: 100%; font-size: 100%;
} }