diff -Pur mailman-2.0-dist/Mailman/Cgi/admin.py mailman-2.0/Mailman/Cgi/admin.py --- mailman-2.0-dist/Mailman/Cgi/admin.py Thu Sep 28 19:05:04 2000 +++ mailman-2.0/Mailman/Cgi/admin.py Thu Dec 14 18:55:20 2000 @@ -4,14 +4,14 @@ # modify it under the terms of the GNU General Public License # as published by the Free Software Foundation; either version 2 # of the License, or (at your option) any later version. -# +# # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # GNU General Public License for more details. -# +# # You should have received a copy of the GNU General Public License -# along with this program; if not, write to the Free Software +# along with this program; if not, write to the Free Software # Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. """Process and produce the list-administration options forms. @@ -61,7 +61,7 @@ return # get the list object listname = string.lower(parts[0]) - try: + try: mlist = MailList.MailList(listname) except Errors.MMListError, e: FormatAdminOverview('No such list %s' % listname) @@ -163,46 +163,32 @@ if error: greeting = FontAttr(error, color="ff5060", size="+1") else: - greeting = "Welcome!" + greeting = FontAttr("Welcome!", size ="+1") if not advertised: - welcome_items = (greeting, - "
" - " There currently are no publicly-advertised ", - Link(mm_cfg.MAILMAN_URL, "mailman"), - " mailing lists on %s." % mm_cfg.DEFAULT_HOST_NAME, - ) + admin_info = ('''There currently are no publicly-advertised + mailing lists on %s.''' % ( + Link(mm_cfg.MAILMAN_URL, "mailman"), + mm_cfg.DEFAULT_HOST_NAME)) else: - welcome_items = ( - greeting, - "
" - " Below is the collection of publicly-advertised ", - Link(mm_cfg.MAILMAN_URL, "mailman"), - " mailing lists on %s." % mm_cfg.DEFAULT_HOST_NAME, - (' Click on a list name to visit the configuration pages' - ' for that list.' - ) - ) - - welcome_items = (welcome_items + - (" To visit the administrators configuration page for" - " an unadvertised list, open a URL similar to this" - + - (" one, but with a '/' and the %slist name appended.
" - % ((error and "right ") or "")) - + - " General list information can be found at ", - Link(Utils.ScriptURL('listinfo'), - 'the mailing list overview page'), - "." - "
(Send questions and comments to ", - Link("mailto:%s" % mm_cfg.MAILMAN_OWNER, - mm_cfg.MAILMAN_OWNER), - ".)
" - ) - ) + admin_info = ( + '''Below is the collection of all the publicly-advertised + %s mailing lists on %s. Click on a list name to visit + the configuration pages for that list.''' % ( + Link(mm_cfg.MAILMAN_URL, "mailman"), + mm_cfg.DEFAULT_HOST_NAME)) + + intro_text = Utils.maketext( + 'admintro.txt', { + 'welcome' : greeting.Format(), + 'adm_intro' : string.join(admin_info, ""), + 'correct' : (error and "correct ") or "", + 'listname' : l.real_name, + 'listinfo_url' : Utils.ScriptURL('listinfo'), + 'mailman_owner' : mm_cfg.MAILMAN_OWNER, + }, raw=1) - table.AddRow([apply(Container, welcome_items)]) + table.AddRow([apply(Container, intro_text)]) table.AddCellInfo(max(table.GetCurrentRowIndex(), 0), 0, colspan=2) if advertised: @@ -421,7 +407,7 @@ 2 entry size 3 ?dependancies? 4 Brief description - 5 Optional description elaboration""" + 5 Optional description elaboration""" if len(table_entry) == 5: elaboration = None varname, kind, params, dependancies, descr = table_entry @@ -712,7 +698,7 @@ elif my_type == mm_cfg.Host: return val ## -## This code is sendmail dependant, so we'll just live w/o +## This code is sendmail dependant, so we'll just live w/o ## the error checking for now. ## ## # Shouldn't have to read in the whole file. diff -Pur mailman-2.0-dist/Mailman/Cgi/listinfo.py mailman-2.0/Mailman/Cgi/listinfo.py --- mailman-2.0-dist/Mailman/Cgi/listinfo.py Thu Sep 28 19:05:05 2000 +++ mailman-2.0/Mailman/Cgi/listinfo.py Thu Dec 14 18:55:20 2000 @@ -95,38 +95,31 @@ greeting = FontAttr('Welcome!', size='+2') if not advertised: - welcome_items = (greeting, - "
" - " There currently are no publicly-advertised ", - Link(mm_cfg.MAILMAN_URL, "mailman"), - " mailing lists on %s." % host_name, - ) + list_info = ( + "There currently are no publicly-advertised %(mailman)s " + "mailing lists on %(hostname)s." % { + 'hostname' : host_name, + 'mailman' : Link(mm_cfg.MAILMAN_URL, "mailman").Format(), + }) else: - welcome_items = ( - greeting, - '''
Below is a listing of all the public mailing lists on - %(hostname)s. Click on a list name to get more information about - the list, or to subscribe, unsubscribe, and change the preferences - on your subscription.''' % {'hostname': host_name}, - ) + list_info = ( + '''Below is a listing of all the public mailing lists on + %(hostname)s. Click on a list name to get more information about + the list, or to subscribe, unsubscribe, and change the preferences + on your subscription.''' % {'hostname': host_name}, + ) - welcome_items = (welcome_items + - (" To visit the info page for an unadvertised list," - " open a URL similar to this one, but with a '/' and" - + - (" the %slist name appended." - % ((error and "right ") or "")) - + - '
List administrators, you can visit ', - Link(Utils.ScriptURL('admin'), - 'the list admin overview page'), - " to find the management interface for your list." - "
(Send questions or comments to ", - Link("mailto:%s" % mm_cfg.MAILMAN_OWNER, - mm_cfg.MAILMAN_OWNER), - ".)
")) + intro_text = Utils.maketext( + 'listintro.txt', { + 'welcome' : greeting.Format(), + 'list_intro' : string.join(list_info, ""), + 'correct' : (error and "correct ") or "", + 'listname' : mlist.real_name, + 'listadmin_url' : Utils.ScriptURL('admin'), + 'mailman_owner' : mm_cfg.MAILMAN_OWNER, + }, raw=1) - table.AddRow([apply(Container, welcome_items)]) + table.AddRow([apply(Container, intro_text)]) table.AddCellInfo(max(table.GetCurrentRowIndex(), 0), 0, colspan=2) if advertised: diff -Pur mailman-2.0-dist/templates/admintro.txt mailman-2.0/templates/admintro.txt --- mailman-2.0-dist/templates/admintro.txt Wed Dec 31 18:00:00 1969 +++ mailman-2.0/templates/admintro.txt Thu Dec 14 18:55:20 2000 @@ -0,0 +1,14 @@ +%(welcome)s +
+%(adm_intro)s + +To visit the administrators' configuration page for an unadvertised list, +open a URL similar to this one, but with a '/' and +the %(correct)slist name appended.
+ +General list information can be found at the +mailing list overview page.
+ +(Send questions or comments to +%(mailman_owner)s.)
+ diff -Pur mailman-2.0-dist/templates/listintro.txt mailman-2.0/templates/listintro.txt --- mailman-2.0-dist/templates/listintro.txt Wed Dec 31 18:00:00 1969 +++ mailman-2.0/templates/listintro.txt Thu Dec 14 18:55:20 2000 @@ -0,0 +1,15 @@ +%(welcome)s +
+%(list_intro)s + +To visit the info page for an unadvertised list, +open a URL similar to this one, but with a '/' and +the %(correct)sname appended.
+ +List administrators, you can visit +the list admin overview page +to find the management interface for your list.
+ +(Send questions or comments to +%(mailman_owner)s.)
+