summaryrefslogtreecommitdiff
path: root/Mailman
diff options
context:
space:
mode:
Diffstat (limited to 'Mailman')
-rw-r--r--Mailman/MailList.py20
-rw-r--r--Mailman/Utils.py14
-rw-r--r--Mailman/htmlformat.py7
3 files changed, 31 insertions, 10 deletions
diff --git a/Mailman/MailList.py b/Mailman/MailList.py
index 44339b4d9..406d1e599 100644
--- a/Mailman/MailList.py
+++ b/Mailman/MailList.py
@@ -75,8 +75,13 @@ class MailList(MailCommandHandler, HTMLFormatter, Deliverer, ListAdmin,
return '%s@%s' % (self._internal_name, self.host_name)
def GetScriptURL(self, script_name):
- return os.path.join(self.web_page_url, '%s/%s' %
- (script_name, self._internal_name))
+ if self.web_page_url:
+ prefix = self.web_page_url
+ else:
+ prefix = mm_cfg.DEFAULT_URL
+ return os.path.join(prefix, '%s/%s' % (script_name,
+ self._internal_name))
+
def GetOptionsURL(self, addr, obscured=0):
options = self.GetScriptURL('options')
if obscured:
@@ -85,9 +90,6 @@ class MailList(MailCommandHandler, HTMLFormatter, Deliverer, ListAdmin,
treated = addr
return os.path.join(options, treated)
- def GetOptionsURL(self, addr):
- return os.path.join(self.GetScriptURL('options'), addr)
-
def GetUserOption(self, user, option):
if option == mm_cfg.Digests:
return user in self.digest_members
@@ -212,10 +214,10 @@ class MailList(MailCommandHandler, HTMLFormatter, Deliverer, ListAdmin,
" what the list is."),
('info', mm_cfg.Text, (7, 50), 0,
- 'An introductory description - a few paragraphs - about the'
- 'list. It will be included, as html, at the top of the'
- 'listinfo page. Carriage returns will end a paragraph - see'
- 'the details for more info.',
+ ' An introductory description - a few paragraphs - about the'
+ ' list. It will be included, as html, at the top of the'
+ ' listinfo page. Carriage returns will end a paragraph - see'
+ ' the details for more info.',
"The text will be treated as html <em>except</em> that newlines"
" newlines will be translated to &lt;br&gt; - so you can use"
diff --git a/Mailman/Utils.py b/Mailman/Utils.py
index bc6b6a8da..419ae06a0 100644
--- a/Mailman/Utils.py
+++ b/Mailman/Utils.py
@@ -477,3 +477,17 @@ class StampedLogger(Logger):
Logger.write(self, ' ' + l)
else:
Logger.write(self, l)
+
+def chunkify(members, chunksize=mm_cfg.ADMIN_MEMBER_CHUNKSIZE):
+ """
+ return a list of lists of members
+ """
+ members.sort()
+ res = []
+ while 1:
+ if not members:
+ break
+ chunk = members[:chunksize]
+ res.append(chunk)
+ members = members[chunksize:]
+ return res
diff --git a/Mailman/htmlformat.py b/Mailman/htmlformat.py
index 587bb1a0a..ddb6ac229 100644
--- a/Mailman/htmlformat.py
+++ b/Mailman/htmlformat.py
@@ -20,7 +20,7 @@
Encapsulate HTML formatting directives in classes that act as containers
for python and, recursively, for nested HTML formatting objects."""
-__version__ = "$Revision: 547 $"
+__version__ = "$Revision: 635 $"
# Eventually could abstract down to HtmlItem, which outputs an arbitrary html
# object given start / end tags, valid options, and a value.
@@ -406,6 +406,11 @@ class RadioButton(InputObj):
def __init__(self, name, value, checked=0, **kws):
apply(InputObj.__init__, (self, name, 'RADIO', value, checked), kws)
+class CheckBox(InputObj):
+ def __init__(self, name, value, checked=0, **kws):
+ apply(InputObj.__init__, (self, name, "CHECKBOX", value, checked), kws)
+
+
class VerticalSpacer:
def __init__(self, size=10):