Sitewide headers/footers & XHTML Compliant Web UI

Bug #558223 reported by carbonnb
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
GNU Mailman
New
Undecided
Unassigned

Bug Description

This patch was borne out of a request I received to
make the Mailman UI fit the look of the web site. This
patch allows you to set a site wide header and footer.
This allows you to pretty much make the MM UI look like
any other site. While I was at it I also made the web
UI XHTML compliant.

Once you patch your source and install it, all you need
to do is edit the html files in the templates/en
directory. Most of the pages will get the header and
footers from the site-header.html and site-footer.html
files, but some of the HTML files already contain theor
own header/footer so you will need ot edit some of
these files as well.

Since this also adds XHTML compliance, this superceeds
patch #116035

Revision history for this message
carbonnb (carbonnb) wrote :

Logged In: YES
user_id=449953

I have only tested this with the english pages. I'm not sure
how to deal with i18n yet, but I'm reading and I will update
this patch as soon as I figure out how to deal with it.

To apply this patch for MM2.1.7, you will need to apply
patch #1405790 (Mailman 2.1.7 multiple patch) first.

to apply this patch use this command from your mailman
source directory:
patch -p1 <full/path/to/headfoot-2.1.7-0.1.patch

Revision history for this message
carbonnb (carbonnb) wrote :

Logged In: YES
user_id=449953

I am also uploading a second version of this patch. This
second version will add the sitewide headers/footer to
source that has been patched with the ht://dig integration
patches.

At the time I posted this, the official ht://dig integration
patches were not released, but the MM2.1.6 patches appear to
work with MM 2.1.7, so they are what were used.

to apply this patch use this command from your mailman
source directory:
patch -p1 <full/path/to/headfoot-htdig-2.1.7-0.1.patch

Revision history for this message
carbonnb (carbonnb) wrote :

Logged In: YES
user_id=449953

Updated both patches to remove some of my site specific HTML
coding.

Revision history for this message
carbonnb (carbonnb) wrote :

The file headfoot-2.1.7-0.2.patch.gz was added: site wide header/footer patch

Revision history for this message
carbonnb (carbonnb) wrote :

The file headfoot-htdig-2.1.7-0.2.patch.gz was added: site wide header/footer patch with ht://dig patches installed

Revision history for this message
akuchling (akuchling) wrote :

Logged In: YES
user_id=11375
Originator: NO

The patch looks pretty good, though I'll suggest some refinements and some decisions need to be made.

Net effects of the patch:

Adds XHTML compliance.

Adds site-header.html/site-footer.html to the templates/en directory
and usage of CSS instead of <font> tags.

Still uses tables for page layout.

Adds CSS_FILE to mm_cfg.py.

Requires addition of a /css/ directory to the web tree.

Possible issues:

Many I18N strings change, but only by folding HTML markup to lowercase.
A bunch of search-and-replacing should be able to update all the
language-specific templates.

Need to decide upon class naming scheme; the scheme used isn't
consistent (mm_web_adminitem_color in one case, mmErrorBackground
in another).
Could retarget it to use the <div id="mailman"> suggestion
and '#mailman error' selectors.

Possible bug: AddSpanStyle, AddDivStyle: won't generate <div>,<span>
if no 'css_class' is provided. Presumably all current callers get this
right; should the class work properly if there's an error, though?

Compatibility issues:

The patch removes the colour settings (WEB_HEADER_COLOR,
WEB_ERROR_COLOR, WEB_ADMINITEM_COLOR, etc.) -- how to handle backward
compatibility? That would require substituting into the .css file, or
adding a 'style' attribute.

WEB_HEADER_COLOR -- mmHeader

WEB_ERROR_COLOR -- replaced by mmErrorBackground CSS class

WEB_ADMINITEM_COLOR -- replaced by mmRight/mmLeft/mm_web_adminitem_color/
mmAdminItem

Features not present that I thought of:

* allow adding an embedded stylesheet

* allow adding JavaScript links or text to the <head>

* adding an onLoad to the body (perhaps not necessary -- can it be done in a <script> tag using DOM Events?)

Revision history for this message
akuchling (akuchling) wrote :

Logged In: YES
user_id=11375
Originator: NO

A branch for CSS work has been created, modernize_21_webui.

I've committed most of this patch.

The patch to the following files didn't apply: templates/en/roster.html templates/en/subscribe.html templates/en/listinfo.html templates/en/admindbdetails.html .

There have been changes to the files since the patch was made, so they'll basically have to be re-done from scratch. Bryan, do you remember all the various changes you made, or should I try to disentangle the original and patched versions?

To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.