phpgroupware-cvs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Phpgroupware-cvs] CVS: calendar/inc class.uialarm.inc.php,1.5,1.6 class


From: Ralf Becker <address@hidden>
Subject: [Phpgroupware-cvs] CVS: calendar/inc class.uialarm.inc.php,1.5,1.6 class.uicalendar.inc.php,1.98,1.99 class.uiholiday.inc.php,1.5,1.6 class.uiicalendar.inc.php,1.5,1.6
Date: Mon, 21 Apr 2003 07:00:55 -0400

Update of /cvsroot/phpgroupware/calendar/inc
In directory subversions:/tmp/cvs-serv15617/inc

Modified Files:
        class.uialarm.inc.php class.uicalendar.inc.php 
        class.uiholiday.inc.php class.uiicalendar.inc.php 
Log Message:
imported changes from .16 (app-header & styleguide-conformace)

Index: class.uialarm.inc.php
===================================================================
RCS file: /cvsroot/phpgroupware/calendar/inc/class.uialarm.inc.php,v
retrieving revision 1.5
retrieving revision 1.6
diff -C2 -r1.5 -r1.6
*** class.uialarm.inc.php       23 Nov 2002 14:19:32 -0000      1.5
--- class.uialarm.inc.php       21 Apr 2003 11:00:52 -0000      1.6
***************
*** 68,74 ****
                        }
  
!                       unset($GLOBALS['phpgw_info']['flags']['noheader']);
!               unset($GLOBALS['phpgw_info']['flags']['nonavbar']);
!               $GLOBALS['phpgw']->common->phpgw_header();
  
                        $this->template = 
CreateObject('phpgwapi.Template',$this->template_dir);
--- 68,75 ----
                        }
  
!                       unset($GLOBALS['phpgw_info']['flags']['noheader']);
!                       unset($GLOBALS['phpgw_info']['flags']['nonavbar']);
!                       $GLOBALS['phpgw_info']['flags']['app_header'] = 
$GLOBALS['phpgw_info']['apps']['calendar']['title'].' - '.lang('Alarm 
Management');
!                       $GLOBALS['phpgw']->common->phpgw_header();
  
                        $this->template = 
CreateObject('phpgwapi.Template',$this->template_dir);
***************
*** 77,82 ****
                        $this->template->set_file(
                                Array(
!                                       'alarm' => 'alarm.tpl'
!                               )
                        );
                        
$this->template->set_block('alarm','alarm_management','alarm_management');
--- 78,83 ----
                        $this->template->set_file(
                                Array(
!                                       'alarm' => 'alarm.tpl'
!                               )
                        );
                        
$this->template->set_block('alarm','alarm_management','alarm_management');
***************
*** 97,115 ****
                {
                        $this->prep_page();
!                       echo 
ExecMethod('calendar.uicalendar.view_event',$this->event);
  
!                       
$this->template->set_var('hr_text','<center><b>'.lang('Alarms').'</b></center></br><hr>');
!                       $this->template->parse('row','hr',True);
                        $var = Array(
                                'action_url'    => 
$GLOBALS['phpgw']->link('/index.php',Array('menuaction'=>'calendar.uialarm.form_handler')),
                                'time_lang'             => lang('Time'),
                                'text_lang'             => lang('Text'),
!                               'enabled_pict'          => 
$GLOBALS['phpgw']->common->image('calendar','enabled.gif'),
                                'disabled_pict' => 
$GLOBALS['phpgw']->common->image('calendar','disabled.gif')
                        );
-                       
                        
$this->output_template_array('row','alarm_headers',$var);
-                       $this->template->set_var('hr_text','<hr>');
-                       $this->template->parse('row','hr',True);
  
                        if($this->event['alarm'])
--- 98,121 ----
                {
                        $this->prep_page();
!                       
ExecMethod('calendar.uicalendar.view_event',$this->event);
!                       echo "<br>\n";
!                       $GLOBALS['phpgw']->template->set_var(array(
!                               'hr_text'       => lang('Alarms').':',
!                               'button_left'   => '',
!                               'button_center' => '',
!                               'button_right'  => ''
!                       ));
!                       $GLOBALS['phpgw']->template->fp('row','hr',True);
!                       
$GLOBALS['phpgw']->template->fp('phpgw_body','view_event');
  
!                       
                        $var = Array(
                                'action_url'    => 
$GLOBALS['phpgw']->link('/index.php',Array('menuaction'=>'calendar.uialarm.form_handler')),
                                'time_lang'             => lang('Time'),
                                'text_lang'             => lang('Text'),
!                               'enabled_pict'  => 
$GLOBALS['phpgw']->common->image('calendar','enabled.gif'),
                                'disabled_pict' => 
$GLOBALS['phpgw']->common->image('calendar','disabled.gif')
                        );
                        
$this->output_template_array('row','alarm_headers',$var);
  
                        if($this->event['alarm'])
***************
*** 128,135 ****
                                }
                        }
!                       $this->template->set_var('hr_text','<hr>');
!                       $this->template->parse('row','hr',True);
! 
!                       echo $this->template->fp('out','alarm_management');
                }
  
--- 134,138 ----
                                }
                        }
!                       $this->template->fp('phpgw_body','alarm_management');
                }
  

Index: class.uicalendar.inc.php
===================================================================
RCS file: /cvsroot/phpgroupware/calendar/inc/class.uicalendar.inc.php,v
retrieving revision 1.98
retrieving revision 1.99
diff -C2 -r1.98 -r1.99
*** class.uicalendar.inc.php    12 Apr 2003 19:18:58 -0000      1.98
--- class.uicalendar.inc.php    21 Apr 2003 11:00:52 -0000      1.99
***************
*** 132,135 ****
--- 132,159 ----
                }
  
+               /*!
+               @function error_exit
+               @abstract shows $msg centered on the screen and exit
+               @syntax error_exit($msg)
+               @param $msg lang()'ed msg-text or one of the predefined 
messages (see below)
+               */
+               function error_exit($msg)
[...1244 lines suppressed...]
                        if ($this->bo->return_to)
                        {
***************
*** 4352,4359 ****
                                );
                                $p->set_var($var);
!                               $extra_buttons .= ($event['id']>0?'<br>':'') . 
$p->fp('out','form_button');
                        }
!                       $p->set_var('extra_buttons',$extra_buttons);
!                       
                        $p->pparse('out','edit_entry');
                }
--- 4376,4382 ----
                                );
                                $p->set_var($var);
!                               $cancel_button = $p->fp('out','form_button');
                        }
!                       $p->set_var('cancel_button',$cancel_button);
                        $p->pparse('out','edit_entry');
                }

Index: class.uiholiday.inc.php
===================================================================
RCS file: /cvsroot/phpgroupware/calendar/inc/class.uiholiday.inc.php,v
retrieving revision 1.5
retrieving revision 1.6
diff -C2 -r1.5 -r1.6
*** class.uiholiday.inc.php     27 Feb 2003 22:57:54 -0000      1.5
--- class.uiholiday.inc.php     21 Apr 2003 11:00:52 -0000      1.6
***************
*** 42,47 ****
                        $this->base_url = $this->bo->base_url;
                        $this->template_dir = 
$GLOBALS['phpgw']->common->get_tpl_dir('calendar');
-                       
                        $this->sb = CreateObject('phpgwapi.sbox');
                }
  
--- 42,48 ----
                        $this->base_url = $this->bo->base_url;
                        $this->template_dir = 
$GLOBALS['phpgw']->common->get_tpl_dir('calendar');
                        $this->sb = CreateObject('phpgwapi.sbox');
+ 
+                       $GLOBALS['phpgw_info']['flags']['app_header'] = 
$GLOBALS['phpgw_info']['apps']['calendar']['title'].' - '.lang('Holiday 
Management');
                }
  
***************
*** 53,57 ****
                        $GLOBALS['phpgw']->common->phpgw_header();
  
!                       $p = 
CreateObject('phpgwapi.Template',$this->template_dir);
                        $p->set_file(Array('locales'=>'locales.tpl'));
                        $p->set_block('locales','list','list');
--- 54,58 ----
                        $GLOBALS['phpgw']->common->phpgw_header();
  
!                       $p = &$GLOBALS['phpgw']->template;
                        $p->set_file(Array('locales'=>'locales.tpl'));
                        $p->set_block('locales','list','list');
***************
*** 149,153 ****
  
                        $var = Array(
!                               'th_bg'                 => 
$phpgw_info['theme']['th_bg'],
                                'left_next_matchs'      => 
$GLOBALS['phpgw']->nextmatchs->left('/index.php',$this->bo->start,$this->bo->total,'&menuaction=calendar.uiholiday.edit_locale&locale='.$this->bo->locales[0].'&year='.$this->bo->year),
                                'right_next_matchs'     => 
$GLOBALS['phpgw']->nextmatchs->right('/index.php',$this->bo->start,$this->bo->total,'&menuaction=calendar.uiholiday.edit_locale&locale='.$this->bo->locales[0].'&year='.$this->bo->year),
--- 150,154 ----
  
                        $var = Array(
!                               'th_bg'                 => 
$GLOBALS['phpgw_info']['theme']['th_bg'],
                                'left_next_matchs'      => 
$GLOBALS['phpgw']->nextmatchs->left('/index.php',$this->bo->start,$this->bo->total,'&menuaction=calendar.uiholiday.edit_locale&locale='.$this->bo->locales[0].'&year='.$this->bo->year),
                                'right_next_matchs'     => 
$GLOBALS['phpgw']->nextmatchs->right('/index.php',$this->bo->start,$this->bo->total,'&menuaction=calendar.uiholiday.edit_locale&locale='.$this->bo->locales[0].'&year='.$this->bo->year),
***************
*** 235,241 ****
                        unset($GLOBALS['phpgw_info']['flags']['nonavbar']);
                        $GLOBALS['phpgw_info']['flags']['noappfooter'] = True;
                        $GLOBALS['phpgw']->common->phpgw_header();
  
!                       $t = 
CreateObject('phpgwapi.Template',$this->template_dir);
                        
$t->set_file(Array('holiday'=>'holiday.tpl','form_button'=>'form_button_script.tpl'));
                        $t->set_block('holiday','form','form');
--- 236,243 ----
                        unset($GLOBALS['phpgw_info']['flags']['nonavbar']);
                        $GLOBALS['phpgw_info']['flags']['noappfooter'] = True;
+                       $GLOBALS['phpgw_info']['flags']['app_header'] = 
$GLOBALS['phpgw_info']['apps']['calendar']['title'].' - '.($this->bo->id ? 
lang('Edit') : lang('Add')).' '.lang('Holiday');
                        $GLOBALS['phpgw']->common->phpgw_header();
  
!                       $t = &$GLOBALS['phpgw']->template;
                        
$t->set_file(Array('holiday'=>'holiday.tpl','form_button'=>'form_button_script.tpl'));
                        $t->set_block('holiday','form','form');
***************
*** 267,271 ****
  
  // Date
!                       
$this->display_item($t,lang('Date'),$GLOBALS['phpgw']->common->dateformatorder($this->sb->getYears('holiday[year]',$holiday['occurence']>1900?$holiday['occurence']:0),$this->sb->getMonthText('holiday[month_num]',$holiday['month']),$this->sb->getDays('holiday[mday]',$holiday['day'])));
  
  // Occurence
--- 269,274 ----
  
  // Date
!                       
$this->display_item($t,lang('Date'),$GLOBALS['phpgw']->common->dateformatorder($this->sb->getYears('holiday[year]',$holiday['occurence']>1900?$holiday['occurence']:0),$this->sb->getMonthText('holiday[month_num]',$holiday['month']),$this->sb->getDays('holiday[mday]',$holiday['day'])).
!                               '&nbsp;'.lang('Set a Year only for one-time / 
non-regular holidays.'));
  
  // Occurence
***************
*** 301,306 ****
                        }
                        $dow_html = '<select 
name="holiday[dow]">'."\n".$out.'</select>'."\n";
!                       
$this->display_item($t,lang('Occurence'),$occurence_html.'&nbsp;'.$dow_html);
!                       $this->display_item($t,lang('Observance Rule'),'<input 
type="checkbox" name="holiday[observance_rule]" 
value="True"'.($holiday['observance_rule']?' checked':'').'>');
  
                        $t->set_var('lang_add',lang('Save'));
--- 304,311 ----
                        }
                        $dow_html = '<select 
name="holiday[dow]">'."\n".$out.'</select>'."\n";
!                       
$this->display_item($t,lang('Occurence'),$occurence_html.'&nbsp;'.$dow_html.
!                               '&nbsp;'.lang('You can either set a Year or a 
Occurence, not both !!!'));
!                       $this->display_item($t,lang('Observance Rule'),'<input 
type="checkbox" name="holiday[observance_rule]" 
value="True"'.($holiday['observance_rule']?' checked':'').'>'.
!                               '&nbsp;'.lang('If checked holidays falling on a 
weekend, are taken on the monday after.'));
  
                        $t->set_var('lang_add',lang('Save'));
***************
*** 311,315 ****
                                $link_params = Array(
                                        'menuaction'    => 
'calendar.uiholiday.edit_locale',
!                                       'year'  => $this->bo->year,
                                        'locale'                => 
$this->bo->locales[0]
                                );
--- 316,320 ----
                                $link_params = Array(
                                        'menuaction'    => 
'calendar.uiholiday.edit_locale',
!                                       'year'                  => 
$this->bo->year,
                                        'locale'                => 
$this->bo->locales[0]
                                );
***************
*** 322,333 ****
                        }
                        
!                       $var = Array(
                                'action_url_button'     => 
$GLOBALS['phpgw']->link($this->base_url,$link_params),
                                'action_text_button'    => lang('Cancel'),
                                'action_confirm_button' => '',
                                'action_extra_field'    => ''
!                       );
!                       $t->set_var($var);
                        $t->parse('cancel_button','form_button');
                        $t->pparse('out','form');
                }
--- 327,358 ----
                        }
                        
!                       $t->set_var(Array(
                                'action_url_button'     => 
$GLOBALS['phpgw']->link($this->base_url,$link_params),
                                'action_text_button'    => lang('Cancel'),
                                'action_confirm_button' => '',
                                'action_extra_field'    => ''
!                       ));
                        $t->parse('cancel_button','form_button');
+                       
+                       if ($this->bo->id)
+                       {
+                               $link_params = Array(
+                                       'menuaction'    => 
'calendar.uiholiday.delete_holiday',
+                                       'year'                  => 
$this->bo->year,
+                                       'locale'                => 
$this->bo->locales[0],
+                                       'id'                    => $this->bo->id
+                               );
+                               $t->set_var(Array(
+                                       'action_url_button'     => 
$GLOBALS['phpgw']->link($this->base_url,$link_params),
+                                       'action_text_button'    => 
lang('Delete'),
+                                       'action_confirm_button' => '',
+                                       'action_extra_field'    => ''
+                               ));
+                               $t->parse('delete_button','form_button');
+                       }
+                       else
+                       {
+                               $t->set_var('delete_button','&nbsp;');
+                       }
                        $t->pparse('out','form');
                }
***************
*** 472,475 ****
--- 497,501 ----
                {
                        $var = Array(
+                               'tr_color' => 
$GLOBALS['phpgw']->nextmatchs->alternate_row_color(),
                                'field' => $field,
                                'data'  => $data

Index: class.uiicalendar.inc.php
===================================================================
RCS file: /cvsroot/phpgroupware/calendar/inc/class.uiicalendar.inc.php,v
retrieving revision 1.5
retrieving revision 1.6
diff -C2 -r1.5 -r1.6
*** class.uiicalendar.inc.php   24 Jun 2002 23:24:24 -0000      1.5
--- class.uiicalendar.inc.php   21 Apr 2003 11:00:52 -0000      1.6
***************
*** 31,37 ****
                        $this->bo = CreateObject('calendar.boicalendar');
                        $this->template = $GLOBALS['phpgw']->template;
                }
  
- 
                function print_test($val,$title,$x_pre='')
                {
--- 31,37 ----
                        $this->bo = CreateObject('calendar.boicalendar');
                        $this->template = $GLOBALS['phpgw']->template;
+                       $GLOBALS['phpgw_info']['flags']['app_header'] = 
lang('Calendar - [iv]Cal Importer');
                }
  
                function print_test($val,$title,$x_pre='')
                {
***************
*** 192,196 ****
  
                        $var = Array(
!                               'vcal_header'   => '<p>&nbsp;<b>' . 
lang('Calendar - [iv]Cal Importer') . '</b><hr><p>',
                                'ical_lang'             => lang('(i/v)Cal'),
                                'action_url'    => 
$GLOBALS['phpgw']->link('/index.php','menuaction=calendar.boicalendar.import'),
--- 192,196 ----
  
                        $var = Array(
!                               'vcal_header'   => '<p>',
                                'ical_lang'             => lang('(i/v)Cal'),
                                'action_url'    => 
$GLOBALS['phpgw']->link('/index.php','menuaction=calendar.boicalendar.import'),





reply via email to

[Prev in Thread] Current Thread [Next in Thread]