[Zope] Re: Zope Calendar
Jason Spisak
webmaster@mtear.com
Thu, 22 Jul 1999 07:18:19 -0800
Alastair,
>
> I see from a message you sent to the Zope mailing list that you are an
> expert with Ty Sarna's Calendar.
Flatery will get you everywhere.;^) I figured it all out because Ty (as
all of Zope is) made it Open Source! Thanks again Ty. Actually I
consider myself a novice with the calendar because I still can't get it
to change color.;) But the Catalog is something I've been working with
for a bit.
>What might I conceivably
> put into my DTML documents that would replace the lines in your exampe code
> that go:
>
> <!--#in "Catalog(recruiter=AUTHENTICATED_USER.getUserName())"-->
>
This line only gets me the objects that "belong" (have a property named
'recruiter' that has the user name stored in it of the person who 'owns'
it) to that person. Then I ask for only those objects that have a
scheduled date equal to the date that the calender tag is displaying.
hence,
>
> <!--#if "calendar_date.dayOfYear()==date.dayOfYear()"-->
>
You might try to give the EventClass a property 'owner' and insert the
name of the user who creates it, as in <input type="hidden" name="owner"
value="<!--#var AUTHENTICATED_USER.getUserName()-->, and you can ask for
them by date using <!--#if
"mydateproperty.dayOfYear()==date.dayOfYear()"-->. The "date" is a
property of the calendar tag.
Incidentally, the whole ownership thing will be *much* easierr and
consistant when the Zope Portal Toolkit comes out in a bit. The Owner
role already exists, but I haven't got around to messing with it.
Happy Zoping,
Jason Spisak
webmaster@mtear.com