Removed coding for splitting the navigation menu: based on user screen resolution; instead it will break up the menu based of a screen resolution of 1024 as suggested by Nick Hall in the past.
svn: r18725
This commit is contained in:
parent
19a5a05b4b
commit
f3090242eb
@ -1582,7 +1582,6 @@ class BasePage(object):
|
|||||||
('events', _("Events"), self.report.inc_events),
|
('events', _("Events"), self.report.inc_events),
|
||||||
('places', _("Places"), True),
|
('places', _("Places"), True),
|
||||||
('sources', _("Sources"), True),
|
('sources', _("Sources"), True),
|
||||||
# ("citations", _("Citations"), True),
|
|
||||||
('repositories', _("Repositories"), inc_repos),
|
('repositories', _("Repositories"), inc_repos),
|
||||||
('media', _("Media"), _create_media_link),
|
('media', _("Media"), _create_media_link),
|
||||||
('thumbnails', _("Thumbnails"), True),
|
('thumbnails', _("Thumbnails"), True),
|
||||||
@ -1595,14 +1594,7 @@ class BasePage(object):
|
|||||||
menu_items = [[url, text] for url, text in navs]
|
menu_items = [[url, text] for url, text in navs]
|
||||||
|
|
||||||
number_items = len(menu_items)
|
number_items = len(menu_items)
|
||||||
|
num_cols = 10
|
||||||
# if screen width is equal or less than 1024px then break the
|
|
||||||
# navigation menu into two lines if there are more links than one line?
|
|
||||||
# main_scr_width = self.uistate.screen_width()
|
|
||||||
|
|
||||||
num_cols = 16
|
|
||||||
# if main_scr_width <= 1024:
|
|
||||||
# num_cols = 11
|
|
||||||
num_rows = (number_items // num_cols) + 1
|
num_rows = (number_items // num_cols) + 1
|
||||||
|
|
||||||
# begin navigation menu division...
|
# begin navigation menu division...
|
||||||
@ -1630,39 +1622,39 @@ class BasePage(object):
|
|||||||
# elements for Navigation styling.
|
# elements for Navigation styling.
|
||||||
|
|
||||||
# Figure out if we need <li class="CurrentSection"> of just <li>
|
# Figure out if we need <li class="CurrentSection"> of just <li>
|
||||||
cs = False
|
check_cs = False
|
||||||
if nav_text == currentsection:
|
if nav_text == currentsection:
|
||||||
cs = True
|
check_cs = True
|
||||||
elif nav_text == _("Surnames"):
|
elif nav_text == _("Surnames"):
|
||||||
if "srn" in self.report.cur_fname:
|
if "srn" in self.report.cur_fname:
|
||||||
cs = True
|
check_cs = True
|
||||||
elif _("Surnames") in currentsection:
|
elif _("Surnames") in currentsection:
|
||||||
cs = True
|
check_cs = True
|
||||||
elif nav_text == _("Individuals"):
|
elif nav_text == _("Individuals"):
|
||||||
if "ppl" in self.report.cur_fname:
|
if "ppl" in self.report.cur_fname:
|
||||||
cs = True
|
check_cs = True
|
||||||
elif nav_text == _("Families"):
|
elif nav_text == _("Families"):
|
||||||
if "fam" in self.report.cur_fname:
|
if "fam" in self.report.cur_fname:
|
||||||
cs = True
|
check_cs = True
|
||||||
elif nav_text == _("Sources"):
|
elif nav_text == _("Sources"):
|
||||||
if "src" in self.report.cur_fname:
|
if "src" in self.report.cur_fname:
|
||||||
cs = True
|
check_cs = True
|
||||||
elif nav_text == _("Places"):
|
elif nav_text == _("Places"):
|
||||||
if "plc" in self.report.cur_fname:
|
if "plc" in self.report.cur_fname:
|
||||||
cs = True
|
check_cs = True
|
||||||
elif nav_text == _("Events"):
|
elif nav_text == _("Events"):
|
||||||
if "evt" in self.report.cur_fname:
|
if "evt" in self.report.cur_fname:
|
||||||
cs = True
|
check_cs = True
|
||||||
elif nav_text == _("Media"):
|
elif nav_text == _("Media"):
|
||||||
if "img" in self.report.cur_fname:
|
if "img" in self.report.cur_fname:
|
||||||
cs = True
|
check_cs = True
|
||||||
elif nav_text == _("Address Book"):
|
elif nav_text == _("Address Book"):
|
||||||
if "addr" in self.report.cur_fname:
|
if "addr" in self.report.cur_fname:
|
||||||
cs = True
|
check_cs = True
|
||||||
cs = 'class = "CurrentSection"' if cs else False
|
check_cs = 'class = "CurrentSection"' if check_cs else False
|
||||||
if cs:
|
if check_cs:
|
||||||
unordered.extend(
|
unordered.extend(
|
||||||
Html("li", hyper, attr = cs, inline = True)
|
Html("li", hyper, attr = check_cs, inline = True)
|
||||||
)
|
)
|
||||||
else:
|
else:
|
||||||
unordered.extend(
|
unordered.extend(
|
||||||
@ -4469,12 +4461,11 @@ class SourcePage(BasePage):
|
|||||||
family.get_gramps_id(), self.up)
|
family.get_gramps_id(), self.up)
|
||||||
|
|
||||||
if (spouse_handle and spouse_handle in ppl_handle_list):
|
if (spouse_handle and spouse_handle in ppl_handle_list):
|
||||||
spouse = self.dbase_.get+person_from_handle(spouse_handle)
|
spouse = self.dbase_.get_person_from_handle(spouse_handle)
|
||||||
if spouse:
|
if spouse:
|
||||||
spouse_name = self.get_name(spouse)
|
spouse_name = self.get_name(spouse)
|
||||||
spouse_link = self.family_link(family_handle, spouse_name,
|
spouse_link = self.family_link(family_handle, spouse_name,
|
||||||
family.get_gramps_id(), self.up)
|
family.get_gramps_id(), self.up)
|
||||||
|
|
||||||
|
|
||||||
if spouse and husband:
|
if spouse and husband:
|
||||||
ordered3.extend(
|
ordered3.extend(
|
||||||
|
Loading…
x
Reference in New Issue
Block a user