Changeset 4705 for trunk/calendar/inc


Ignore:
Timestamp:
07/13/11 15:35:43 (13 years ago)
Author:
roberto.santosjunior
Message:

Ticket #1950 - Destacar feriados no módulo calendario (dia, semana, mes) r4550

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/calendar/inc/class.uicalendar.inc.php

    r4565 r4705  
    51655165                        ) 
    51665166                    ); 
    5167  
     5167                    $this->bo->read_holidays($params['year']); 
    51685168                    $next = $GLOBALS['phpgw']->datetime->makegmttime(0,0,0,$this->bo->month,$this->bo->day + 7,$this->bo->year); 
    51695169                    $prev = $GLOBALS['phpgw']->datetime->makegmttime(0,0,0,$this->bo->month,$this->bo->day - 7,$this->bo->year); 
     
    51885188                        'new_week'   => $tpl, 
    51895189                    ); 
    5190  
     5190                    $feriados_do_ano = Array(); 
     5191                    foreach ($this->bo->cached_holidays as $key => $value) 
     5192                        { 
     5193                            $feriados_do_ano[$key] = utf8_encode($this->bo->cached_holidays[$key][0]['name']); 
     5194                        } 
    51915195                    $p->set_file($templates); 
    51925196                    $p->set_block('new_week','day','day'); 
     
    52025206                    $p->set_var('user',$GLOBALS['phpgw']->common->grab_owner_name($this->bo->owner)); 
    52035207                    $p->set_var('events_json',json_encode($result_events_json['events_to_show_json'])?json_encode($result_events_json['events_to_show_json']):'null'); 
     5208                    $p->set_var('holidays_json',json_encode($feriados_do_ano)?json_encode($feriados_do_ano):null); 
    52045209                    return $p->fp('out','day'); 
    52055210 
     
    52105215                        $p = CreateObject('phpgwapi.Template',$this->template_dir); 
    52115216                        $p->set_unknowns('keep'); 
    5212  
    52135217                        $tpl = 'new_month.tpl'; 
    52145218 
     
    52575261                                        ) 
    52585262                                ); 
    5259  
     5263                        $this->bo->read_holidays($params['year']); 
    52605264                        $print =  '<a href="javascript:void(0)" id="printFriendly">['.lang('Printer Friendly').']</a>'; 
    52615265 
     
    52775281                        } 
    52785282 
     5283                        $feriados_do_ano = Array(); 
     5284                        foreach ($this->bo->cached_holidays as $key => $value) 
     5285                        { 
     5286                            $feriados_do_ano[$key] = utf8_encode($this->bo->cached_holidays[$key][0]['name']); 
     5287                        } 
    52795288                        $m = mktime(0,0,0,$this->bo->month,1,$this->bo->year); 
    52805289                        $p->set_file($templates); 
     
    52935302                        $p->set_var('user',$GLOBALS['phpgw']->common->grab_owner_name($this->bo->owner)); 
    52945303                        $p->set_var('events_json',json_encode($result_events_json['events_to_show_json'])?json_encode($result_events_json['events_to_show_json']):'null'); 
     5304                        $p->set_var('holidays_json',json_encode($feriados_do_ano)?json_encode($feriados_do_ano):null); 
    52955305                        return $p->fp('out','day'); 
    52965306                } 
Note: See TracChangeset for help on using the changeset viewer.