Align gramps34 and trunk (where there is no functional difference) - minor layout changes etc.

svn: r20681
This commit is contained in:
Tim G L Lyons 2012-11-18 20:33:09 +00:00
parent 7576054885
commit 200cb60db3

View File

@ -66,7 +66,6 @@ from collections import defaultdict
from xml.sax.saxutils import escape from xml.sax.saxutils import escape
from operator import itemgetter from operator import itemgetter
from decimal import Decimal, getcontext from decimal import Decimal, getcontext
getcontext().prec = 8 getcontext().prec = 8
@ -1644,8 +1643,8 @@ class BasePage(object):
# is the style sheet either Basic-Blue or Visually Impaired, # is the style sheet either Basic-Blue or Visually Impaired,
# and menu layout is Drop Down? # and menu layout is Drop Down?
if (self.report.css == _("Basic-Blue") or if (self.report.css == _("Basic-Blue") or
self.report.css == _("Visually Impaired")): self.report.css == _("Visually Impaired")) and \
if self.report.navigation == "dropdown": self.report.navigation == "dropdown":
body += self.display_drop_menu() body += self.display_drop_menu()
else: else:
body += self.display_nav_links(title) body += self.display_nav_links(title)
@ -3043,8 +3042,7 @@ class FamilyPages(BasePage):
# place_lat_long violate modularity and should be removed. # place_lat_long violate modularity and should be removed.
report.user.begin_progress(_("Narrated Web Site Report"), report.user.begin_progress(_("Narrated Web Site Report"),
_("Creating family pages..."), _("Creating family pages..."),
len(db_family_handles) + 1) len(self.family_dict) + 1)
db_family_handles = []
self.FamilyListPage(report, report.title, ind_list, self.FamilyListPage(report, report.title, ind_list,
db_family_handles) db_family_handles)
@ -3365,7 +3363,8 @@ class PlacePages(BasePage):
citation_handle, place_fname, citation_handle, place_fname,
place_name, place.gramps_id) place_name, place.gramps_id)
def display_pages(self, report, title, place_list, source_list): def display_pages(self, report, title, place_list, source_list,
db_place_handles):
# FIXME: Most of the parameters should be removed. report is passed to # FIXME: Most of the parameters should be removed. report is passed to
# __init__, title appears not to be used and place_list, source_list and # __init__, title appears not to be used and place_list, source_list and
# db_place_handles violate modularity and should be removed. # db_place_handles violate modularity and should be removed.
@ -3382,11 +3381,11 @@ class PlacePages(BasePage):
_("Creating place pages"), _("Creating place pages"),
len(place_list) + 1) len(place_list) + 1)
self.PlaceListPage(report, title, place_list) self.PlaceListPage(report, title, place_list, db_place_handles)
for place in place_list: for place in place_list:
report.user.step_progress() report.user.step_progress()
self.PlacePage(report, title, place, source_list, place_list) self.PlacePage(report, title, place, source_list, place_list, db_place_handles)
report.user.end_progress() report.user.end_progress()
pass pass
@ -3491,6 +3490,7 @@ class PlacePages(BasePage):
else: else:
tcell1 += ' ' tcell1 += ' '
tcell2 += ' ' tcell2 += ' '
db_place_handles.append(place_handles)
# add clearline for proper styling # add clearline for proper styling
# add footer section # add footer section
@ -3705,7 +3705,7 @@ class EventPages(BasePage):
len(event_handle_list) + 1) len(event_handle_list) + 1)
self.EventListPage(report, title, event_types, self.EventListPage(report, title, event_types,
event_handle_list, event_handle_list,
ind_list) ind_list, db_event_handles)
for event_handle in event_handle_list: for event_handle in event_handle_list:
report.user.step_progress() report.user.step_progress()
@ -3713,10 +3713,8 @@ class EventPages(BasePage):
report.user.end_progress() report.user.end_progress()
return event_handle_list
def EventListPage(self, report, title, event_types, event_handle_list, def EventListPage(self, report, title, event_types, event_handle_list,
ppl_handle_list): ppl_handle_list, db_event_handles):
""" """
Will create the event list page Will create the event list page
@ -3771,9 +3769,7 @@ class EventPages(BasePage):
prev_letter = "" prev_letter = ""
# separate events by their type and then thier event handles # separate events by their type and then thier event handles
for (evt_type, data_list) in sort_event_types(self.dbase_, for (evt_type, data_list) in sort_event_types(self.dbase_, event_types, event_handle_list):
event_types,
event_handle_list):
first_letter = True first_letter = True
_EVENT_DISPLAYED = [] _EVENT_DISPLAYED = []
@ -3858,6 +3854,7 @@ class EventPages(BasePage):
_EVENT_DISPLAYED.append(gid) _EVENT_DISPLAYED.append(gid)
first_event = False first_event = False
db_event_handles.append(event_handle)
# add clearline for proper styling # add clearline for proper styling
# add footer section # add footer section
@ -4315,8 +4312,6 @@ class SourcePages(BasePage):
self.SourcePage(report, title, item) self.SourcePage(report, title, item)
report.user.end_progress() report.user.end_progress()
pass
def SourceListPage(self, report, title, source_handles): def SourceListPage(self, report, title, source_handles):
""" """
@ -4439,6 +4434,7 @@ class SourcePages(BasePage):
# add section title # add section title
sourcedetail += Html("h3", html_escape(source.get_title()), inline = True) sourcedetail += Html("h3", html_escape(source.get_title()), inline = True)
# begin sources table
with Html("table", class_ = "infolist source") as table: with Html("table", class_ = "infolist source") as table:
sourcedetail += table sourcedetail += table
@ -7455,9 +7451,6 @@ class NavWebReport(Report):
str(value)) str(value))
return return
# copy all of the neccessary files for NarrativeWeb report...
self.copy_narrated_files()
# for use with discovering biological, half, and step siblings for use # for use with discovering biological, half, and step siblings for use
# in display_ind_parents()... # in display_ind_parents()...
rel_class = get_relationship_calculator() rel_class = get_relationship_calculator()
@ -7571,20 +7564,20 @@ class NavWebReport(Report):
if self.inc_families: if self.inc_families:
self.tab["Family"].display_pages(self, ind_list, place_list, self.tab["Family"].display_pages(self, ind_list, place_list,
place_lat_long, db_family_handles) place_lat_long, db_family_handles)
# db_family_handles = self.F(ind_list, place_list, place_lat_long) # self.family_pages(ind_list, place_list, place_lat_long, db_family_handles)
# build classes EventListPage and EventPage # build classes EventListPage and EventPage
db_event_handles = [] db_event_handles = []
if self.inc_events: if self.inc_events:
self.tab["Event"].display_pages(self, self.title, ind_list, self.tab["Event"].display_pages(self, self.title, ind_list,
db_event_handles) db_event_handles)
# db_event_handles = self.event_pages(ind_list) # self.event_pages(ind_list, db_event_handles)
# build classes PlaceListPage and PlacePage # build classes PlaceListPage and PlacePage
# db_place_handles = [] db_place_handles = []
self.tab["Place"].display_pages(self, self.title, place_list, self.tab["Place"].display_pages(self, self.title, place_list,
source_list) source_list, db_place_handles)
# db_place_handles = self.place_pages(place_list, source_list)
# build classes RepositoryListPage and RepositoryPage # build classes RepositoryListPage and RepositoryPage
db_repository_handles = [] db_repository_handles = []
if self.inc_repository: if self.inc_repository:
@ -7593,7 +7586,6 @@ class NavWebReport(Report):
self.tab["Repository"].display_pages(self, self.title, self.tab["Repository"].display_pages(self, self.title,
repolist, source_list, repolist, source_list,
db_repository_handles) db_repository_handles)
# db_repository_handles = self.repository_pages(repolist, source_list)
# build classes MediaListPage and MediaPage # build classes MediaListPage and MediaPage
db_media_handles = [] db_media_handles = []
@ -7609,14 +7601,16 @@ class NavWebReport(Report):
if self.inc_addressbook: if self.inc_addressbook:
self.addressbook_pages(ind_list) self.addressbook_pages(ind_list)
# for use in class SourcePage's Citations Referents section... database_handles_list = (db_family_handles, db_event_handles, db_place_handles,
# database_handles_list = (db_family_handles, db_event_handles, db_place_handles, db_repository_handles, db_media_handles)
# db_repository_handles, db_media_handles)
# build classes SourceListPage and SourcePage # build classes SourceListPage and SourcePage
# has been moved so that all Sources can be found before processing... # has been moved so that all Sources can be found before processing...
self.tab["Source"].display_pages(self, self.title, source_list) self.tab["Source"].display_pages(self, self.title, source_list)
# copy all of the neccessary files for NarrativeWeb report...
self.copy_narrated_files()
# if an archive is being used, close it? # if an archive is being used, close it?
if self.archive: if self.archive:
self.archive.close() self.archive.close()
@ -7808,7 +7802,7 @@ class NavWebReport(Report):
self.user.step_progress() self.user.step_progress()
self.user.end_progress() self.user.end_progress()
# def family_pages(self, ppl_handle_list, place_list, place_lat_long): # def family_pages(self, ppl_handle_list, place_list, place_lat_long, db_family_handles):
# """ # """
# creates the FamiliesListPage and FamilyPages # creates the FamiliesListPage and FamilyPages
# """ # """
@ -7823,7 +7817,6 @@ class NavWebReport(Report):
# self.user.step_progress() # self.user.step_progress()
# self.user.end_progress() # self.user.end_progress()
# def place_pages(self, place_list, source_list, db_place_handles): # def place_pages(self, place_list, source_list, db_place_handles):
# """ # """
# creates PlaceListPage and PlacePage # creates PlaceListPage and PlacePage
@ -7833,7 +7826,6 @@ class NavWebReport(Report):
# #
# PlaceListPage(self, self.title, place_list, db_place_handles) # PlaceListPage(self, self.title, place_list, db_place_handles)
# #
# for place in place_list: # for place in place_list:
# PlacePage(self, self.title, place, source_list, place_list) # PlacePage(self, self.title, place, source_list, place_list)
# self.user.step_progress() # self.user.step_progress()
@ -7884,8 +7876,6 @@ class NavWebReport(Report):
# prev = photo_handle # prev = photo_handle
# index += 1 # index += 1
# self.user.end_progress() # self.user.end_progress()
#
# return photo_keys
def thumbnail_preview_page(self): def thumbnail_preview_page(self):
""" """