Ignore:
Timestamp:
05/31/11 13:52:33 (13 years ago)
Author:
rafaelraymundo
Message:

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

File:
1 edited

Legend:

Unmodified
Added
Removed
  • branches/2.2.0.1/calendar/inc/class.uicalendar.inc.php

    r4549 r4550  
    51635163                        ) 
    51645164                    ); 
    5165  
     5165                    $this->bo->read_holidays($params['year']); 
    51665166                    $next = $GLOBALS['phpgw']->datetime->makegmttime(0,0,0,$this->bo->month,$this->bo->day + 7,$this->bo->year); 
    51675167                    $prev = $GLOBALS['phpgw']->datetime->makegmttime(0,0,0,$this->bo->month,$this->bo->day - 7,$this->bo->year); 
     
    51865186                        'new_week'   => $tpl, 
    51875187                    ); 
    5188  
     5188                    $feriados_do_ano = Array(); 
     5189                    foreach ($this->bo->cached_holidays as $key => $value) 
     5190                        { 
     5191                            $feriados_do_ano[$key] = utf8_encode($this->bo->cached_holidays[$key][0]['name']); 
     5192                        } 
    51895193                    $p->set_file($templates); 
    51905194                    $p->set_block('new_week','day','day'); 
     
    52005204                    $p->set_var('user',$GLOBALS['phpgw']->common->grab_owner_name($this->bo->owner)); 
    52015205                    $p->set_var('events_json',json_encode($result_events_json['events_to_show_json'])?json_encode($result_events_json['events_to_show_json']):'null'); 
     5206                    $p->set_var('holidays_json',json_encode($feriados_do_ano)?json_encode($feriados_do_ano):null); 
    52025207                    return $p->fp('out','day'); 
    52035208 
     
    52085213                        $p = CreateObject('phpgwapi.Template',$this->template_dir); 
    52095214                        $p->set_unknowns('keep'); 
    5210  
    52115215                        $tpl = 'new_month.tpl'; 
    52125216 
     
    52555259                                        ) 
    52565260                                ); 
    5257  
     5261                        $this->bo->read_holidays($params['year']); 
    52585262                        $print =  '<a href="javascript:void(0)" id="printFriendly">['.lang('Printer Friendly').']</a>'; 
    52595263 
     
    52755279                        } 
    52765280 
     5281                        $feriados_do_ano = Array(); 
     5282                        foreach ($this->bo->cached_holidays as $key => $value) 
     5283                        { 
     5284                            $feriados_do_ano[$key] = utf8_encode($this->bo->cached_holidays[$key][0]['name']); 
     5285                        } 
    52775286                        $m = mktime(0,0,0,$this->bo->month,1,$this->bo->year); 
    52785287                        $p->set_file($templates); 
     
    52915300                        $p->set_var('user',$GLOBALS['phpgw']->common->grab_owner_name($this->bo->owner)); 
    52925301                        $p->set_var('events_json',json_encode($result_events_json['events_to_show_json'])?json_encode($result_events_json['events_to_show_json']):'null'); 
     5302                        $p->set_var('holidays_json',json_encode($feriados_do_ano)?json_encode($feriados_do_ano):null); 
    52935303                        return $p->fp('out','day'); 
    52945304                } 
Note: See TracChangeset for help on using the changeset viewer.