i have been testing this for a few days and it rectifies the problem quite
nicely.
thanks for your help!!
-mike-
-Original Message-
From: JP Gilles [mailto:[EMAIL PROTECTED]]
Sent: Friday, January 26, 2001 11:40 AM
To: Michael Angelo
Cc: [EMAIL PROTECTED]
Subject: Re: [Zope] .isCurrentDay strangeness
hi
This work - tested
TABLE
dtml-in expr="PARENTS[0].objectValues(['DTML
Document','File','Folder'])" sort="bobobase_modification_time" reverse
dtml-let date="bobobase_modification_time()"
dtml-unless "_.string.find(_['id'],'index_html')==0"
TR
TD bgcolor="#DD"a href="dtml-absolute_url;"dtml-var
title_or_id/a/TD
dtml-if "date.isCurrentYear() and date.isCurrentMonth() and
date.isCurrentDay()"
TD bgcolor="#FF8080"dtml-var date fmt="aCommon"/TD
dtml-elif "date.isCurrentYear() and date.isCurrentMonth()"
TD bgcolor="#BEFAB4"dtml-var date fmt="aCommon"/TD
dtml-else
TD bgcolor="#EE"dtml-var date fmt="aCommon"/TD
/dtml-if
TD bgcolor="#4269D6"
small[a href="dtml-var URL1/dtml-var id/manage"font
color="#00"Edit/font/a]/small
/TD
/TR
/dtml-unless
/dtml-let
/dtml-in
/TABLE
Michael Angelo a crit :
hi all,
i have an indexing script which highlights the modification date table
cell
depending on whether the indexed object was modified today or in the past
month. however, it seems a bit flakey. todays red cells (modified today)
were objects modified on Aug 25, 2000 6:34 pm and Sep 25, 2000 5:09 pm. i
am
thinking that the .isCurrentDay method is buggy. anyway, here is the
script - if i goofed maybe you can find it.
dtml-in expr="PARENTS[0].objectValues(['DTML Document','File','Folder'])"
sort="bobobase_modification_time" reverse
dtml-unless "_.string.find(_['id'],'index_html')==0"
tr
td bgcolor="#DD"a href="dtml-absolute_url;"dtml-var
title_or_id/a/td
dtml-if "bobobase_modification_time().isCurrentDay()"
td bgcolor="#FF8080"dtml-var bobobase_modification_time
fmt="aCommon"/td
dtml-elif "bobobase_modification_time().isCurrentMonth()"
td bgcolor="#BEFAB4"dtml-var bobobase_modification_time
fmt="aCommon"/td
dtml-else
td bgcolor="#EE"dtml-var bobobase_modification_time
fmt="aCommon"/td
/dtml-if
td bgcolor="#4269D6"
small
[a href="dtml-var URL1/dtml-var id/manage"font
color="#00"
Edit/font/a]
/small
/td
/tr
/dtml-unless
/dtml-in
Zope overlord wisdom greatly appreciated ;-)
-mike-
___
Zope maillist - [EMAIL PROTECTED]
http://lists.zope.org/mailman/listinfo/zope
** No cross posts or HTML encoding! **
(Related lists -
http://lists.zope.org/mailman/listinfo/zope-announce
http://lists.zope.org/mailman/listinfo/zope-dev )
___
Zope maillist - [EMAIL PROTECTED]
http://lists.zope.org/mailman/listinfo/zope
** No cross posts or HTML encoding! **
(Related lists -
http://lists.zope.org/mailman/listinfo/zope-announce
http://lists.zope.org/mailman/listinfo/zope-dev )