Fixed download page table being oversized. Removed download page note from download page. Bug#3795 should be resolved.

svn: r15003
This commit is contained in:
Rob G. Healey 2010-04-03 01:27:16 +00:00
parent d3012d9753
commit 429494fb13
2 changed files with 73 additions and 74 deletions

View File

@ -177,7 +177,7 @@ a:visited {
/* Header
----------------------------------------------------- */
#header {
width:965px;
width: 100%;
margin:0 auto;
padding:5em 0 2px 0;
background:url(../images/Web_Mainz_Header.png) repeat-x top left;
@ -214,7 +214,7 @@ table tr.odd {
----------------------------------------------------- */
#navigation, #subnavigation {
font-family:sans-serif;
width:965px;
width: 100%;
margin:0 auto;
padding:0;
background:url(../images/Web_Mainz_MidLight.png) #FFF2C6;
@ -757,12 +757,12 @@ div#EventDetail table.eventlist tbody tr td.ColumnEvent {
/* Download
----------------------------------------------------- */
#Download {
padding:1cm;
height:396px;
padding: 0;
width: 100%;
height: 350px;
}
table.download {
border:solid 2px #000;
width:100%;
}
table.download img {
text-align: center;
@ -1205,7 +1205,7 @@ table.weblinks tr td.ColumnDescription {
----------------------------------------------------- */
#footer {
clear:both;
width:965px;
width: 100%;
height: 60px;
font-size:12px;
line-height:130%;

View File

@ -3333,7 +3333,6 @@ class DownloadPage(BasePage):
# menu options for class
# download and description #1
downloadnote = self.report.downloadnote
dlfname1 = self.report.dl_fname1
dldescr1 = self.report.dl_descr1
@ -3356,90 +3355,90 @@ class DownloadPage(BasePage):
with Html("div", class_ = "content", id = "Download") as download:
body += download
# download page note
if downloadnote:
note = db.get_note_from_gramps_id(downloadnote)
note_text = self.get_note_format(note)
download += Html("p", note_text, id = "description")
msg = _("This page is for the user/ creator of this Family Tree/ "
"Narrative website to share a couple of files with you "
"regarding their family. If there are any files listed "
"below, clicking on them will allow you to download them.")
download += Html("p", msg, id = "description")
# begin download table and table head
with Html("table", class_ = "infolist download") as table:
download += table
if dlfname1 or dlfname2:
# begin download table and table head
with Html("table", class_ = "infolist download") as table:
download += table
thead = Html("thead")
table += thead
thead = Html("thead")
table += thead
trow = Html("tr")
thead += trow
trow = Html("tr")
thead += trow
header_row = [
(_("File Name"), "Filename"),
(DESCRHEAD, "Description"),
(_("License"), "License"),
(_("Last Modified"), "Modified") ]
trow.extend(
Html("th", label, class_ = colclass, inline = True)
for (label, colclass) in [
(_("File Name"), "Filename"),
(DESCRHEAD, "Description"),
(_("License"), "License"),
(_("Last Modified"), "Modified") ]
)
trow.extend(
Html("th", label, class_ = colclass, inline = True)
for (label, colclass) in header_row)
# if dlfname1 is not None, show it???
if dlfname1:
# if dlfname1 is not None, show it???
if dlfname1:
# table body
tbody = Html("tbody")
table += tbody
# table body
tbody = Html("tbody")
table += tbody
trow = Html("tr", id = 'Row01')
tbody += trow
trow = Html("tr", id = 'Row01')
tbody += trow
fname = os.path.basename(dlfname1)
tcell = ( Html("td", class_ = "Filename") +
Html("a", fname, href = dlfname1, alt = dldescr1)
)
trow += tcell
fname = os.path.basename(dlfname1)
tcell = ( Html("td", class_ = "Filename") +
Html("a", fname, href = dlfname1, alt = dldescr1)
)
trow += tcell
dldescr1 = dldescr1 or " "
trow += Html("td", dldescr1, class_ = "Description", inline = True)
dldescr1 = dldescr1 or " "
trow += Html("td", dldescr1, class_ = "Description", inline = True)
copyright = self.get_copyright_license(dlcopy) or " "
trow += Html("td", copyright, class_ = "License")
copyright = self.get_copyright_license(dlcopy) or " "
trow += Html("td", copyright, class_ = "License")
tcell = Html("td", class_ = "Modified", inline = True)
trow += tcell
if os.path.exists(dlfname1):
modified = os.stat(dlfname1).st_mtime
last_mod = datetime.datetime.fromtimestamp(modified)
tcell += last_mod
else:
tcell += " "
tcell = Html("td", class_ = "Modified", inline = True)
trow += tcell
if os.path.exists(dlfname1):
modified = os.stat(dlfname1).st_mtime
last_mod = datetime.datetime.fromtimestamp(modified)
tcell += last_mod
else:
tcell += " "
# if download filename #2, show it???
if dlfname2:
# if download filename #2, show it???
if dlfname2:
# begin row #2
trow = Html("tr", id = 'Row02')
tbody += trow
# begin row #2
trow = Html("tr", id = 'Row02')
tbody += trow
fname = os.path.basename(dlfname2)
tcell = ( Html("td", class_ = "Filename") +
Html("a", fname, href = dlfname2, alt = dldescr2)
)
trow += tcell
fname = os.path.basename(dlfname2)
tcell = ( Html("td", class_ = "Filename") +
Html("a", fname, href = dlfname2, alt = dldescr2)
)
trow += tcell
dldescr2 = dldescr2 or " "
trow += Html("td", dldescr2, class_ = "Description", inline = True)
dldescr2 = dldescr2 or " "
trow += Html("td", dldescr2, class_ = "Description", inline = True)
copyright = self.get_copyright_license(dlcopy) or " "
trow += Html("td", copyright, class_ = "License", inline = True)
copyright = self.get_copyright_license(dlcopy) or " "
trow += Html("td", copyright, class_ = "License", inline = True)
tcell = Html("td", id = 'Col04', class_ = "Modified", inline = True)
trow += tcell
if os.path.exists(dlfname2):
modified = os.stat(dlfname2).st_mtime
last_mod = datetime.datetime.fromtimestamp(modified)
tcell += last_mod
else:
tcell += " "
tcell = Html("td", id = 'Col04', class_ = "Modified", inline = True)
trow += tcell
if os.path.exists(dlfname2):
modified = os.stat(dlfname2).st_mtime
last_mod = datetime.datetime.fromtimestamp(modified)
tcell += last_mod
else:
tcell += " "
# clear line for proper styling
# create footer section