Fixed some issues with navigation menu. More refactoring in WebCal. Alphabetized the Makefile.
svn: r12139
This commit is contained in:
parent
86ed7e29c2
commit
a238e7448f
@ -7,18 +7,18 @@ pkgdatadir = $(datadir)/@PACKAGE@/DataViews
|
|||||||
|
|
||||||
pkgdata_PYTHON = \
|
pkgdata_PYTHON = \
|
||||||
__init__.py\
|
__init__.py\
|
||||||
|
EventView.py\
|
||||||
|
FamilyList.py\
|
||||||
GeoView.py\
|
GeoView.py\
|
||||||
GrampletView.py\
|
GrampletView.py\
|
||||||
|
MediaView.py\
|
||||||
|
NoteView.py\
|
||||||
|
PedigreeView.py\
|
||||||
PersonView.py\
|
PersonView.py\
|
||||||
|
PlaceView.py\
|
||||||
RelationView.py\
|
RelationView.py\
|
||||||
FamilyList.py\
|
RepositoryView.py\
|
||||||
PedigreeView.py\
|
SourceView.py
|
||||||
EventView.py\
|
|
||||||
SourceView.py\
|
|
||||||
PlaceView.py\
|
|
||||||
MediaView.py\
|
|
||||||
NoteView.py\
|
|
||||||
RepositoryView.py
|
|
||||||
|
|
||||||
# _MapView.py
|
# _MapView.py
|
||||||
|
|
||||||
|
@ -202,6 +202,7 @@ span.preposition {
|
|||||||
color:#FFF;
|
color:#FFF;
|
||||||
margin:0;
|
margin:0;
|
||||||
padding:.5em 0 0 20px;
|
padding:.5em 0 0 20px;
|
||||||
|
font-style:italic;
|
||||||
}
|
}
|
||||||
p#user_header {
|
p#user_header {
|
||||||
font-size:1.3em;
|
font-size:1.3em;
|
||||||
@ -224,8 +225,8 @@ p#user_header {
|
|||||||
height:32px;
|
height:32px;
|
||||||
margin:0;
|
margin:0;
|
||||||
padding:0 0 0 9px;
|
padding:0 0 0 9px;
|
||||||
background-color:#6AF364;
|
background-color:#228A22;
|
||||||
border-bottom:solid 2px #453619;
|
border-bottom:solid 2px #D8F3D6;
|
||||||
}
|
}
|
||||||
#navigation ul li, #subnavigation ul li {
|
#navigation ul li, #subnavigation ul li {
|
||||||
margin:0;
|
margin:0;
|
||||||
@ -235,10 +236,10 @@ p#user_header {
|
|||||||
display:block;
|
display:block;
|
||||||
float:left;
|
float:left;
|
||||||
font:normal 16px/100% serif;
|
font:normal 16px/100% serif;
|
||||||
color:#542;
|
color:#FFF;
|
||||||
text-decoration:none;
|
text-decoration:none;
|
||||||
margin:0;
|
margin:0;
|
||||||
padding:8px 13px;
|
padding:5px 5px;
|
||||||
|
|
||||||
}
|
}
|
||||||
#navigation ul li a:hover, #subnavigation ul li a:hover {
|
#navigation ul li a:hover, #subnavigation ul li a:hover {
|
||||||
@ -247,7 +248,7 @@ p#user_header {
|
|||||||
}
|
}
|
||||||
#navigation ul li#CurrentSection a, #subnavigation ul li#CurrentSection a {
|
#navigation ul li#CurrentSection a, #subnavigation ul li#CurrentSection a {
|
||||||
font-weight:bold;
|
font-weight:bold;
|
||||||
font-size:19px;
|
font-size:16px;
|
||||||
margin-top:-6px;
|
margin-top:-6px;
|
||||||
padding-top:11px;
|
padding-top:11px;
|
||||||
padding-bottom:8px;
|
padding-bottom:8px;
|
||||||
@ -255,6 +256,7 @@ p#user_header {
|
|||||||
border-left:solid 1px #453619;
|
border-left:solid 1px #453619;
|
||||||
border-bottom:solid 1px #000;
|
border-bottom:solid 1px #000;
|
||||||
background-color:#FFF;
|
background-color:#FFF;
|
||||||
|
color:#000;
|
||||||
}
|
}
|
||||||
#navigation ul li#CurrentSection a:hover {
|
#navigation ul li#CurrentSection a:hover {
|
||||||
background-color:#FFF;
|
background-color:#FFF;
|
||||||
|
@ -179,40 +179,40 @@ class WebCalReport(Report):
|
|||||||
"""
|
"""
|
||||||
def __init__(self, database, options):
|
def __init__(self, database, options):
|
||||||
Report.__init__(self, database, options)
|
Report.__init__(self, database, options)
|
||||||
menu = options.menu
|
mgobn = lambda name:options.menu.get_option_by_name(name).get_value()
|
||||||
mgobn = menu.get_option_by_name
|
|
||||||
|
|
||||||
self.database = database
|
self.database = database
|
||||||
self.options = options
|
self.options = options
|
||||||
|
|
||||||
self.html_dir = mgobn('target').get_value()
|
self.html_dir = mgobn('target')
|
||||||
self.title_text = mgobn('title').get_value()
|
self.title_text = mgobn('title')
|
||||||
filter_option = mgobn('filter')
|
filter_option = options.menu.get_option_by_name('filter')
|
||||||
self.filter = filter_option.get_filter()
|
self.filter = filter_option.get_filter()
|
||||||
self.ext = mgobn('ext').get_value()
|
self.ext = mgobn('ext')
|
||||||
self.copy = mgobn('cright').get_value()
|
self.copy = mgobn('cright')
|
||||||
self.encoding = mgobn('encoding').get_value()
|
self.encoding = mgobn('encoding')
|
||||||
self.css = mgobn('css').get_value()
|
self.css = mgobn('css')
|
||||||
|
|
||||||
self.country = mgobn('country').get_value()
|
self.country = mgobn('country')
|
||||||
self.start_dow = mgobn('start_dow').get_value()
|
self.start_dow = mgobn('start_dow')
|
||||||
|
|
||||||
self.multiyear = mgobn('multiyear').get_value()
|
self.multiyear = mgobn('multiyear')
|
||||||
|
|
||||||
self.start_year = mgobn('start_year').get_value()
|
self.start_year = mgobn('start_year')
|
||||||
self.end_year = mgobn('end_year').get_value()
|
self.end_year = mgobn('end_year')
|
||||||
|
|
||||||
self.fullyear = mgobn('fullyear').get_value()
|
self.fullyear = mgobn('fullyear')
|
||||||
|
|
||||||
self.maiden_name = mgobn('maiden_name').get_value()
|
self.maiden_name = mgobn('maiden_name')
|
||||||
|
|
||||||
self.alive = mgobn('alive').get_value()
|
self.alive = mgobn('alive')
|
||||||
self.birthday = mgobn('birthdays').get_value()
|
self.birthday = mgobn('birthdays')
|
||||||
self.anniv = mgobn('anniversaries').get_value()
|
self.anniv = mgobn('anniversaries')
|
||||||
self.home_link = mgobn('home_link').get_value()
|
self.home_link = mgobn('home_link')
|
||||||
|
|
||||||
self.month_notes = [mgobn('note_' + month).get_value() \
|
self.month_notes = [mgobn('note_' + month) \
|
||||||
for month in ['jan', 'feb', 'mar', 'apr', 'may', 'jun', 'jul', 'aug', 'sep', 'oct', 'nov', 'dec']]
|
for month in ['jan', 'feb', 'mar', 'apr', 'may', 'jun', 'jul',
|
||||||
|
'aug', 'sep', 'oct', 'nov', 'dec']]
|
||||||
|
|
||||||
# identify researcher name and e-mail address
|
# identify researcher name and e-mail address
|
||||||
# as NarrativeWeb already does
|
# as NarrativeWeb already does
|
||||||
@ -1327,7 +1327,7 @@ def _get_regular_surname(sex, name):
|
|||||||
Returns a name string built from the components of the Name instance.
|
Returns a name string built from the components of the Name instance.
|
||||||
"""
|
"""
|
||||||
|
|
||||||
surname = name.surname
|
surname = name.get_surname()
|
||||||
prefix = name.get_surname_prefix()
|
prefix = name.get_surname_prefix()
|
||||||
if prefix:
|
if prefix:
|
||||||
surname = prefix + " " + surname
|
surname = prefix + " " + surname
|
||||||
@ -1344,6 +1344,7 @@ def _get_short_name(person, maiden_name=None):
|
|||||||
primary_name = person.primary_name
|
primary_name = person.primary_name
|
||||||
sex = person.gender
|
sex = person.gender
|
||||||
|
|
||||||
|
call_name = None
|
||||||
married_name = None
|
married_name = None
|
||||||
names = [primary_name] + person.get_alternate_names()
|
names = [primary_name] + person.get_alternate_names()
|
||||||
for name in names:
|
for name in names:
|
||||||
@ -1351,8 +1352,8 @@ def _get_short_name(person, maiden_name=None):
|
|||||||
married_name = name
|
married_name = name
|
||||||
|
|
||||||
# Now, decide which to use:
|
# Now, decide which to use:
|
||||||
if maiden_name is not None:
|
if maiden_name:
|
||||||
if married_name is not None:
|
if married_name:
|
||||||
first_name, family_name = married_name.get_first_name(), _get_regular_surname(sex, married_name)
|
first_name, family_name = married_name.get_first_name(), _get_regular_surname(sex, married_name)
|
||||||
call_name = married_name.get_call_name()
|
call_name = married_name.get_call_name()
|
||||||
else:
|
else:
|
||||||
@ -1362,14 +1363,15 @@ def _get_short_name(person, maiden_name=None):
|
|||||||
first_name, family_name = primary_name.get_first_name(), _get_regular_surname(sex, primary_name)
|
first_name, family_name = primary_name.get_first_name(), _get_regular_surname(sex, primary_name)
|
||||||
call_name = primary_name.get_call_name()
|
call_name = primary_name.get_call_name()
|
||||||
|
|
||||||
# If they have a nickname use it
|
# If they have a nickname, use it?
|
||||||
if call_name is not None and call_name.strip() is not "":
|
if call_name:
|
||||||
first_name = call_name.strip()
|
first_name = call_name.strip()
|
||||||
else: # else just get the first name:
|
else: # else just get the first name:
|
||||||
first_name = first_name.strip()
|
first_name = first_name.strip()
|
||||||
if " " in first_name:
|
if " " in first_name:
|
||||||
# just one split max
|
# just one split max
|
||||||
first_name, rest = first_name.split(" ", 1)
|
first_name, rest = first_name.split(" ", 1)
|
||||||
|
print first_name, family_name
|
||||||
return ("%s %s" % (first_name, family_name)).strip()
|
return ("%s %s" % (first_name, family_name)).strip()
|
||||||
|
|
||||||
# Simple utility list to convert Gramps day-of-week numbering
|
# Simple utility list to convert Gramps day-of-week numbering
|
||||||
|
Loading…
Reference in New Issue
Block a user