Cleanup of class PlaceListPage and PlacePage, dump_places(). Add the elements for the PlaceListPage.
svn: r15533
This commit is contained in:
parent
937c8368ac
commit
69df521213
@ -512,12 +512,19 @@ table.individuallist tbody tr td.ColumnName a:hover {
|
|||||||
|
|
||||||
/* Places
|
/* Places
|
||||||
----------------------------------------------------- */
|
----------------------------------------------------- */
|
||||||
|
div#Places table.infolist tbody tr td.ColumnLetter {
|
||||||
|
width: 3%;
|
||||||
|
}
|
||||||
#Places table.infolist tbody tr td.ColumnName {
|
#Places table.infolist tbody tr td.ColumnName {
|
||||||
padding:0;
|
padding:0;
|
||||||
}
|
}
|
||||||
#Places table.infolist tbody tr td.ColumnName a {
|
#Places table.infolist tbody tr td.ColumnName a {
|
||||||
padding:.1em 10px .3em 10px;
|
padding:.1em 10px .3em 10px;
|
||||||
}
|
}
|
||||||
|
div#Places table.infolist tbody tr td.ColumnLatitude,
|
||||||
|
div#Places table.infolist tbody tr td.ColumnLongitude {
|
||||||
|
width; 11%;
|
||||||
|
}
|
||||||
|
|
||||||
/* EventList and EventDetail
|
/* EventList and EventDetail
|
||||||
----------------------------------------------------- */
|
----------------------------------------------------- */
|
||||||
|
@ -517,9 +517,6 @@ div#Places {
|
|||||||
margin: 0;
|
margin: 0;
|
||||||
padding: 0;
|
padding: 0;
|
||||||
}
|
}
|
||||||
div#Places table.infolist tbody tr td.ColumnLetter {
|
|
||||||
width: 6%;
|
|
||||||
}
|
|
||||||
div#Places table.infolist tbody tr td.ColumnLetter a:hover {
|
div#Places table.infolist tbody tr td.ColumnLetter a:hover {
|
||||||
background: none;
|
background: none;
|
||||||
}
|
}
|
||||||
@ -532,9 +529,13 @@ div#Places table.infolist tbody tr td.ColumnState {
|
|||||||
div#Places table.infolist tbody tr td.ColumnCountry {
|
div#Places table.infolist tbody tr td.ColumnCountry {
|
||||||
width: 8%;
|
width: 8%;
|
||||||
}
|
}
|
||||||
div#Places table.infolist tbody tr td.ColumnCoordinates {
|
div#Places table.infolist tbody tr td.ColumnLatitude {
|
||||||
width: 25%;
|
width: 11%;
|
||||||
}
|
}
|
||||||
|
div#Places table.infolist tbody tr td.ColumnLongitude {
|
||||||
|
width: 11%;
|
||||||
|
}
|
||||||
|
|
||||||
div#PlaceDetail {
|
div#PlaceDetail {
|
||||||
margin: 0;
|
margin: 0;
|
||||||
padding: 0;
|
padding: 0;
|
||||||
@ -551,8 +552,8 @@ div#PlaceDetail h5 {
|
|||||||
float: center;
|
float: center;
|
||||||
vertical-align: middle;
|
vertical-align: middle;
|
||||||
}
|
}
|
||||||
div#PlaceDetail table.infolist tbody tr td.ColumnRowLabel,
|
|
||||||
div#PlaceDetail table.infolist tbody tr td.ColumnType,
|
div#PlaceDetail table.infolist tbody tr td.ColumnType,
|
||||||
|
div#PlaceDetail table.infolist tbody tr td.ColumnPath,
|
||||||
div#PlaceDetail table.infolist tbody tr td.ColumnValue {
|
div#PlaceDetail table.infolist tbody tr td.ColumnValue {
|
||||||
color: Navy;
|
color: Navy;
|
||||||
}
|
}
|
||||||
@ -563,6 +564,7 @@ div#EventList, div#EventDetail {
|
|||||||
margin: 0;
|
margin: 0;
|
||||||
padding: 0;
|
padding: 0;
|
||||||
}
|
}
|
||||||
|
div#PlaceList table.Places tbody tr td.ColumnLatitude {
|
||||||
div#events table.eventlist {
|
div#events table.eventlist {
|
||||||
margin-top: .3cm;
|
margin-top: .3cm;
|
||||||
}
|
}
|
||||||
|
@ -532,12 +532,20 @@ table.individuallist tbody tr td.ColumnName a:hover {
|
|||||||
|
|
||||||
/* Places
|
/* Places
|
||||||
----------------------------------------------------- */
|
----------------------------------------------------- */
|
||||||
|
|
||||||
|
div#Places table.infolist tbody tr td.ColumnLetter {
|
||||||
|
width: 3%;
|
||||||
|
}
|
||||||
#Places table.infolist tbody tr td.ColumnName {
|
#Places table.infolist tbody tr td.ColumnName {
|
||||||
padding:0;
|
padding:0;
|
||||||
}
|
}
|
||||||
#Places table.infolist tbody tr td.ColumnName a {
|
#Places table.infolist tbody tr td.ColumnName a {
|
||||||
padding:.1em 10px .3em 10px;
|
padding:.1em 10px .3em 10px;
|
||||||
}
|
}
|
||||||
|
div#Places table.infolist tbody tr td.ColumnLatitude,
|
||||||
|
div#Places table.infolist tbody tr td.ColumnLongitude {
|
||||||
|
width: 11%;
|
||||||
|
}
|
||||||
|
|
||||||
/* EventList and EventDetail
|
/* EventList and EventDetail
|
||||||
----------------------------------------------------- */
|
----------------------------------------------------- */
|
||||||
|
@ -476,12 +476,20 @@ table.individuallist tbody tr td.ColumnName a:hover {
|
|||||||
|
|
||||||
/* Places
|
/* Places
|
||||||
----------------------------------------------------- */
|
----------------------------------------------------- */
|
||||||
|
|
||||||
|
div#Places table.infolist tbody tr td.ColumnLetter {
|
||||||
|
width: 3%;
|
||||||
|
}
|
||||||
#Places table.infolist tbody tr td.ColumnName {
|
#Places table.infolist tbody tr td.ColumnName {
|
||||||
padding:0;
|
padding:0;
|
||||||
}
|
}
|
||||||
#Places table.infolist tbody tr td.ColumnName a {
|
#Places table.infolist tbody tr td.ColumnName a {
|
||||||
padding:.1em 10px .3em 10px;
|
padding:.1em 10px .3em 10px;
|
||||||
}
|
}
|
||||||
|
div#Places table.infolist tbody tr td.ColumnLatitude,
|
||||||
|
div#Places table.infolist tbody tr td.ColumnLongitude {
|
||||||
|
width: 11%;
|
||||||
|
}
|
||||||
|
|
||||||
/* EventList and EventDetail
|
/* EventList and EventDetail
|
||||||
----------------------------------------------------- */
|
----------------------------------------------------- */
|
||||||
|
@ -480,12 +480,20 @@ table.individuallist tbody tr td.ColumnName a:hover {
|
|||||||
|
|
||||||
/* Places
|
/* Places
|
||||||
----------------------------------------------------- */
|
----------------------------------------------------- */
|
||||||
|
|
||||||
|
div#Places table.infolist tbody tr td.ColumnLetter {
|
||||||
|
width: 3%;
|
||||||
|
}
|
||||||
#Places table.infolist tbody tr td.ColumnName {
|
#Places table.infolist tbody tr td.ColumnName {
|
||||||
padding:0;
|
padding:0;
|
||||||
}
|
}
|
||||||
#Places table.infolist tbody tr td.ColumnName a {
|
#Places table.infolist tbody tr td.ColumnName a {
|
||||||
padding:.1em 10px .3em 10px;
|
padding:.1em 10px .3em 10px;
|
||||||
}
|
}
|
||||||
|
div#Places table.infolist tbody tr td.ColumnLatitude,
|
||||||
|
div#Places table.infolist tbody tr td.ColumnLongitude {
|
||||||
|
width: 11%;
|
||||||
|
}
|
||||||
|
|
||||||
/* EventList and EventDetail
|
/* EventList and EventDetail
|
||||||
----------------------------------------------------- */
|
----------------------------------------------------- */
|
||||||
|
@ -478,12 +478,20 @@ table.individuallist tbody tr td.ColumnName a:hover {
|
|||||||
|
|
||||||
/* Places
|
/* Places
|
||||||
----------------------------------------------------- */
|
----------------------------------------------------- */
|
||||||
|
|
||||||
|
div#Places table.infolist tbody tr td.ColumnLetter {
|
||||||
|
width: 3%;
|
||||||
|
}
|
||||||
#Places table.infolist tbody tr td.ColumnName {
|
#Places table.infolist tbody tr td.ColumnName {
|
||||||
padding:0;
|
padding:0;
|
||||||
}
|
}
|
||||||
#Places table.infolist tbody tr td.ColumnName a {
|
#Places table.infolist tbody tr td.ColumnName a {
|
||||||
padding:.1em 10px .3em 10px;
|
padding:.1em 10px .3em 10px;
|
||||||
}
|
}
|
||||||
|
div#Places table.infolist tbody tr td.ColumnLatitude,
|
||||||
|
div#Places table.infolist tbody tr td.ColumnLongitude {
|
||||||
|
width: 11%;
|
||||||
|
}
|
||||||
|
|
||||||
/* EventList and EventDetail
|
/* EventList and EventDetail
|
||||||
----------------------------------------------------- */
|
----------------------------------------------------- */
|
||||||
|
@ -533,8 +533,9 @@ table.individuallist tbody tr td.ColumnName a {
|
|||||||
|
|
||||||
/* Places
|
/* Places
|
||||||
----------------------------------------------------- */
|
----------------------------------------------------- */
|
||||||
#Places table.infolist {
|
|
||||||
margin:0 auto;
|
div#Places table.infolist tbody tr td.ColumnLetter {
|
||||||
|
width: 3%;
|
||||||
}
|
}
|
||||||
#Places table.infolist tbody tr td.ColumnName {
|
#Places table.infolist tbody tr td.ColumnName {
|
||||||
padding:0;
|
padding:0;
|
||||||
@ -542,6 +543,10 @@ table.individuallist tbody tr td.ColumnName a {
|
|||||||
#Places table.infolist tbody tr td.ColumnName a {
|
#Places table.infolist tbody tr td.ColumnName a {
|
||||||
padding:.1em 10px .3em 10px;
|
padding:.1em 10px .3em 10px;
|
||||||
}
|
}
|
||||||
|
div#Places table.infolist tbody tr td.ColumnLatitude,
|
||||||
|
div#Places table.infolist tbody tr td.ColumnLongitude {
|
||||||
|
width: 11%;
|
||||||
|
}
|
||||||
|
|
||||||
/* EventList and EventDetail
|
/* EventList and EventDetail
|
||||||
----------------------------------------------------- */
|
----------------------------------------------------- */
|
||||||
|
@ -509,16 +509,19 @@ table.individuallist tbody tr td.ColumnName a:hover {
|
|||||||
|
|
||||||
/* Places
|
/* Places
|
||||||
----------------------------------------------------- */
|
----------------------------------------------------- */
|
||||||
#Places { }
|
|
||||||
|
div#Places table.infolist tbody tr td.ColumnLetter {
|
||||||
|
width: 3%;
|
||||||
|
}
|
||||||
#Places table.infolist tbody tr td.ColumnName {
|
#Places table.infolist tbody tr td.ColumnName {
|
||||||
padding:0;
|
padding:0;
|
||||||
background-color:#FFF;
|
|
||||||
}
|
}
|
||||||
#Places table.infolist tbody tr td.ColumnName a {
|
#Places table.infolist tbody tr td.ColumnName a {
|
||||||
padding:.1em 10px .3em 10px;
|
padding:.1em 10px .3em 10px;
|
||||||
}
|
}
|
||||||
#Places table.infolist tbody tr td.ColumnName a:hover {
|
div#Places table.infolist tbody tr td.ColumnLatitude,
|
||||||
background-color:#C1B398;
|
div#Places table.infolist tbody tr td.ColumnLongitude {
|
||||||
|
width: 11%;
|
||||||
}
|
}
|
||||||
|
|
||||||
/* EventList and EventDetail
|
/* EventList and EventDetail
|
||||||
|
@ -400,9 +400,16 @@ div#IndividualDetail div.subsection table tr td:first-child {
|
|||||||
|
|
||||||
/* Places
|
/* Places
|
||||||
----------------------------------------------------- */
|
----------------------------------------------------- */
|
||||||
div#Places {
|
|
||||||
margin: 0;
|
div#Places table.infolist tbody tr td.ColumnLetter {
|
||||||
padding: 0;
|
width: 3%;
|
||||||
|
}
|
||||||
|
#Places table.infolist tbody tr td.ColumnName {
|
||||||
|
padding:0;
|
||||||
|
}
|
||||||
|
div#Places table.infolist tbody tr td.ColumnLatitude,
|
||||||
|
div#Places table.infolist tbody tr td.ColumnLongitude {
|
||||||
|
width: 11%;
|
||||||
}
|
}
|
||||||
|
|
||||||
/* EventList and EventDetail
|
/* EventList and EventDetail
|
||||||
|
@ -512,22 +512,20 @@ div#IndividualDetail div.subsection table tr td:first-child {
|
|||||||
|
|
||||||
/* Places
|
/* Places
|
||||||
----------------------------------------------------- */
|
----------------------------------------------------- */
|
||||||
#Places {
|
|
||||||
margin: 0;
|
div#Places table.infolist tbody tr td.ColumnLetter {
|
||||||
padding: 0;
|
width: 3%;
|
||||||
}
|
|
||||||
#Places table.infolist tbody tr td.ColumnLetter {
|
|
||||||
background-color: #D8F3D6;
|
|
||||||
}
|
|
||||||
#Places table.infolist tbody tr td.ColumnLetter a:hover {
|
|
||||||
background: none;
|
|
||||||
}
|
}
|
||||||
#Places table.infolist tbody tr td.ColumnName {
|
#Places table.infolist tbody tr td.ColumnName {
|
||||||
background-color: #FFF;
|
padding:0;
|
||||||
}
|
}
|
||||||
#Places table.infolist tbody tr td.ColumnName a {
|
#Places table.infolist tbody tr td.ColumnName a {
|
||||||
padding:.1em 10px .3em 10px;
|
padding:.1em 10px .3em 10px;
|
||||||
}
|
}
|
||||||
|
div#Places table.infolist tbody tr td.ColumnLatitude,
|
||||||
|
div#Places table.infolist tbody tr td.ColumnLongitude {
|
||||||
|
width: 11%;
|
||||||
|
}
|
||||||
|
|
||||||
/* EventList and EventDetail
|
/* EventList and EventDetail
|
||||||
----------------------------------------------------- */
|
----------------------------------------------------- */
|
||||||
|
@ -1856,11 +1856,12 @@ class BasePage(object):
|
|||||||
trow = Html("tr")
|
trow = Html("tr")
|
||||||
tbody += trow
|
tbody += trow
|
||||||
|
|
||||||
trow.extend(
|
if data:
|
||||||
(Html("td", label, class_ = "ColumnAttribute", inline = True) +
|
trow.extend(
|
||||||
Html("td", data or " ", class_ = "ColumnValue", inline = True)
|
(Html("td", label, class_ = "ColumnAttribute", inline = True) +
|
||||||
)
|
Html("td", data or " ", class_ = "ColumnValue", inline = True)
|
||||||
)
|
)
|
||||||
|
)
|
||||||
|
|
||||||
# return place table to its callers
|
# return place table to its callers
|
||||||
return table
|
return table
|
||||||
@ -2281,13 +2282,16 @@ class PlaceListPage(BasePage):
|
|||||||
|
|
||||||
trow = Html("tr")
|
trow = Html("tr")
|
||||||
thead += trow
|
thead += trow
|
||||||
trow.extend( Html("th", label, class_ = "Column" + colclass, inline = True)
|
|
||||||
for label, colclass in [
|
trow.extend(
|
||||||
[_("Letter"), "Letter"],
|
Html("th", label, class_ = "Column" + colclass, inline = True)
|
||||||
[_("Place Name | Name"), "Name"],
|
for (label, colclass) in [
|
||||||
[_("State"), "State"],
|
[" ", "Letter"],
|
||||||
[_("Country"), "Country"],
|
[_("Place Name | Name"), "Name"],
|
||||||
[_("Latitude/ Longitude"), "Coordinates"] ]
|
[_("State"), "State"],
|
||||||
|
[_("Country"), "Country"],
|
||||||
|
[_("Lat."), "Latitude"],
|
||||||
|
[_("Long."), "Longitude"] ]
|
||||||
)
|
)
|
||||||
|
|
||||||
sort = Sort.Sort(db)
|
sort = Sort.Sort(db)
|
||||||
@ -2307,27 +2311,28 @@ class PlaceListPage(BasePage):
|
|||||||
|
|
||||||
trow = Html("tr")
|
trow = Html("tr")
|
||||||
tbody += trow
|
tbody += trow
|
||||||
|
|
||||||
|
tcell = Html("td", class_ = "ColumnLetter", inline = True)
|
||||||
|
trow += tcell
|
||||||
if letter != last_letter:
|
if letter != last_letter:
|
||||||
last_letter = letter
|
last_letter = letter
|
||||||
trow.attr = 'class = "BeginLetter"'
|
trow.attr = 'class = "BeginLetter"'
|
||||||
|
|
||||||
tcell = ( Html("td", class_ = "ColumnLetter", inline = True) +
|
tcell += Html("a", last_letter, name = last_letter,
|
||||||
Html("a", last_letter, name=last_letter,
|
title = _("Places with letter %s" % last_letter))
|
||||||
title = "Places with letter %s" % last_letter)
|
|
||||||
)
|
|
||||||
else:
|
else:
|
||||||
tcell = Html("td", " ", class_ = "ColumnLetter", inline = True)
|
tcell += " "
|
||||||
trow += tcell
|
|
||||||
|
|
||||||
trow += Html("td", self.place_link(place.handle, place_title, place.gramps_id),
|
trow += Html("td", self.place_link(place.handle, place_title, place.gramps_id),
|
||||||
class_ = "ColumnName")
|
class_ = "ColumnName")
|
||||||
|
|
||||||
trow.extend( Html("td", data, class_ = "Column" + colclass, inline = True)
|
trow.extend(
|
||||||
for colclass, data in [
|
Html("td", data or " ", class_ = "Column" + colclass, inline = True)
|
||||||
["State", ml.state],
|
for (colclass, data) in [
|
||||||
["Country", ml.country],
|
["State", ml.state],
|
||||||
["Coordinates", (place.lat + ", " + place.long) if place.lat and place.long else " "] ]
|
["Country", ml.country],
|
||||||
if data or " "
|
["Latitude", place.lat],
|
||||||
|
["Longitude", place.long] ]
|
||||||
)
|
)
|
||||||
|
|
||||||
# add clearline for proper styling
|
# add clearline for proper styling
|
||||||
@ -2340,7 +2345,6 @@ class PlaceListPage(BasePage):
|
|||||||
self.XHTMLWriter(placelistpage, of)
|
self.XHTMLWriter(placelistpage, of)
|
||||||
|
|
||||||
class PlacePage(BasePage):
|
class PlacePage(BasePage):
|
||||||
|
|
||||||
def __init__(self, report, title, place_handle, src_list, place_list):
|
def __init__(self, report, title, place_handle, src_list, place_list):
|
||||||
"""
|
"""
|
||||||
creates the individual place pages
|
creates the individual place pages
|
||||||
|
Loading…
Reference in New Issue
Block a user