[Zope-dev] Re: BTW: CalendarTag

Jason Spisak webmaster@mtear.com
Fri, 16 Jul 1999 09:24:40 -0800


Kent,

> Plese report back with how you use things like this. It's only neat
> to see one's ideas be used, but what's really cool is when someone
> comes up with something I can learn from. :^)

Well I don't know if you can learn from me, but here's how I've used it.

Each user can create objects that have a calendar_date property, which
means that they have some scheduling significance.  I use the ZCatalog
to show me the things that occur on the day that the Calendar is set to.
 In month mode I munged a way to make the date red if they have things
occuring on that day. Also, the owner is just a property where I store
the user name when the ZClass instance get created.  I index them by
owner, and calendar_date.  This way all users log on to the same page,
and all of them see "thier" calendar.

Not pretty, but it works-->

<!--#var standard_html_header-->
<center>
<!--#calendar mode=month-->
<!--#if "mode=='month'"-->
<a href="<!--#var "linkDate(date)"-->">
<!--#in "Catalog(recruiter=AUTHENTICATED_USER.getUserName())"-->
<!--#if "calendar_date.dayOfYear()==date.dayOfYear()"-->
<font color="FF0000">
<!--#/if-->
<!--#/in-->
<!--#var date fmt=dd--></a>
</font>
<!--#elif "mode=='day'"-->
<font size="+3"><b>
<!--#var date fmt=dd-->
</b></font>
<!--#in "Catalog(owner=AUTHENTICATED_USER.getUserName())"-->
<!--#if "calendar_date.dayOfYear()==date.dayOfYear()"-->
<p><a href="<!--#var url-->"><font color="FF0000"><!--#var meta_type-->:
<!--#var title--></font></a>
<!--#/if-->
<!--#/in-->
<form>
<center>
<table>
<tr>
<td>
<i>An Appointment is something other than an Interview or Offer, 
<br>or anything else in the system related to recruiting.
<br>To create the appointment click "New Appoinment"
<br></i>
<input value="New Appointment" type="submit">
</td>
</tr>
</table>
<center>
</form>
<!--#elif "mode=='week'"-->
<a href="<!--#var "linkDate(date)"-->">
<!--#in "Catalog(owner=AUTHENTICATED_USER.getUserName(),meta_type='Interview')"-->
<!--#if "calendar_date.dayOfYear()==date.dayOfYear()"-->
<font color="FF0000">
<!--#/if-->
<!--#/in-->
<!--#var date fmt=dd--></a>
</font>
<!--#in "Catalog(owner=AUTHENTICATED_USER.getUserName())"-->
<!--#if "calendar_date.dayOfYear()==date.dayOfYear()"-->
<p><a href="<!--#var url-->"><!--#var meta_type--></a>
<!--#/if-->
<!--#/in-->
<!--#/if-->
<!--#/calendar-->
</center>
<!--#var standard_html_footer-->


Of course in Zope 2 it's giving me the error about the tuple, but it
worked like a charm with the early version of the Catalog and Zope 1.10.

All my best,

Jason Spisak
webmaster@mtear.com