Author: jvloothuis
Date: Thu Oct 11 21:31:28 2007
New Revision: 47403

Modified:
   kukit/KssTheme/trunk/skins/ksstheme_templates/portlet_calendar.pt
   kukit/KssTheme/trunk/skins/ksstheme_templates/portlet_search.pt
Log:
Fixes from Thijs (without exchange f*ckups)

Modified: kukit/KssTheme/trunk/skins/ksstheme_templates/portlet_calendar.pt
==============================================================================
--- kukit/KssTheme/trunk/skins/ksstheme_templates/portlet_calendar.pt   
(original)
+++ kukit/KssTheme/trunk/skins/ksstheme_templates/portlet_calendar.pt   Thu Oct 
11 21:31:28 2007
@@ -1,61 +1,127 @@
-<META HTTP-EQUIV="Content-Type" CONTENT="text/html; charset=iso-8859-1">
-<html                                                                          
                                                        >
-
-<body>
-
-<div                                                                           
                                                                                
                                                                                
                                                                                
                                                                                
                                                                                
                                                                                
                                                                                
                                                                                
                                                                                
                                                                                
                                                                                
                              
                                                                                
                                                                                
                                                                                
                                                                                
                                                                                
                       >
-
-    
-    <div class="portlet" id="portlet-calendar">
-
-    <table class="ploneCalendar" id="thePloneCalendar" summary="Calendar"      
                                      >
-        <thead>
-            <tr>
+<html xmlns:tal="http://xml.zope.org/namespaces/tal";
+      xmlns:metal="http://xml.zope.org/namespaces/metal";
+      i18n:domain="plone">
+
+<body>
+
+<div metal:define-macro="portlet"
+     tal:omit-tag=""
+     tal:define="view context/@@calendar_view;
+                 DateTime nocall:view/DateTime;
+                 current view/current;
+                 current_day view/current_day;
+                 yearmonth view/getYearAndMonthToDisplay;
+                 nextYearMax view/nextYearMax;
+                 prevYearMin view/prevYearMin;
+                 year view/year;
+                 month view/month;
+                 prevMonthTime view/prevMonthTime;
+                 nextMonthTime view/nextMonthTime;
+                 weeks view/weeks;
+                 weekdays view/getWeekdays;
+                 englishMonthName view/getEnglishMonthName;
+                 monthName view/getMonthName;
+                 isToday nocall:view/isToday;
+                 showStates view/showStates;
+                 showPrevMonth view/showPrevMonth;
+                 showNextMonth view/showNextMonth;
+
+                 anchor_url request/anchor_url | here_url;
+                 query_string python:request.get('orig_query', None);
+                 query_string python: (query_string is None and 
request.get('QUERY_STRING', None)) or query_string;
+                 url_quote_plus 
python:modules['Products.PythonScripts.standard'].url_quote_plus;
+                 anchor_method request/anchor_method | template/getId;
+                 getEventString nocall:here/getEventString;">
+
+    <!-- The calendar, rendered as a table -->
+    <div class="portlet" id="portlet-calendar">
+
+    <table class="ploneCalendar" id="thePloneCalendar" summary="Calendar" 
i18n:attributes="summary summary_calendar;">
+        <thead>
+            <tr>
                 <th id="calendar-previous"
-                                                                               
             >
+                    tal:attributes="id python: test(showPrevMonth, 
'calendar-previous', '')">
                     <a href="#" rel="nofollow"
                        title="Previous month"
-                                                                               
                                                                                
                                                                                
                                                                                
                                 >&laquo;</a>
-                </th>
-                <th colspan="5">
-                    <span                                  >
-                        <span                                                  
                                                                                
                                                                                
                                 id="calendar-month-month">monthname</span>
-                        <span                                                  
                                                                                
                                                                                
                   id="calendar-year">year</span>
-                    </span>
-                </th>
+                       tal:attributes="href 
python:'%s/%s?%s&amp;month:int=%d&amp;year:int=%d&amp;orig_query=%s' % 
(anchor_url, anchor_method, query_string, 
prevMonthTime.month(),prevMonthTime.year(),url_quote_plus(query_string))"
+                       tal:condition="showPrevMonth"
+                       i18n:attributes="title 
title_previous_month;">&laquo;</a>
+                </th>
+                <th colspan="5">
+                    <span i18n:translate="" tal:omit-tag="">
+                        <span i18n:name="monthname"
+                              tal:attributes="id 
string:calendar-month-$englishMonthName"
+                              tal:content="monthName"
+                              tal:omit-tag=""
+                              id="calendar-month-month">monthname</span>
+                        <span i18n:name="year"
+                              tal:content="string:$year"
+                              tal:attributes="id string:calendar-year-$year;"
+                              tal:omit-tag=""
+                              id="calendar-year">year</span>
+                    </span>
+                </th>
                   <th id="calendar-next"
-                                                                               
           >
+                      tal:attributes="id python: test(showNextMonth, 
'calendar-next', '')">
                     <a href="#" rel="nofollow"
                        title="Next month"
-                                                                               
                                                                                
                                                                                
                                                                                
                             >&raquo;</a>
-                </th>
-            </tr>
-            <tr class="weekdays">
-                
-                    <td                      >Su</td>
-                
-            </tr>
-        </thead>
-
-        
-        <tbody>
-            <tr                                     ><td class="event"
-                                                                               
                                                                                
  ><a href=""
-                                                                               
                                                                                
                                                                                
                                                                                
                                                                                
                                                                                
                                                                                
       >
-                            31
+                       tal:attributes="href 
python:'%s/%s?%s&amp;month:int=%d&amp;year:int=%d&amp;orig_query=%s' % 
(anchor_url, anchor_method, query_string, 
nextMonthTime.month(),nextMonthTime.year(),url_quote_plus(query_string))"
+                       tal:condition="showNextMonth"
+                       i18n:attributes="title title_next_month;">&raquo;</a>
+                </th>
+            </tr>
+            <tr class="weekdays">
+                <tal:data tal:repeat="weekday weekdays">
+                    <td tal:content="weekday">Su</td>
+                </tal:data>
+            </tr>
+        </thead>
+
+        <tal:comment replace="nothing"><!--
+        Sorry for the obtuse formatting below (the stray end-of-tag markers), 
but until
+        tal:block doesn't render an entire line of blank space when used, this 
is the only way.
+        --></tal:comment>
+        <tbody>
+            <tr tal:repeat="week weeks"
+            ><tal:block repeat="day week"
+            ><tal:day define="daynumber day/day;"
+            ><tal:isday condition="daynumber"
+                ><tal:block define="day_event day/event;
+                                    is_today python: isToday(daynumber)"
+                    ><td class="event"
+                        tal:condition="day_event"
+                        tal:attributes="class python:is_today and 'todayevent' 
or 'event'"
+                    ><tal:data tal:define="cur_date 
python:DateTime(year,month,daynumber);
+                                           begin 
python:url_quote_plus((cur_date.latestTime()).ISO());
+                                           end 
python:url_quote_plus(cur_date.earliestTime().ISO());"
+                               tal:omit-tag=""
+                        ><a href=""
+                            tal:define="review_state_str 
python:''.join(map(lambda x : 'review_state=%s&amp;' % url_quote_plus(x), 
showStates))"
+                            tal:attributes="href 
string:${portal_url}/search?${review_state_str}start.query:record:list:date=${begin}&amp;start.range:record=max&amp;end.query:record:list:date=${end}&amp;end.range:record=min;
+                                            title 
python:'\n'.join([toLocalizedTime(cur_date)]+[getEventString(e) for e in 
day['eventslist']]);"
+                            tal:content="daynumber">
+                            31
                         </a
-                    >
+                    ></tal:data>
                     </td
-                    ><td                                                       
                                                            ></td
-                    ><td></td
-            >
-            </tr>
-        </tbody>
-    </table>
-
-</div>
-</div>
-
-</body>
-
-</html>
+                    ><tal:notdayevent tal:condition="not: day_event"
+                    ><td tal:attributes="class python:is_today and 
'todaynoevent' or None"
+                         tal:content="daynumber"></td
+                    ></tal:notdayevent
+                ></tal:block
+            ></tal:isday
+            ><tal:notisday condition="not: daynumber"
+                ><td></td
+            ></tal:notisday
+            ></tal:day
+            ></tal:block>
+            </tr>
+        </tbody>
+    </table>
+
+</div>
+</div>
+
+</body>
+
+</html>

Modified: kukit/KssTheme/trunk/skins/ksstheme_templates/portlet_search.pt
==============================================================================
--- kukit/KssTheme/trunk/skins/ksstheme_templates/portlet_search.pt     
(original)
+++ kukit/KssTheme/trunk/skins/ksstheme_templates/portlet_search.pt     Thu Oct 
11 21:31:28 2007
@@ -1,10 +1,13 @@
-<META HTTP-EQUIV="Content-Type" CONTENT="text/html; charset=iso-8859-1">
-<html                                                                          
                                                          >
+<html xmlns:tal="http://xml.zope.org/namespaces/tal";
+      xmlns:metal="http://xml.zope.org/namespaces/metal";
+      i18n:domain="plone">
 <body>
-<div                                                                           
      >
+<div metal:define-macro="portlet"
+       i18n:domain="plone"
+       tal:omit-tag="">
     <div class="portlet" id="search">
         <div class="search-title">Search</div>
-        <div                                                            >
+        <div metal:use-macro="here/global_searchbox/macros/quick_search">
                The quicksearch box, normally placed at the top right
         </div>
     </div>
_______________________________________________
Kukit-checkins mailing list
[email protected]
http://codespeak.net/mailman/listinfo/kukit-checkins

Reply via email to