Changeset 1616 for trunk/system/views
- Timestamp:
- 12/26/2007 08:43:14 AM (13 months ago)
- Files:
-
- 1 modified
-
trunk/system/views/kohana_calendar.php (modified) (3 diffs)
Legend:
- Unmodified
- Added
- Removed
-
trunk/system/views/kohana_calendar.php
r1615 r1616 1 1 <?php 2 3 $first_day = mktime(1, 0, 0, $month, 1, $year); 4 $today = (date('Y/m') === date('Y/m', $first_day)) ? date('j') : FALSE; 5 2 6 /** 3 7 * @todo This needs to be moved to an i18n file, or be configured in the library. … … 11 15 table.calendar { text-align: right; } 12 16 table.calendar caption { font-size: 1.5em; padding: 0.2em; } 13 table.calendar th, table.calendar td { padding: 0.2em; background: #fff; }17 table.calendar th, table.calendar td { padding: 0.2em; background: #fff; border: 0; } 14 18 table.calendar td:hover { background: #ddf; } 15 table.calendar td.prev-next { background: #fff; color: #666; } 19 table.calendar td.prev-next { background: #ccc; color: #999; } 20 table.calendar td.today { color: #800; } 16 21 </style> 17 22 18 23 <table class="calendar"> 19 <caption><?php echo strftime('%B %Y', mktime(1, 0, 0, $month, 1, $year)) ?></caption>24 <caption><?php echo strftime('%B %Y', $first_day) ?></caption> 20 25 <tr> 21 26 <?php foreach ($headings as $day): ?> … … 30 35 <?php else: ?> 31 36 <?php 37 38 if ($today > 0 AND $day[0] == $today) 39 { 40 $class = ' class="today"'; 41 } 42 else 43 { 44 $class = ''; 45 } 32 46 /** 33 47 * @todo Need to add assignable stuff to this. For example, making certain dates into links. 34 48 */ 35 49 ?> 36 <td ><?php echo $day[0] ?></td>37 <?php endif ?>50 <td<?php echo $class ?>><?php echo $day[0] ?></td> 51 <?php endif; ?> 38 52 <?php endforeach ?> 39 53 </tr>
