5029: again, add attribute table in family infolist table cell
svn: r18162
This commit is contained in:
parent
4f9117e14b
commit
85db1564bb
@ -425,13 +425,13 @@ class BasePage(object):
|
|||||||
|
|
||||||
# display attribute list
|
# display attribute list
|
||||||
trow.extend(
|
trow.extend(
|
||||||
Html("td", data or " ", class_ = colclass,
|
Html("td", data or " ", class_ = "Column" + colclass,
|
||||||
inline = True if (colclass == "Type" or "ColumnSources") else False)
|
inline = True if (colclass == "Type" or "Sources") else False)
|
||||||
for (colclass, data) in [
|
for (colclass, data) in [
|
||||||
["Type", str(attr.get_type()) ],
|
["Type", str(attr.get_type()) ],
|
||||||
["Value", attr.get_value() ],
|
["Value", attr.get_value() ],
|
||||||
["ColumnNotes", self.dump_notes(attr.get_note_list()) ],
|
["Notes", self.dump_notes(attr.get_note_list()) ],
|
||||||
["ColumnSources", self.get_citation_links(attr.get_source_references()) ] ]
|
["Sources", self.get_citation_links(attr.get_source_references()) ] ]
|
||||||
)
|
)
|
||||||
|
|
||||||
# return table row to its caller
|
# return table row to its caller
|
||||||
@ -1020,7 +1020,7 @@ class BasePage(object):
|
|||||||
"""
|
"""
|
||||||
# begin attributes division and section title
|
# begin attributes division and section title
|
||||||
with Html("div", class_ = "subsection", id ="attributes") as section:
|
with Html("div", class_ = "subsection", id ="attributes") as section:
|
||||||
section += Html("h4", _("Attributes"), inline =True)
|
section += Html("h4", AHEAD, inline =True)
|
||||||
|
|
||||||
# begin attributes table
|
# begin attributes table
|
||||||
with Html("table", class_ = "infolist attrlist") as table:
|
with Html("table", class_ = "infolist attrlist") as table:
|
||||||
@ -1052,66 +1052,10 @@ class BasePage(object):
|
|||||||
tbody = Html("tbody")
|
tbody = Html("tbody")
|
||||||
|
|
||||||
tbody.extend(
|
tbody.extend(
|
||||||
self.dump_attribute(attr)
|
self.dump_attribute(attr) for attr in attrlist
|
||||||
for attr in attrlist
|
|
||||||
)
|
)
|
||||||
return tbody
|
return tbody
|
||||||
|
|
||||||
def display_family_attr_list(self, attrlist):
|
|
||||||
"""
|
|
||||||
format for family attribute list is different than all the others
|
|
||||||
"""
|
|
||||||
with Html("div", class_ ="subsection", id ="attributes") as section:
|
|
||||||
with Html("table", class_ ="infolist attributes") as table:
|
|
||||||
section += table
|
|
||||||
|
|
||||||
thead = Html("thead")
|
|
||||||
table += thead
|
|
||||||
|
|
||||||
# for proper spacing...
|
|
||||||
trow = Html("tr")
|
|
||||||
thead += trow
|
|
||||||
|
|
||||||
trow.extend(
|
|
||||||
Html("th", label, class_ =colclass, inline =True)
|
|
||||||
for label, colclass in [
|
|
||||||
(' ', "ColumnType"),
|
|
||||||
(' ', "ColumnAttribute"),
|
|
||||||
(_("Type"), "Type"),
|
|
||||||
(_("Value"), "Value"),
|
|
||||||
(_("Notes"), "Notes"),
|
|
||||||
(_("Sources"), "Sources")
|
|
||||||
]
|
|
||||||
)
|
|
||||||
tbody = Html("tbody")
|
|
||||||
table += tbody
|
|
||||||
|
|
||||||
first_row = True
|
|
||||||
for attr in attrlist:
|
|
||||||
if first_row:
|
|
||||||
trow = Html("tr") + (
|
|
||||||
Html("td", ' ', class_ ="ColumnType", inline =True),
|
|
||||||
Html("td", _("Attributes"), class_ ="ColumnAttribute", inline =True)
|
|
||||||
)
|
|
||||||
else:
|
|
||||||
trow = Html("tr") + (
|
|
||||||
Html("td", ' ', class_ ="ColumnType", inline =True),
|
|
||||||
Html("td", ' ', class_ ="ColumnAttribute", inline =True)
|
|
||||||
)
|
|
||||||
tbody += trow
|
|
||||||
|
|
||||||
trow.extend(
|
|
||||||
Html("td", data or " ", class_ =colclass, inline =True)
|
|
||||||
for colclass, data in [
|
|
||||||
("Type", str(attr.get_type()) ),
|
|
||||||
("Value", attr.get_value() ),
|
|
||||||
("ColumnNotes", self.dump_notes(attr.get_note_list()) ),
|
|
||||||
("ColumnSources", self.get_citation_links(attr.get_source_references()) )
|
|
||||||
]
|
|
||||||
)
|
|
||||||
first_row = False
|
|
||||||
return section
|
|
||||||
|
|
||||||
def write_footer(self):
|
def write_footer(self):
|
||||||
"""
|
"""
|
||||||
Will create and display the footer section of each page...
|
Will create and display the footer section of each page...
|
||||||
@ -3212,7 +3156,7 @@ class MediaPage(BasePage):
|
|||||||
attrlist = media.get_attribute_list()
|
attrlist = media.get_attribute_list()
|
||||||
if attrlist:
|
if attrlist:
|
||||||
section, table = self.display_attribute_header()
|
section, table = self.display_attribute_header()
|
||||||
mediadetail ++ section
|
mediadetail += section
|
||||||
|
|
||||||
table += self.display_attr_list(attrlist)
|
table += self.display_attr_list(attrlist)
|
||||||
|
|
||||||
@ -5254,7 +5198,18 @@ class IndividualPage(BasePage):
|
|||||||
|
|
||||||
attrlist = family.get_attribute_list()
|
attrlist = family.get_attribute_list()
|
||||||
if attrlist:
|
if attrlist:
|
||||||
section += self.display_family_attr_list(attrlist)
|
trow = Html("tr") + (
|
||||||
|
Html("td", " ", class_ = "ColumnType",
|
||||||
|
inline = True),
|
||||||
|
Html("td", AHEAD, class_ = "ColumnAttribute",
|
||||||
|
inline = True)
|
||||||
|
)
|
||||||
|
table += trow
|
||||||
|
tcell = Html("td", class_ = "ColumnValue")
|
||||||
|
trow += tcell
|
||||||
|
dummy, attrtable = self.display_attribute_header()
|
||||||
|
tcell += attrtable
|
||||||
|
attrtable += self.display_attr_list(attrlist)
|
||||||
|
|
||||||
# return section to its caller
|
# return section to its caller
|
||||||
return section
|
return section
|
||||||
|
@ -409,6 +409,9 @@ div#families table.fixed_subtables table.eventlist th:first-child {
|
|||||||
div#families table.fixed_subtables table.eventlist th:last-child {
|
div#families table.fixed_subtables table.eventlist th:last-child {
|
||||||
width: 5em;
|
width: 5em;
|
||||||
}
|
}
|
||||||
|
div#families table.attrlist td.ColumnType {
|
||||||
|
color: #7D5925;
|
||||||
|
}
|
||||||
|
|
||||||
/* SubSection : Gallery
|
/* SubSection : Gallery
|
||||||
-----------------------------------------------------------------*/
|
-----------------------------------------------------------------*/
|
||||||
|
Loading…
x
Reference in New Issue
Block a user