| 1 |
<?php |
| 2 |
$base_link_params = array( |
| 3 |
$this->conf['path'], 'index', |
| 4 |
'start', $start_date, |
| 5 |
); |
| 6 |
|
| 7 |
switch( $display ) |
| 8 |
{ |
| 9 |
case 'staff': |
| 10 |
$base_link_params[] = 'id'; |
| 11 |
$base_link_params[] = $current_staff->id; |
| 12 |
break; |
| 13 |
case 'location': |
| 14 |
$base_link_params[] = 'id'; |
| 15 |
$base_link_params[] = $current_location->id; |
| 16 |
break; |
| 17 |
} |
| 18 |
?> |
| 19 |
<ul class="pagination"> |
| 20 |
<?php |
| 21 |
$range_options = array( |
| 22 |
'month' => lang('time_month'), |
| 23 |
'week' => lang('time_week'), |
| 24 |
); |
| 25 |
?> |
| 26 |
<?php foreach( $range_options as $r => $r_label) : ?> |
| 27 |
<?php |
| 28 |
if( $r == $range ) |
| 29 |
continue; |
| 30 |
|
| 31 |
$link_params = array( |
| 32 |
'range', $r |
| 33 |
); |
| 34 |
$link_params = array_merge( $base_link_params, $link_params ); |
| 35 |
?> |
| 36 |
<li> |
| 37 |
<a href="<?php echo ci_site_url($link_params); ?>"> |
| 38 |
<i class="fa fa-calendar"></i> <?php echo $r_label; ?> |
| 39 |
</a> |
| 40 |
</li> |
| 41 |
<?php endforeach; ?> |
| 42 |
</ul> |