Changeset 2347 for trunk/system/views

Show
Ignore:
Timestamp:
03/25/2008 02:34:04 PM (8 months ago)
Author:
Shadowhand
Message:

Changes to Calendar:

  • Removed "modulus" condition (better served by a callback)
  • Updated default calendar view
Files:
1 modified

Legend:

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

    r2337 r2347  
    66$headings = array('Sun', 'Mon', 'Tue', 'Wed', 'Thu', 'Fri', 'Sat'); 
    77 
     8// Previous and next month timestamps 
     9$next = mktime(0, 0, 0, $month + 1, 1, $year); 
     10$prev = mktime(0, 0, 0, $month - 1, 1, $year); 
     11 
     12// Previous and next month query URIs 
     13$prev = Router::$current_uri.'?'.http_build_query(array_merge($_GET, array('month' => date('n', $prev), 'year' => date('Y', $prev)))); 
     14$next = Router::$current_uri.'?'.http_build_query(array_merge($_GET, array('month' => date('n', $next), 'year' => date('Y', $next)))); 
     15 
    816?> 
    917<table class="calendar"> 
    10 <caption><?php echo strftime('%B %Y', mktime(0, 0, 0, $month, 1, $year)) ?></caption> 
     18<tr class="controls"> 
     19<td class="prev"><?php echo html::anchor($prev, '&laquo;') ?></td> 
     20<td class="title" colspan="5"><?php echo strftime('%B %Y', mktime(0, 0, 0, $month, 1, $year)) ?></td> 
     21<td class="next"><?php echo html::anchor($next, '&raquo;') ?></td> 
     22</tr> 
    1123<tr> 
    1224<?php