changeset 230:feb2cb6241be

styles for calendar.
author casties
date Tue, 12 Nov 2013 13:04:38 +0100
parents d4216a848547
children 649f74b167e6
files css/mpiwg.css zpt/www/common_template.zpt
diffstat 2 files changed, 60 insertions(+), 0 deletions(-) [+]
line wrap: on
line diff
--- a/css/mpiwg.css	Tue Nov 05 15:38:25 2013 +0100
+++ b/css/mpiwg.css	Tue Nov 12 13:04:38 2013 +0100
@@ -1447,6 +1447,47 @@
 }
 
 /*
+ * calendar
+ */
+div.calendar {
+    background-color: #f8f5ef;
+}
+div.calendar h2 {
+    position: relative;
+    font-family: Georgia, Times, serif;
+    font-size: 16px;
+    font-style: italic;
+    color: #887163;
+    text-align: center;
+    padding: 5px;
+    border-bottom: 1px solid white;
+}
+div.calendar h2 .page_prev {
+    position: absolute;
+    left: 5px;
+    top: 8px;
+}
+div.calendar h2 .page_next {
+    position: absolute;
+    right: 5px;
+    top: 8px;
+}
+div.calendar table {
+    width: 100%;
+    border-collapse: collapse;
+    border: 8px solid #f8f5ef;
+}
+div.calendar table td {
+    text-align: center;
+    background-color: white;
+    padding: 3px;
+    border: 1px solid #f8f5ef;
+}
+div.calendar table th {
+    font-weight: normal;
+}
+
+/*
  * footer
  */
 #footservices {
--- a/zpt/www/common_template.zpt	Tue Nov 05 15:38:25 2013 +0100
+++ b/zpt/www/common_template.zpt	Tue Nov 12 13:04:38 2013 +0100
@@ -156,5 +156,24 @@
   <!-- /yesno_input_radio -->
   
   
+  <!-- sidebar month calendar for events
+      @param cal: month calendar object from getMonthCalendar(dateObject=showDate, lang=lang) -->
+  <div class="sideblock calendar" metal:define-macro="sideblock_calendar">
+    <h2>
+      <a class="page_prev" tal:attributes="href string:?year=${cal/prev/year}&month=${cal/prev/month}"><img tal:attributes="src string:$root/images/slider_prev.png"/></a>
+      <span tal:content="cal/datestring"/>
+      <a class="page_next" tal:attributes="href string:?year=${cal/next/year}&month=${cal/next/month}"><img tal:attributes="src string:$root/images/slider_next.png"/></a>
+    </h2>
+    <table>
+      <tr>
+        <th tal:repeat="day cal/weekdays" tal:content="day"/>
+      </tr>
+      <tr tal:repeat="week cal/weeks">
+        <td tal:repeat="day week"><span tal:condition="not:day/events" tal:content="day/day"/><a tal:condition="day/events" tal:content="day/day" tal:attributes="href python:'?year=%s&month=%s#%s'%(cal['year'],cal['month'],day['events'][0].getDate());"/></td>
+      </tr>
+    </table>
+  </div>
+  <!-- /sideblock_calendar -->
+  
 </body>
 </html>