[1] | 1 | <html xmlns:tal="http://xml.zope.org/namespaces/tal" |
---|
| 2 | xmlns:metal="http://xml.zope.org/namespaces/metal" |
---|
| 3 | i18n:domain="plone"> |
---|
| 4 | |
---|
| 5 | <body> |
---|
| 6 | |
---|
| 7 | <div metal:define-macro="portlet" |
---|
| 8 | tal:omit-tag="" |
---|
| 9 | tal:define="DateTime python:modules['DateTime'].DateTime; |
---|
| 10 | current python:DateTime(); |
---|
| 11 | month python:request.get('month', DateTime().month()); |
---|
| 12 | year python:request.get('year', DateTime().year()); |
---|
| 13 | prevMonthTime python:here.getPreviousMonth(month, year); |
---|
| 14 | nextMonthTime python:here.getNextMonth(month, year); |
---|
| 15 | weeks python:here.simpleblog_tool.getEventsForCalendar(month=month, year=year, context=here); |
---|
| 16 | anchor_url request/anchor_url | here_url; |
---|
| 17 | anchor_method request/anchor_method | template/getId; |
---|
| 18 | published_state python:here.simpleblog_tool.getPublishedState()"> |
---|
| 19 | <!-- The calendar, rendered as a table --> |
---|
| 20 | |
---|
| 21 | |
---|
| 22 | <table cellspacing="0" class="simpleBlogCalendar" id="thePloneCalendar" summary="Calendar" i18n:attributes="summary"> |
---|
| 23 | <thead> |
---|
| 24 | <tr> |
---|
| 25 | <th id="calendar-previous"> |
---|
| 26 | <a href="#" tal:attributes="href python:'%s/%s?month:int=%d&year:int=%d' % (anchor_url, anchor_method, prevMonthTime.month(),prevMonthTime.year())">«</a> |
---|
| 27 | </th> |
---|
| 28 | <th colspan="5" |
---|
| 29 | tal:define="date string:$month/1/$year;"> |
---|
| 30 | <span i18n:translate="" tal:omit-tag=""> |
---|
| 31 | <span i18n:name="monthname"> |
---|
| 32 | <span i18n:translate="" |
---|
| 33 | tal:define="monthstring python:DateTime(date).strftime('%B').capitalize();" |
---|
| 34 | tal:attributes="id string:calendar-month-$monthstring" |
---|
| 35 | tal:content="string:$monthstring" |
---|
| 36 | id="calendar-month-month"> </span> |
---|
| 37 | </span> |
---|
| 38 | <span i18n:name="year" |
---|
| 39 | tal:define="year python:DateTime(date).year()" |
---|
| 40 | tal:content="string:$year" |
---|
| 41 | tal:attributes="id string:calendar-year-$year;" |
---|
| 42 | id="calendar-year"> </span> |
---|
| 43 | </span> |
---|
| 44 | </th> |
---|
| 45 | <th id="calendar-next"> |
---|
| 46 | <a href="#" tal:attributes="href python:'%s/%s?month:int=%d&year:int=%d' % (anchor_url, anchor_method, nextMonthTime.month(),nextMonthTime.year())">»</a> |
---|
| 47 | </th> |
---|
| 48 | </tr> |
---|
| 49 | <tr tal:define="weekdays here/portal_calendar/getDays" class="weekdays"> |
---|
| 50 | <tal:block repeat="weekday weekdays"> |
---|
| 51 | <td i18n:translate="" tal:content="weekday">Su</td> |
---|
| 52 | </tal:block> |
---|
| 53 | </tr> |
---|
| 54 | </thead> |
---|
| 55 | <tbody> |
---|
| 56 | <tr tal:repeat="week weeks"> |
---|
| 57 | <tal:block repeat="day week"> |
---|
| 58 | <tal:block define="daynumber day/day; |
---|
| 59 | datestring python: '%d%0.2d%0.2d' % (year, month, daynumber); |
---|
| 60 | javascriptstring string:javascript:%sDay('%s');"> |
---|
| 61 | <td class="event" tal:condition="day/event" |
---|
| 62 | tal:attributes="onmouseout python: javascriptstring % ('hide', datestring); |
---|
| 63 | onmouseover python: javascriptstring % ('show', datestring); |
---|
| 64 | class python:test(current.year()==year and current.month()==month and current.day()==int(daynumber), 'todayevent', 'event')"> |
---|
| 65 | <span tal:define="begEndTimes python:here.getBeginAndEndTimes(day=daynumber, month=month, year=year)" tal:omit-tag=""> |
---|
| 66 | <span tal:define="begin python:DateTime(begEndTimes[0].timeTime()+86400).ISO(); |
---|
| 67 | end python:DateTime(begEndTimes[1].strftime('%m/%d/%y')).ISO(); |
---|
| 68 | pss python:modules['Products'].PythonScripts.standard" tal:omit-tag=""> |
---|
| 69 | <a href="" tal:attributes="href python:here.absolute_url()+'/SimpleBlogDaySearch?startdate=%s'%(pss.url_quote(end))"> |
---|
| 70 | <span tal:replace="python: daynumber or default"> </span> |
---|
| 71 | </a> |
---|
| 72 | </span> |
---|
| 73 | </span> |
---|
| 74 | </td> |
---|
| 75 | <tal:notdayevent tal:condition="not: day/event"> |
---|
| 76 | <td tal:condition="python: current.year()==year and current.month()==month and current.day()==int(daynumber)" |
---|
| 77 | tal:content="python: daynumber or default" class="todaynoevent"> |
---|
| 78 | |
---|
| 79 | </td> |
---|
| 80 | <td tal:condition="not: python: current.year()==year and current.month()==month and current.day()==int(daynumber)" |
---|
| 81 | tal:content="python: daynumber or default"> |
---|
| 82 | |
---|
| 83 | </td> |
---|
| 84 | </tal:notdayevent> |
---|
| 85 | </tal:block> |
---|
| 86 | </tal:block> |
---|
| 87 | </tr> |
---|
| 88 | </tbody> |
---|
| 89 | </table> |
---|
| 90 | |
---|
| 91 | |
---|
| 92 | <!-- The sticky notes --> |
---|
| 93 | <tal:week repeat="week weeks"><tal:day repeat="day week"> |
---|
| 94 | <div class="dayPopup" |
---|
| 95 | id="dummy" |
---|
| 96 | tal:attributes="id python:'day%d%0.2d%0.2d' % (year, month, day['day']) " |
---|
| 97 | tal:condition="day/event"> |
---|
| 98 | <div class="date" tal:content="python:here.toLocalizedTime('%d/%0.2d/%0.2d' % (year, month, day['day']))"> |
---|
| 99 | 2001-04-11 |
---|
| 100 | </div> |
---|
| 101 | <tal:event repeat="anevent day/eventslist"> |
---|
| 102 | <div class="appointment" tal:content="python: here.getEventString(event=anevent)">an event</div> |
---|
| 103 | </tal:event> |
---|
| 104 | </div> |
---|
| 105 | </tal:day> |
---|
| 106 | </tal:week> |
---|
| 107 | |
---|
| 108 | </div> |
---|
| 109 | |
---|
| 110 | </body> |
---|
| 111 | |
---|
| 112 | </html> |
---|