[Zope] Calendar Code Example

Jason Spisak webmaster@mtear.com
Thu, 08 Jul 1999 15:08:52 -0800


George,

I use the Calendar in conjunction with the Catalog to give the people a
kind of daily-planner.  The same page is accessed by everyone, and based
on who is logged in it shows their stuff.  It turns the links in month
mode red if they have anyhting scheduled on that day.  BTW, Ty Sarna
gets major kudos for the Calendar tag!!

<!--#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(recruiter=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 action="/manage_addProduct/Appointment/Appointment_addForm"
method" POST">
<center>
<table>
<tr>
<td>
<i>An Appointment is something other than an Interview or Offer, 
<br>or anything else in the system that is created in another place.
<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(recruiter=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(recruiter=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-->

Hope it helps, and thanks again to Ty!
-- 
Jason Spisak
webmaster@mtear.com