Making code changes that will make things more consistent in style.
svn: r18697
This commit is contained in:
parent
00ac7302d3
commit
01e049922c
@ -693,21 +693,18 @@ class BasePage(object):
|
|||||||
|
|
||||||
@param: attr = attribute object
|
@param: attr = attribute object
|
||||||
"""
|
"""
|
||||||
|
|
||||||
trow = Html("tr")
|
trow = Html("tr")
|
||||||
|
|
||||||
# display attribute list
|
|
||||||
trow.extend(
|
trow.extend(
|
||||||
Html("td", data or " ", class_ = "Column" + colclass,
|
Html("td", data or " ", class_ = colclass,
|
||||||
inline = True if (colclass == "Type" or "Sources") else False)
|
inline = True if (colclass == "Type" or "Sources") else False)
|
||||||
for (colclass, data) in [
|
for (data, colclass) in [
|
||||||
["Type", str(attr.get_type()) ],
|
(str(attr.get_type()), "ColumnType"),
|
||||||
["Value", attr.get_value() ],
|
(attr.get_value(), "ColumnValue"),
|
||||||
["Notes", self.dump_notes(attr.get_note_list()) ],
|
(self.dump_notes(attr.get_note_list()), "ColumnNotes"),
|
||||||
["Sources", self.get_citation_links(attr.get_citation_list()) ] ]
|
(self.get_citation_links(attr.get_citation_list()), "ColumnSources")
|
||||||
|
]
|
||||||
)
|
)
|
||||||
|
|
||||||
# return table row to its caller
|
|
||||||
return trow
|
return trow
|
||||||
|
|
||||||
def get_citation_links(self, citation_handle_list):
|
def get_citation_links(self, citation_handle_list):
|
||||||
@ -1069,14 +1066,15 @@ class BasePage(object):
|
|||||||
thead += trow
|
thead += trow
|
||||||
|
|
||||||
trow.extend(
|
trow.extend(
|
||||||
Html("th", label, class_ = "Column" + colclass, inline = True)
|
Html("th", label, class_ = colclass, inline = True)
|
||||||
for (label, colclass) in [
|
for (label, colclass) in [
|
||||||
[THEAD, "LDSType"],
|
[_("Type"), "ColumnLDSType"],
|
||||||
[DHEAD, "LDSDate"],
|
[_("Date"), "ColumnDate"],
|
||||||
[TEMPLE, "LDSTemple"],
|
[_("Temple"), "ColumnLDSTemple"],
|
||||||
[PHEAD, "LDSPlace"],
|
[_("Place"), "ColumnLDSPlace"],
|
||||||
[ST, "LDSStatus"],
|
[_("Status"), "ColumnLDSStatus"],
|
||||||
[SHEAD, "LDSSources"] ]
|
[_("Sources"), "ColumnLDSSources"]
|
||||||
|
]
|
||||||
)
|
)
|
||||||
|
|
||||||
# start table body
|
# start table body
|
||||||
@ -1090,25 +1088,24 @@ class BasePage(object):
|
|||||||
place = self.dbase_.get_place_from_handle(place_handle)
|
place = self.dbase_.get_place_from_handle(place_handle)
|
||||||
if place:
|
if place:
|
||||||
place_hyper = self.place_link(place_handle, place.get_title(),
|
place_hyper = self.place_link(place_handle, place.get_title(),
|
||||||
place.gramps_id, True)
|
place.get_gramps_id(), True)
|
||||||
|
|
||||||
# begin ordinance rows
|
# begin ordinance rows
|
||||||
trow = Html("tr")
|
trow = Html("tr")
|
||||||
tbody += trow
|
|
||||||
|
|
||||||
trow.extend(
|
trow.extend(
|
||||||
Html("td", value or " ", class_ = "Column" + colclass,
|
Html("td", value or " ", class_ = colclass,
|
||||||
inline = (not value or colclass == "LDSDate"))
|
inline = (not value or colclass == "ColumnDate"))
|
||||||
for (colclass, value) in [
|
for (value, colclass) in [
|
||||||
["LDSType", ord.type2xml() ],
|
(ord.type2xml(), "ColumnType"),
|
||||||
["LDSDate", _dd.display(ord.get_date_object() )],
|
(_dd.display(ord.get_date_object()), "ColumnDate"),
|
||||||
["LDSTemple", ord.get_temple()],
|
(ord.get_temple(), "ColumnLDSTemple"),
|
||||||
["LDSPlace", place_hyper],
|
(place_hyper, "ColumnLDSPlace"),
|
||||||
["LDSStatus", ord.get_status()],
|
(ord.get_status(), "ColumnLDSStatus"),
|
||||||
["LDSSources", self.get_citation_links(ord.get_citation_list() )] ]
|
(self.get_citation_links(ord.get_citation_list()), "ColumnSources")
|
||||||
|
]
|
||||||
)
|
)
|
||||||
|
tbody += trow
|
||||||
# return table to its callers
|
|
||||||
return table
|
return table
|
||||||
|
|
||||||
def write_data_map(self, data_map):
|
def write_data_map(self, data_map):
|
||||||
@ -1264,24 +1261,24 @@ class BasePage(object):
|
|||||||
tbody += trow
|
tbody += trow
|
||||||
|
|
||||||
addr_data_row = [
|
addr_data_row = [
|
||||||
["Date", _dd.display(address.get_date_object() )],
|
(_dd.display(address.get_date_object()), "ColumnDate"),
|
||||||
["Streetaddress", address.get_street()],
|
(address.get_street(), "ColumnStreetAddress"),
|
||||||
["Locality", address.get_locality()],
|
(address.get_locality(), "ColumnLocality"),
|
||||||
["City", address.get_city()],
|
(address.get_city(), "ColumnCity"),
|
||||||
["State", address.get_state()],
|
(address.get_state(), "ColumnState"),
|
||||||
["County", address.get_county()],
|
(address.get_county(), "ColumnCounty"),
|
||||||
["Postslcode", address.get_postal_code()],
|
(address.get_postal_code(), "ColumnPostalCode"),
|
||||||
["Cntry", address.get_country()],
|
(address.get_country(), "ColumnCntry"),
|
||||||
["Phone", address.get_phone()] ]
|
(address.get_phone(), "ColumnPhone")
|
||||||
|
]
|
||||||
|
|
||||||
# get source citation list
|
# get source citation list
|
||||||
if showsrc in [True, None]:
|
if showsrc in [True, None]:
|
||||||
addr_data_row.append(["Sources", self.get_citation_links(
|
addr_data_row.append([self.get_citation_links(address.get_citation_list()), "ColumnSources"])
|
||||||
address.get_citation_list() )])
|
|
||||||
|
|
||||||
trow.extend(
|
trow.extend(
|
||||||
Html("td", value or " ", class_="Column" + colclass, inline=True)
|
Html("td", value or " ", class_= colclass, inline = True)
|
||||||
for (colclass, value) in addr_data_row
|
for (value, colclass) in addr_data_row
|
||||||
)
|
)
|
||||||
|
|
||||||
# address: notelist
|
# address: notelist
|
||||||
@ -1289,8 +1286,6 @@ class BasePage(object):
|
|||||||
notelist = self.display_note_list(address.get_note_list())
|
notelist = self.display_note_list(address.get_note_list())
|
||||||
if notelist is not None:
|
if notelist is not None:
|
||||||
summaryarea += notelist
|
summaryarea += notelist
|
||||||
|
|
||||||
# return summaryarea division to its callers
|
|
||||||
return summaryarea
|
return summaryarea
|
||||||
|
|
||||||
def addressbook_link(self, person_handle, up = False):
|
def addressbook_link(self, person_handle, up = False):
|
||||||
@ -2018,11 +2013,12 @@ class BasePage(object):
|
|||||||
thead += trow
|
thead += trow
|
||||||
|
|
||||||
trow.extend(
|
trow.extend(
|
||||||
Html('th', label, class_ = "Column" + colclass, inline = True)
|
Html('th', label, class_ = colclass, inline = True)
|
||||||
for (label, colclass) in [
|
for (label, colclass) in [
|
||||||
(THEAD, "Type"),
|
(_("Type"), "ColumnType"),
|
||||||
(_("Url"), "Path"),
|
(_("Url"), "ColumnPath"),
|
||||||
(DESCRHEAD, "Description") ]
|
(_("Description"), "ColumnDescription")
|
||||||
|
]
|
||||||
)
|
)
|
||||||
|
|
||||||
tbody = Html("tbody")
|
tbody = Html("tbody")
|
||||||
@ -2054,14 +2050,13 @@ class BasePage(object):
|
|||||||
|
|
||||||
uri = Html("a", uri, href = uri, title = html_escape(descr))
|
uri = Html("a", uri, href = uri, title = html_escape(descr))
|
||||||
trow.extend(
|
trow.extend(
|
||||||
Html("td", data, class_ = "Column" + colclass, inline = True)
|
Html("td", data, class_ = colclass, inline = True)
|
||||||
for (data, colclass) in [
|
for (data, colclass) in [
|
||||||
(str(_type), "Type"),
|
(str(_type), "ColumnType"),
|
||||||
(uri, "Path"),
|
(uri, "ColumnPath"),
|
||||||
(descr, "Description") ]
|
(descr, "ColumnDescription")
|
||||||
|
]
|
||||||
)
|
)
|
||||||
|
|
||||||
# return weblinks to its caller
|
|
||||||
return section
|
return section
|
||||||
|
|
||||||
def display_lds_ordinance(self, db_obj_):
|
def display_lds_ordinance(self, db_obj_):
|
||||||
@ -3470,13 +3465,14 @@ class EventListPage(BasePage):
|
|||||||
thead += trow
|
thead += trow
|
||||||
|
|
||||||
trow.extend(
|
trow.extend(
|
||||||
Html("th", label, class_ = "Column" + colclass, inline = True)
|
Html("th", label, class_ = colclass, inline = True)
|
||||||
for (label, colclass) in [
|
for (label, colclass) in [
|
||||||
[_("Letter"), "Letter"],
|
(_("Letter"), "ColumnRowLabel"),
|
||||||
[THEAD, "Type"],
|
(_("Type"), "ColumnType"),
|
||||||
[DHEAD, "Date"],
|
(_("Date"), "ColumnDate"),
|
||||||
[GRAMPSID, "GRAMPSID"],
|
(_("Gramps ID"), "ColumnGRAMPSID"),
|
||||||
[_PERSON, "Person"] ]
|
(_("Person"), "ColumnPerson")
|
||||||
|
]
|
||||||
)
|
)
|
||||||
|
|
||||||
tbody = Html("tbody")
|
tbody = Html("tbody")
|
||||||
@ -3668,7 +3664,6 @@ class EventPage(BasePage):
|
|||||||
|
|
||||||
for (label, colclass, data) in event_data:
|
for (label, colclass, data) in event_data:
|
||||||
if data:
|
if data:
|
||||||
|
|
||||||
trow = Html("tr") + (
|
trow = Html("tr") + (
|
||||||
Html("td", label, class_ = "ColumnAttribute", inline = True),
|
Html("td", label, class_ = "ColumnAttribute", inline = True),
|
||||||
Html('td', data, class_ = "Column" + colclass)
|
Html('td', data, class_ = "Column" + colclass)
|
||||||
|
Loading…
x
Reference in New Issue
Block a user