[Moin-devel] CVS: MoinMoin/macro RecentChanges.py,1.56,1.57
J?rgen Hermann
jhermann at users.sourceforge.net
Mon Apr 22 03:19:01 EDT 2002
Update of /cvsroot/moin/MoinMoin/macro
In directory usw-pr-cvs1:/tmp/cvs-serv11322/MoinMoin/macro
Modified Files:
RecentChanges.py
Log Message:
Forcibly split pagenames if they get too long, so that they can wrap
Index: RecentChanges.py
===================================================================
RCS file: /cvsroot/moin/MoinMoin/macro/RecentChanges.py,v
retrieving revision 1.56
retrieving revision 1.57
diff -C2 -r1.56 -r1.57
*** RecentChanges.py 17 Apr 2002 21:58:17 -0000 1.56
--- RecentChanges.py 22 Apr 2002 10:18:19 -0000 1.57
***************
*** 14,19 ****
from MoinMoin.i18n import _
! _max_days = 14
!
#############################################################################
--- 14,19 ----
from MoinMoin.i18n import _
! _MAX_DAYS = 14
! _MAX_PAGENAME_LENGTH = 35
#############################################################################
***************
*** 78,82 ****
if log.dayChanged():
! if log.daycount > _max_days: break
set_bm = ''
--- 78,82 ----
if log.dayChanged():
! if log.daycount > _MAX_DAYS: break
set_bm = ''
***************
*** 128,133 ****
# print name of page, with a link to it
buf.write('<tr valign="top"><td>%s </td><td>%s</td><td> ' % (
! html_link, page.link_to(),))
# print time of change
--- 128,134 ----
# print name of page, with a link to it
+ force_split = len(page.page_name) > _MAX_PAGENAME_LENGTH
buf.write('<tr valign="top"><td>%s </td><td>%s</td><td> ' % (
! html_link, page.link_to(text=page.split_title(force=force_split)),))
# print time of change
***************
*** 296,300 ****
Bag = new.classobj('Bag', (), {})
while log.getNextChange():
! if log.dayChanged() and log.daycount > _max_days: break
if log.action != 'SAVE': continue
logdata.append(new.instance(Bag, {
--- 297,301 ----
Bag = new.classobj('Bag', (), {})
while log.getNextChange():
! if log.dayChanged() and log.daycount > _MAX_DAYS: break
if log.action != 'SAVE': continue
logdata.append(new.instance(Bag, {
More information about the Moin-devel
mailing list