Created CSS elements for WebLinks sections in Individual Pages and AddressBook Pages. Fixed missing hyperlinks and description fields. Problem from Alain Aupeix. No bug tracker created.

svn: r14942
This commit is contained in:
Rob G. Healey 2010-03-27 07:11:10 +00:00
parent ab4e3955ee
commit d50cfb29f1
10 changed files with 274 additions and 43 deletions

View File

@ -4,7 +4,7 @@
#
# Copyright 2008 Jason M. Simanek
# Copyright 2009 Stephane Charette
# Copyright (c) 2008-2009 Rob G. Healey <robhealey1@gmail.com>
# Copyright (c) 2008-2010 Rob G. Healey <robhealey1@gmail.com>
#
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
@ -1037,6 +1037,29 @@ div#sourcerefs ol li ol {
/* Subsections : Weblinks
----------------------------------------------------- */
div#WebLinks {
margin : 0 auto;
padding: 0;
}
table.weblinks tr td {
background-color: #EEE;
border-bottom: dashed 1px #000;
}
table.weblinks tr td.ColumnRowLabel {
width: 5%;
}
table.weblinks tr td.ColumnType {
width: 30%;
}
table.weblinks tr td.ColumnPath {
background-color: #FFF;
width: 435;
}
table.weblinks tr td.ColumnDescription {
width: 30%;
}
/* Subsections : Pedigree
----------------------------------------------------- */

View File

@ -874,7 +874,7 @@ div#AddressBookList, AddressBookDetail {
width: 100%;
}
div#AddressBookList table.addressbook {
margin: .3em 0 .3em 0;
}
div#AddressBookList table.addressbook tbody tr.Totals {
border: solid 1px #000;
@ -1221,6 +1221,28 @@ div#summaryarea table.infolist tbody tr td.ColumnAttribute {
/* Subsections : Weblinks
----------------------------------------------------- */
div#WebLinks {
margin : 0 auto;
padding: 0;
}
table.weblinks tr td {
background-color: #BCEAF6;
border-bottom: dashed 1px #000;
}
table.weblinks tr td.ColumnRowLabel {
width: 5%;
}
table.weblinks tr td.ColumnType {
width: 30%;
}
table.weblinks tr td.ColumnPath {
background-color: #FFF;
width: 435;
}
table.weblinks tr td.ColumnDescription {
width: 30%;
}
/* Subsections : Pedigree
----------------------------------------------------- */

View File

@ -4,7 +4,7 @@
#
# Copyright 2008 Jason M. Simanek
# Copyright 2009 Stephane Charette
# Copyright (c) 2008-2009 Rob G. Healey <robhealey1@gmail.com>
# Copyright (c) 2008-2010 Rob G. Healey <robhealey1@gmail.com>
#
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
@ -1064,6 +1064,29 @@ div#sourcerefs ol li ol {
/* Subsections : Weblinks
----------------------------------------------------- */
div#WebLinks {
margin : 0 auto;
padding: 0;
}
table.weblinks tr td {
background-color: #E0E6E0;
border-bottom: dashed 1px #000;
}
table.weblinks tr td.ColumnRowLabel {
width: 5%;
}
table.weblinks tr td.ColumnType {
width: 30%;
}
table.weblinks tr td.ColumnPath {
background-color: #FFF;
width: 435;
}
table.weblinks tr td.ColumnDescription {
width: 30%;
}
/* Subsections : Pedigree
----------------------------------------------------- */

View File

@ -4,7 +4,7 @@
#
# Copyright 2008 Jason M. Simanek
# Copyright 2009 Stephane Charette
# Copyright (c) 2008-2009 Rob G. Healey <robhealey1@gmail.com>
# Copyright (c) 2008-2010 Rob G. Healey <robhealey1@gmail.com>
#
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
@ -1014,6 +1014,29 @@ div#sourcerefs ol li ol {
/* Subsections : Weblinks
----------------------------------------------------- */
div#WebLinks {
margin : 0 auto;
padding: 0;
}
table.weblinks tr td {
background-color: #E6E0E9;
border-bottom: dashed 1px #000;
}
table.weblinks tr td.ColumnRowLabel {
width: 5%;
}
table.weblinks tr td.ColumnType {
width: 30%;
}
table.weblinks tr td.ColumnPath {
background-color: #FFF;
width: 435;
}
table.weblinks tr td.ColumnDescription {
width: 30%;
}
/* Subsections : Pedigree
----------------------------------------------------- */

View File

@ -4,7 +4,7 @@
#
# Copyright 2008 Jason M. Simanek
# Copyright 2009 Stephane Charette
# Copyright (c) 2008-2009 Rob G. Healey <robhealey1@gmail.com>
# Copyright (c) 2008-2010 Rob G. Healey <robhealey1@gmail.com>
#
# This program is free software; you can redistribute it and/or modify
@ -1017,6 +1017,29 @@ div#sourcerefs ol li ol {
/* Subsections : Weblinks
----------------------------------------------------- */
div#WebLinks {
margin : 0 auto;
padding: 0;
}
table.weblinks tr td {
background-color: #FFE09F;
border-bottom: dashed 1px #000;
}
table.weblinks tr td.ColumnRowLabel {
width: 5%;
}
table.weblinks tr td.ColumnType {
width: 30%;
}
table.weblinks tr td.ColumnPath {
background-color: #FFF;
width: 435;
}
table.weblinks tr td.ColumnDescription {
width: 30%;
}
/* Subsections : Pedigree
----------------------------------------------------- */

View File

@ -4,7 +4,7 @@
#
# Copyright 2008 Jason M. Simanek
# Copyright 2009 Stephane Charette
# Copyright (c) 2008-2009 Rob G. Healey <robhealey1@gmail.com>
# Copyright (c) 2008-2010 Rob G. Healey <robhealey1@gmail.com>
#
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
@ -1015,6 +1015,29 @@ div#sourcerefs ol li ol {
/* Subsections : Weblinks
----------------------------------------------------- */
div#WebLinks {
margin : 0 auto;
padding: 0;
}
table.weblinks tr td {
background-color: #EAFFF4;
border-bottom: dashed 1px #000;
}
table.weblinks tr td.ColumnRowLabel {
width: 5%;
}
table.weblinks tr td.ColumnType {
width: 30%;
}
table.weblinks tr td.ColumnPath {
background-color: #FFF;
width: 435;
}
table.weblinks tr td.ColumnDescription {
width: 30%;
}
/* Subsections : Pedigree
----------------------------------------------------- */

View File

@ -4,7 +4,7 @@
#
# Copyright 2008 Jason M. Simanek
# Copyright 2009 Stephane Charette
# Copyright (c) 2008-2009 Rob G. healey <robhealey1@gmail.com>
# Copyright (c) 2008-2010 Rob G. healey <robhealey1@gmail.com>
#
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
@ -1018,6 +1018,29 @@ div#sourcerefs ol li ol {
/* SubSection : Weblinks
----------------------------------------------------- */
div#WebLinks {
margin : 0 auto;
padding: 0;
}
table.weblinks tr td {
background-color: #FFFFE7;
border-bottom: dashed 1px #000;
}
table.weblinks tr td.ColumnRowLabel {
width: 5%;
}
table.weblinks tr td.ColumnType {
width: 30%;
}
table.weblinks tr td.ColumnPath {
background-color: #FFF;
width: 435;
}
table.weblinks tr td.ColumnDescription {
width: 30%;
}
/* SubSection : Pedigree
----------------------------------------------------- */

View File

@ -4,7 +4,7 @@
#
# Copyright 2008 Jason M. Simanek
# Copyright 2009 Stephane Charette
# Copyright (c) 2008-2009 Rob G. Healey <robhealey1@gmail.com>
# Copyright (c) 2008-2010 Rob G. Healey <robhealey1@gmail.com>
#
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
@ -1068,6 +1068,29 @@ div#summaryarea table.infolist tbody tr td.ColumnAttribute {
/* Subsections : Weblinks
----------------------------------------------------- */
div#WebLinks {
margin : 0 auto;
padding: 0;
}
table.weblinks tr td {
background-color: #F6F2EE;
border-bottom: dashed 1px #000;
}
table.weblinks tr td.ColumnRowLabel {
width: 5%;
}
table.weblinks tr td.ColumnType {
width: 30%;
}
table.weblinks tr td.ColumnPath {
background-color: #FFF;
width: 435;
}
table.weblinks tr td.ColumnDescription {
width: 30%;
}
/* Subsections : Pedigree
----------------------------------------------------- */

View File

@ -2,8 +2,8 @@
#
# Gramps - a GTK+/GNOME based genealogy program
#
# Copyright 2008-2009 Rob G. Healey <robhealey1@gmail.com>
# Copyright 2009 Stephane Charette
# Copyright 2008-2010 Rob G. Healey <robhealey1@gmail.com>
# Copyright 2009 Stephane Charette
#
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
@ -1214,6 +1214,29 @@ div#summaryarea table.infolist tbody tr td.ColumnAttribute {
/* Subsections : Weblinks
----------------------------------------------------- */
div#WebLinks {
margin : 0 auto;
padding: 0;
}
table.weblinks tr td {
background-color: #6AF364;
border-bottom: dashed 1px #000;
}
table.weblinks tr td.ColumnRowLabel {
width: 5%;
}
table.weblinks tr td.ColumnType {
width: 30%;
}
table.weblinks tr td.ColumnPath {
background-color: #FFF;
width: 435;
}
table.weblinks tr td.ColumnDescription {
width: 30%;
}
/* Subsections : Pedigree
----------------------------------------------------- */

View File

@ -1425,49 +1425,74 @@ class BasePage(object):
return None
# begin web links division
with Html("div", class_ = "subsection", id = "weblinks") as section:
with Html("div", class_ = "subsection", id = "WebLinks") as section:
# begin web title
section += Html("h4", _("Web Links"), inline = True)
# ordered list
ordered = Html("ol")
section += ordered
# begin weblinks table
with Html("table", class_ = "infolist weblinks") as table:
section += table
for url in urllist:
uri = url.get_path()
descr = url.get_description()
if not descr:
descr = uri
_type = url.get_type()
thead = Html("thead")
table += thead
list = Html("li")
ordered += list
trow = Html("tr")
thead += trow
# Email address
if _type == UrlType.EMAIL:
if not uri.startswith("mailto:"):
list += Html("a",descr, href = 'mailto: %s' % uri)
else:
list += Html("a", descr, href = uri)
trow.extend(
Html('th', label, class_ = "Column" + colclass, inline = True)
for (label, colclass) in [
("&nbsp;", "RowLabel"),
(THEAD, "Type"),
(_("Path"), "Path"),
(DESCRHEAD, "Description") ]
)
# Web Site address
elif _type == UrlType.WEB_HOME:
if not uri.startswith("http://"):
list += Html("a", descr, href = 'http://%s' % uri)
else:
list += Html("a", descr, href = uri)
tbody = Html("tbody")
table += tbody
# FTP server address
elif _type == UrlType.WEB_FTP:
if not uri.startswith("ftp://"):
list += Html("a", descr, href = 'ftp://%s' % uri)
else:
list += Html("a", descr, href = uri)
index = 0
for url in urllist:
# custom type
else:
list += Html("a", descr, href = uri)
trow = Html("tr")
tbody += trow
_type = url.get_type()
uri = url.get_path()
descr = url.get_description()
if not descr:
descr = uri
trow.extend(
Html("td", index + 1, class_ = "ColumnRowLabel", inline = True)
)
# Email address
if _type == UrlType.EMAIL:
if not uri.startswith("mailto:"):
uri = "mailto: %(email)s" % { 'email' : uri }
# Web Site address
elif _type == UrlType.WEB_HOME:
if not uri.startswith("http://"):
uri = "http://%(website)s" % { "website" : uri }
# FTP server address
elif _type == UrlType.WEB_FTP:
if not uri.startswith("ftp://"):
uri = "ftp://%(ftpsite)s" % { "ftpsite" : uri }
uri = Html("a", descr, href = uri)
trow.extend(
Html("td", data, class_ = "Column" + colclass)
for (data, colclass) in [
(str(_type), "Type"),
(uri, "Path"),
(descr, "Description") ]
)
index += 1
# return web links to its caller
return section