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 2008 Jason M. Simanek
# Copyright 2009 Stephane Charette # 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 # 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 # it under the terms of the GNU General Public License as published by
@ -1037,6 +1037,29 @@ div#sourcerefs ol li ol {
/* Subsections : Weblinks /* 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 /* Subsections : Pedigree
----------------------------------------------------- */ ----------------------------------------------------- */

View File

@ -874,7 +874,7 @@ div#AddressBookList, AddressBookDetail {
width: 100%; width: 100%;
} }
div#AddressBookList table.addressbook { div#AddressBookList table.addressbook {
margin: .3em 0 .3em 0;
} }
div#AddressBookList table.addressbook tbody tr.Totals { div#AddressBookList table.addressbook tbody tr.Totals {
border: solid 1px #000; border: solid 1px #000;
@ -1221,6 +1221,28 @@ div#summaryarea table.infolist tbody tr td.ColumnAttribute {
/* Subsections : Weblinks /* 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 /* Subsections : Pedigree
----------------------------------------------------- */ ----------------------------------------------------- */

View File

@ -4,7 +4,7 @@
# #
# Copyright 2008 Jason M. Simanek # Copyright 2008 Jason M. Simanek
# Copyright 2009 Stephane Charette # 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 # 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 # it under the terms of the GNU General Public License as published by
@ -1064,6 +1064,29 @@ div#sourcerefs ol li ol {
/* Subsections : Weblinks /* 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 /* Subsections : Pedigree
----------------------------------------------------- */ ----------------------------------------------------- */

View File

@ -4,7 +4,7 @@
# #
# Copyright 2008 Jason M. Simanek # Copyright 2008 Jason M. Simanek
# Copyright 2009 Stephane Charette # 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 # 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 # it under the terms of the GNU General Public License as published by
@ -1014,6 +1014,29 @@ div#sourcerefs ol li ol {
/* Subsections : Weblinks /* 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 /* Subsections : Pedigree
----------------------------------------------------- */ ----------------------------------------------------- */

View File

@ -4,7 +4,7 @@
# #
# Copyright 2008 Jason M. Simanek # Copyright 2008 Jason M. Simanek
# Copyright 2009 Stephane Charette # 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 # This program is free software; you can redistribute it and/or modify
@ -1017,6 +1017,29 @@ div#sourcerefs ol li ol {
/* Subsections : Weblinks /* 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 /* Subsections : Pedigree
----------------------------------------------------- */ ----------------------------------------------------- */

View File

@ -4,7 +4,7 @@
# #
# Copyright 2008 Jason M. Simanek # Copyright 2008 Jason M. Simanek
# Copyright 2009 Stephane Charette # 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 # 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 # it under the terms of the GNU General Public License as published by
@ -1015,6 +1015,29 @@ div#sourcerefs ol li ol {
/* Subsections : Weblinks /* 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 /* Subsections : Pedigree
----------------------------------------------------- */ ----------------------------------------------------- */

View File

@ -4,7 +4,7 @@
# #
# Copyright 2008 Jason M. Simanek # Copyright 2008 Jason M. Simanek
# Copyright 2009 Stephane Charette # 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 # 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 # it under the terms of the GNU General Public License as published by
@ -1018,6 +1018,29 @@ div#sourcerefs ol li ol {
/* SubSection : Weblinks /* 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 /* SubSection : Pedigree
----------------------------------------------------- */ ----------------------------------------------------- */

View File

@ -4,7 +4,7 @@
# #
# Copyright 2008 Jason M. Simanek # Copyright 2008 Jason M. Simanek
# Copyright 2009 Stephane Charette # 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 # 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 # 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 /* 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 /* Subsections : Pedigree
----------------------------------------------------- */ ----------------------------------------------------- */

View File

@ -2,7 +2,7 @@
# #
# Gramps - a GTK+/GNOME based genealogy program # Gramps - a GTK+/GNOME based genealogy program
# #
# Copyright 2008-2009 Rob G. Healey <robhealey1@gmail.com> # Copyright 2008-2010 Rob G. Healey <robhealey1@gmail.com>
# Copyright 2009 Stephane Charette # Copyright 2009 Stephane Charette
# #
# This program is free software; you can redistribute it and/or modify # This program is free software; you can redistribute it and/or modify
@ -1214,6 +1214,29 @@ div#summaryarea table.infolist tbody tr td.ColumnAttribute {
/* Subsections : Weblinks /* 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 /* Subsections : Pedigree
----------------------------------------------------- */ ----------------------------------------------------- */

View File

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