Changeset 3184 for trunk/system/views

Show
Ignore:
Timestamp:
07/21/2008 11:40:48 PM (4 months ago)
Author:
Shadowhand
Message:

Fix for #623, and better i18n on calendar day headings. Thanks dyron!

Files:
1 modified

Legend:

Unmodified
Added
Removed
  • trunk/system/views/kohana_calendar.php

    r2350 r3184  
    11<?php 
    22 
    3 /** 
    4  * @todo This needs to be moved to an i18n file, or be configured in the library. 
    5  */ 
    6 $headings = array('Sun', 'Mon', 'Tue', 'Wed', 'Thu', 'Fri', 'Sat'); 
     3// Get the day names 
     4$days = Calendar::days(TRUE); 
    75 
    86// Previous and next month timestamps 
     
    2624</tr> 
    2725<tr> 
    28 <?php 
    29  
    30 foreach ($headings as $day): 
    31  
    32 ?> 
     26<?php foreach ($days as $day): ?> 
    3327<th><?php echo $day ?></th> 
    34 <?php 
    35  
    36 endforeach 
    37  
    38 ?> 
     28<?php endforeach ?> 
    3929</tr> 
    40 <?php 
    41  
    42 foreach ($weeks as $week): 
    43  
    44 ?> 
     30<?php foreach ($weeks as $week): ?> 
    4531<tr> 
    46 <?php 
    47  
    48 foreach ($week as $day): 
     32<?php foreach ($week as $day): 
    4933 
    5034list ($number, $current, $data) = $day; 
     
    6347?> 
    6448<td class="<?php echo implode(' ', $classes) ?>"><span class="day"><?php echo $day[0] ?></span><?php echo $output ?></td> 
    65 <?php 
    66  
    67 endforeach 
    68  
    69 ?> 
     49<?php endforeach ?> 
    7050</tr> 
    71 <?php 
    72  
    73 endforeach 
    74  
    75 ?> 
     51<?php endforeach ?> 
    7652</table>