Details

Applies to
1.8, 1.9.
Purpose
Allow customization of page history appearance.
Description

This patch makes page history set a CSS class for each column. This allows stylesheets to customize columns appearance, for example to change page history in Solenoid theme from this:

history_weird.png

to this:

history.png

Patch

   1 --- MoinMoin\widget\browser_orig.py	Fri Jun  5 05:41:18 2009
   2 +++ MoinMoin\widget\browser.py	Sun May 31 20:41:02 2009
   3 @@ -186,3 +186,3 @@
   4                      else:
   5 -                        result.append(fmt.table_cell(1))
   6 +                        result.append(fmt.table_cell(1, {'class': 'column%d' % idx}))
   7                          result.append(unicode(row[idx]))

CssClassForPageHistoryComment.patch

Discussion

RenatoSilva - Thomas, I don't think a special class for table header is needed. If you want separate styles, you can use th.columnN, td.columnN, and if you want common style you can use just columnN instead of having to use a columnN, hcolumnN. About the generic thing, the Solenoid theme is specific about columns of the page history, other td.columnN elements are not affected.

I think you can use nth-child. -- EugeneSyromyatnikov 2009-11-30 05:21:01

Plan


CategoryFeatureImplemented

MoinMoin: MoinMoinPatch/CssClassForPageHistoryComment (last edited 2010-01-22 00:00:56 by RenatoSilva)