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