[CMF-checkins] CVS: Products/CMFCalendar/skins/zpt_calendar -
calendarBox.pt:1.4 calendar_day_view.pt:1.3
Yvo Schubbe
y.2005- at wcm-solutions.de
Tue May 24 04:50:21 EDT 2005
Update of /cvs-repository/Products/CMFCalendar/skins/zpt_calendar
In directory cvs.zope.org:/tmp/cvs-serv27334/CMFCalendar/skins/zpt_calendar
Modified Files:
calendarBox.pt calendar_day_view.pt
Log Message:
- no need to import DateTime
- whitespace and other cleanup
=== Products/CMFCalendar/skins/zpt_calendar/calendarBox.pt 1.3 => 1.4 ===
--- Products/CMFCalendar/skins/zpt_calendar/calendarBox.pt:1.3 Sat Jul 31 14:29:23 2004
+++ Products/CMFCalendar/skins/zpt_calendar/calendarBox.pt Tue May 24 04:50:11 2005
@@ -1,44 +1,39 @@
-<html xmlns:tal="http://xml.zope.org/namespaces/tal"
- xmlns:metal="http://xml.zope.org/namespaces/metal"
- metal:use-macro="here/main_template/macros/master">
-
-<div metal:fill-slot="header"> </div>
-
-<div metal:fill-slot="main">
+<html metal:use-macro="context/main_template/macros/master">
+<body>
+
+<metal:slot metal:fill-slot="header"> </metal:slot>
+
+<metal:slot metal:fill-slot="main">
<div metal:define-macro="calendarBox"
class="CalendarBox"
- tal:define="DateTime python:modules['DateTime'].DateTime;
- yearmonth python:here.getMonthAndYear();
+ tal:define="yearmonth python:context.getMonthAndYear();
year python:yearmonth[0];
month python:yearmonth[1];
- weeks python:here.portal_calendar.getEventsForCalendar(month=month, year=year);">
-
+ weeks python:context.portal_calendar.getEventsForCalendar(month=month, year=year);">
+
<div metal:define-slot="title" class="CalendarTitle">CMF Calendar</div>
<!-- The calendar, rendered as a table -->
<table cellspacing="0" cellpadding="0" border="1">
<tr><td>
-
+
<table cellpadding="2" cellspacing="0" border="0" class="calendar">
+ <!-- The headers. The month with links either side -->
<tr>
-
- <!-- The headers. The month with links either side -->
<th>
- <a href="#" class="CalendarArrow" tal:attributes="href python:here.getPreviousMonthLink(request.URL0, month, year)">«</a>
+ <a href="#" class="CalendarArrow" tal:attributes="href python:context.getPreviousMonthLink(request.URL0, month, year)">«</a>
</th>
-
<th colspan="5" tal:define="date python:DateTime(int(year), int(month), 1)">
<span tal:replace="python:date.strftime('%B').capitalize()"/> <span tal:replace="python:date.year()"/>
</th>
-
<th>
- <a href="#" class="CalendarArrow" tal:attributes="href python:here.getNextMonthLink(request.URL0, month, year)">»</a>
+ <a href="#" class="CalendarArrow" tal:attributes="href python:context.getNextMonthLink(request.URL0, month, year)">»</a>
</th>
</tr>
<!-- The week days across the top -->
- <tr tal:define="weekdays here/portal_calendar/getDays">
+ <tr tal:define="weekdays context/portal_calendar/getDays">
<tal:weekday tal:repeat="weekday weekdays">
<td class="weekdays" tal:content="weekday">Su</td>
</tal:weekday>
@@ -46,35 +41,16 @@
<!-- The actual days with in the weeks -->
<tr tal:repeat="week weeks">
- <tal:week tal:define="days week">
- <tal:day tal:repeat="day days">
-
- <tal:daynumber tal:define="daynumber day/day;
- datestring python: '%d/%0.2d/%0.2d' % (year, month, daynumber);">
-
- <tal:event tal:condition="day/event">
- <!-- There is an event on this day -->
- <td class="event"
- tal:attributes="class python:here.getDaysClass(daynumber, month, year, day['event'])">
- <a href tal:attributes="href python:here.portal_url()+'/calendar_day_view?date=%s'%(datestring)"
- tal:content="python: daynumber or default">
-
- </a>
- </td>
- </tal:event>
-
- <tal:event tal:condition="not: day/event">
- <!-- There is no event on this day -->
- <td tal:content="python: daynumber or default"
- tal:attributes="class python:here.getDaysClass(daynumber, month, year)">
-
- </td>
- </tal:event>
-
- </tal:daynumber>
-
- </tal:day>
- </tal:week>
+ <tal:loop tal:repeat="day week"
+ ><td class="event"
+ tal:define="daynumber day/day;
+ datestring python:'%d/%0.2d/%0.2d' % (year, month, daynumber);"
+ tal:attributes="class python:context.getDaysClass(daynumber, month, year, day['event'])">
+ <a href
+ tal:omit-tag="not: day/event"
+ tal:attributes="href string:${portal_url}/calendar_day_view?date=${datestring}"
+ tal:content="python:daynumber or default"> </a>
+ </td></tal:loop>
</tr>
</table>
@@ -82,6 +58,7 @@
</table>
</div>
-</div>
+</metal:slot>
+</body>
</html>
=== Products/CMFCalendar/skins/zpt_calendar/calendar_day_view.pt 1.2 => 1.3 ===
--- Products/CMFCalendar/skins/zpt_calendar/calendar_day_view.pt:1.2 Wed Jul 10 01:37:46 2002
+++ Products/CMFCalendar/skins/zpt_calendar/calendar_day_view.pt Tue May 24 04:50:11 2005
@@ -1,62 +1,49 @@
-<html xmlns:tal="http://xml.zope.org/namespaces/tal"
- xmlns:metal="http://xml.zope.org/namespaces/metal"
- metal:use-macro="here/main_template/macros/master">
-
-<div metal:fill-slot="header"> </div>
+<html metal:use-macro="context/main_template/macros/master">
+<body>
-<div metal:fill-slot="main">
+<metal:slot metal:fill-slot="header"> </metal:slot>
+<metal:slot metal:fill-slot="main">
<div metal:define-macro="dayViewBox"
class="dayViewBox"
- tal:define="DateTime python:modules['DateTime'].DateTime;
- thisDay python:DateTime(request.get('date', DateTime().aCommon()[:12]))">
+ tal:define="thisDay python:DateTime(request.get('date', DateTime().aCommon()[:12]))">
<table class="dayView" cellpadding="0" cellspacing="0" border="0">
-
- <tr>
+ <tr>
<th>
- <a href="#" tal:attributes="href python:here.getPreviousDayLink(template.absolute_url(), thisDay)">«</a>
+ <a href="#" tal:attributes="href python:context.getPreviousDayLink(template.absolute_url(), thisDay)">«</a>
</th>
-
<th tal:content="python:thisDay.aCommon()[:12]" colspan="3" nowrap>Date Heading</th>
-
<th>
- <a href="#" tal:attributes="href python:here.getNextDayLink(template.absolute_url(), thisDay)">»</a>
+ <a href="#" tal:attributes="href python:context.getNextDayLink(template.absolute_url(), thisDay)">»</a>
</th>
-
</tr>
- <tal:events tal:repeat="event python:here.portal_calendar.getEventsForThisDay(thisDay)">
-
+ <tal:events tal:repeat="event python:context.portal_calendar.getEventsForThisDay(thisDay)">
<tr>
-
<td class="heading" colspan="5" nowrap>
<a href="#" tal:attributes="href event/getURL" tal:content="event/Title">
event title
</a>
- </td>
-
+ </td>
</tr>
<tr>
- <td class="startDate" tal:content="python:here.getStartAsString(thisDay, event)" nowrap colspan="2">
+ <td class="startDate" tal:content="python:context.getStartAsString(thisDay, event)" nowrap colspan="2">
Event Start
</td>
-
<td nowrap>
--
</td>
-
- <td class="endDate" tal:content="python:here.getEndAsString(thisDay, event)" nowrap colspan="2">
+ <td class="endDate" tal:content="python:context.getEndAsString(thisDay, event)" nowrap colspan="2">
Event End
</td>
- </tr>
-
+ </tr>
</tal:events>
-
- </div>
-</div>
+ </div>
+</metal:slot>
+</body>
</html>
More information about the CMF-checkins
mailing list