diff options
| author | bwarsaw | 2000-03-15 00:32:47 +0000 |
|---|---|---|
| committer | bwarsaw | 2000-03-15 00:32:47 +0000 |
| commit | bbab3dc95f92188eaa70a01a3e73fda88dfeb3b9 (patch) | |
| tree | df40b96b158cf22ceaee62a1b8358f8693416914 /Mailman/htmlformat.py | |
| parent | 286dcc8531463623614cd1be9f520f7edc4d1703 (diff) | |
| download | mailman-bbab3dc95f92188eaa70a01a3e73fda88dfeb3b9.tar.gz mailman-bbab3dc95f92188eaa70a01a3e73fda88dfeb3b9.tar.zst mailman-bbab3dc95f92188eaa70a01a3e73fda88dfeb3b9.zip | |
Diffstat (limited to 'Mailman/htmlformat.py')
| -rw-r--r-- | Mailman/htmlformat.py | 58 |
1 files changed, 49 insertions, 9 deletions
diff --git a/Mailman/htmlformat.py b/Mailman/htmlformat.py index d645e6f35..d31ff3d82 100644 --- a/Mailman/htmlformat.py +++ b/Mailman/htmlformat.py @@ -253,10 +253,10 @@ class Container: self.items.append(obj) def Format(self, indent=0): - output = '' - for item in self.items: - output = output + HTMLFormatObject(item, indent) - return output + output = [] + for item in self.items: + output.append(HTMLFormatObject(item, indent)) + return string.join(output, '') # My own standard document template. YMMV. # something more abstract would be more work to use... @@ -496,10 +496,50 @@ class DefinitionList(Container): return output + +# Logo constants +# +# These are the URLs which the image logos link to. The Mailman home page now +# points at the gnu.org site instead of the www.list.org mirror. +# +from mm_cfg import MAILMAN_URL +PYTHON_URL = 'http://www.python.org/' +GNU_URL = 'http://www.gnu.org/' + +# The names of the image logo files. These are concatentated onto +# mm_cfg.IMAGE_LOGOS (not urljoined). +DELIVERED_BY = 'mailman.jpg' +PYTHON_POWERED = 'PythonPowered.png' +GNU_HEAD = 'gnu-head-tiny.jpg' + + def MailmanLogo(): - if mm_cfg.DELIVERED_BY_URL: - img = ('<img src="%s" alt="Delivered by Mailman" border=0> v %s' % - (mm_cfg.DELIVERED_BY_URL, mm_cfg.VERSION)) + t = Table(border=0, width='100%') + if mm_cfg.IMAGE_LOGOS: + def logo(file): + return mm_cfg.IMAGE_LOGOS + file + mmlink = Link(MAILMAN_URL, + '<img src="%s" alt="Delivered by Mailman" border=0>' + '<br>version %s' + % (logo(DELIVERED_BY), mm_cfg.VERSION)) + pylink = Link(PYTHON_URL, + '<img src="%s" alt="Python Powered" border=0>' % + logo(PYTHON_POWERED)) + gnulink = Link(GNU_URL, + '<img src="%s" alt="GNU\'s Not Unix" border=0>' % + logo(GNU_HEAD)) + text = Container(Link(MAILMAN_URL, 'Mailman home page'), + '<br>', + Link(PYTHON_URL, 'Python home page'), + '<br>', + Link(GNU_URL, 'GNU home page'), + ) + t.AddRow([mmlink, pylink, gnulink, text]) else: - img = 'Delivered by Mailman v %s' % mm_cfg.VERSION - return Link(mm_cfg.MAILMAN_URL, img) + # use only textual links + mmlink = Link(MAILMAN_URL, + 'Delivered by Mailman<br>version %s' % mm_cfg.VERSION) + pylink = Link(PYTHON_URL, 'Python Powered') + gnulink = Link(GNU_URL, "Gnu's Not Unix") + t.AddRow([mmlink, pylink, gnulink]) + return t |
