phpgroupware-cvs
[Top][All Lists]
Advanced

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

[Phpgroupware-cvs] CVS: notes/inc class.ui.inc.php,1.41,1.42


From: Bettina Gille <address@hidden>
Subject: [Phpgroupware-cvs] CVS: notes/inc class.ui.inc.php,1.41,1.42
Date: Sat, 02 Nov 2002 16:33:43 -0500

Update of /cvsroot/phpgroupware/notes/inc
In directory subversions:/tmp/cvs-serv6386/inc

Modified Files:
        class.ui.inc.php 
Log Message:
update xslt

Index: class.ui.inc.php
===================================================================
RCS file: /cvsroot/phpgroupware/notes/inc/class.ui.inc.php,v
retrieving revision 1.41
retrieving revision 1.42
diff -C2 -r1.41 -r1.42
*** class.ui.inc.php    25 Oct 2002 03:04:28 -0000      1.41
--- class.ui.inc.php    2 Nov 2002 21:33:41 -0000       1.42
***************
*** 63,234 ****
                }
  
-               function set_app_langs()
-               {
-                       
$this->t->set_var('bg_color',$GLOBALS['phpgw_info']['theme']['th_bg']);
-                       $tr_color = 
$this->nextmatchs->alternate_row_color($tr_color);
-                       $this->t->set_var('tr_color',$tr_color);
-                       $this->t->set_var('font',$this->bo->set_font());
-                       
$this->t->set_var('font_size',$this->bo->set_font_size());
-                       
$this->t->set_var('name',$GLOBALS['phpgw_info']['user']['fullname']);
- 
-                       $this->t->set_var('lang_categories',lang('Categories'));
-                       $this->t->set_var('lang_category',lang('Category'));
-                       $this->t->set_var('lang_notes',lang('Notes'));
-                       $this->t->set_var('lang_search',lang('Search'));
-                       $this->t->set_var('lang_submit',lang('Submit'));
-                       $this->t->set_var('lang_all',lang('All'));
-                       $this->t->set_var('lang_view',lang('View'));
-                       $this->t->set_var('lang_choose',lang('Choose the 
category'));
-                       $this->t->set_var('lang_access',lang('Private'));
-                       $this->t->set_var('lang_done',lang('Done'));
-                       $this->t->set_var('lang_save',lang('Save'));
-                       
$this->t->set_var('done_action',$GLOBALS['phpgw']->link('/index.php','menuaction=notes.ui._list'));
-               }
- 
-               function display_app_header()
-               {
-                       /*$this->t->set_file(array('header' => 'header.tpl'));
-             $this->t->set_block('header','notes_header');
- 
-                       $this->set_app_langs();
- 
-                       
$this->t->set_var('link_categories',$GLOBALS['phpgw']->link('/index.php','menuaction=preferences.uicategories.index&cats_app=notes&cats_level=True&global_cats=True'));
-                       
$this->t->set_var('link_notes',$GLOBALS['phpgw']->link('/notes/index.php','menuaction=notes.ui._list'));
-                       $this->t->fp('app_header','notes_header'); */
- 
-                       $GLOBALS['phpgw']->common->framework();
-               }
- 
-               function index_old()
-               {
-                       $this->display_app_header();
- 
-                       $this->t->set_file(array('notes_list_t' => 'list.tpl'));
-                       $this->t->set_block('notes_list_t','notes_list','list');
- 
-                       if (!$this->start)
-                       {
-                               $this->start = 0;
-                       }
- 
-                       $notes_list = 
$this->bo->read($this->start,$this->search,$this->filter,$this->cat_id);
- 
- // --------------------------------- nextmatch ---------------------------
- 
-                       $link_data = array
-                       (
-                               'menuaction' => 'notes.ui._list'
-                       );
- 
-                       $left = 
$this->nextmatchs->left('/index.php',$this->start,$this->bo->total_records,$link_data);
-                       $right = 
$this->nextmatchs->right('/index.php',$this->start,$this->bo->total_records,$link_data);
-                       $this->t->set_var('left',$left);
-                       $this->t->set_var('right',$right);
- 
-                       
$this->t->set_var('search_message',$this->nextmatchs->show_hits($this->bo->total_records,$this->start));
- 
- // -------------------------- end nextmatch 
------------------------------------
- 
-                       
$this->t->set_var('actionurl',$GLOBALS['phpgw']->link('/index.php',$link_data));
-                       $this->t->set_var('title_notes',lang('Personalized 
notes for'));
-                       
$this->t->set_var('cat_action',$GLOBALS['phpgw']->link('/index.php',$link_data));
-                       
$this->t->set_var('filter_action',$GLOBALS['phpgw']->link('/index.php',$link_data));
-                       
$this->t->set_var('category_list',$this->cats->formated_list('select','all',$this->cat_id,True));
- 
-                       switch($this->filter)
-                       {
-                               case 'all': $filter_sel[0]=' selected';break;
-                               case 'public': $filter_sel[1]=' selected';break;
-                               case 'private': $filter_sel[2]=' 
selected';break;
-                       }
- 
-                       $filter_list = '<option value="all"' . $filter_sel[0] . 
'>' . lang('Show all') . '</option>' . "\n"
-                               . '<option value="public"' . $filter_sel[1] . 
'>' . lang('Only yours') . '</option>' . "\n"
-                               . '<option value="private"' . $filter_sel[2] . 
'>' . lang('Private') . '</option>' . "\n";
- 
-                       $this->t->set_var('filter_list',$filter_list);
- 
-                       for ($i=0;$i<count($notes_list);$i++)
-                       {
-                               $note_owner = 
intval($notes_list[$i]['owner_id']);
-                               $new_dateout = $notes_list[$i]['date'];
- 
-                               $words = split(' 
',$GLOBALS['phpgw']->strip_html($notes_list[$i]['content']));
-                               $first = "$words[0] $words[1] $words[2] 
$words[3] .....";
-                               
$this->nextmatchs->template_alternate_row_color(&$this->t);
- 
-                               $this->t->set_var(array
-                               (
-                                       'new_date' => $new_dateout,
-                                       'first' => $first
-                               ));
- 
-                               $link_data['note_id']           = 
$notes_list[$i]['id'];
-                               $link_data['menuaction']        = 
'notes.ui.view';
- 
-                               
$this->t->set_var('view',$GLOBALS['phpgw']->link('/index.php',$link_data));
- 
-                               if 
($this->bo->check_perms($this->grants[$note_owner],PHPGW_ACL_EDIT) || 
$note_owner == $this->account)
-                               {
-                                       $link_data['menuaction'] = 
'notes.ui.edit';
-                                       
$this->t->set_var('edit',$GLOBALS['phpgw']->link('/index.php',$link_data));
-                                       
$this->t->set_var('lang_edit',lang('Edit'));
-                               }
-                               else
-                               {
-                                       $this->t->set_var('edit','');
-                                       $this->t->set_var('lang_edit','');
-                               }
- 
-                               if 
($this->bo->check_perms($this->grants[$note_owner],PHPGW_ACL_DELETE) || 
$note_owner == $this->account)
-                               {
-                                       $link_data['menuaction'] = 
'notes.ui.delete';
-                                       
$this->t->set_var('delete',$GLOBALS['phpgw']->link('/index.php',$link_data));
-                                       
$this->t->set_var('lang_delete',lang('Delete'));
-                               }
-                               else
-                               {
-                                       $this->t->set_var('delete','');
-                                       $this->t->set_var('lang_delete','');
-                               }
- 
-                               $this->t->fp('list','notes_list',True);
-                       }
- 
-                       if ($this->cat_id && $this->cat_id != 0)
-                       {
-                               $cat = 
$this->cats->return_single($this->cat_id);
-                       }
- 
-                       $link_data['menuaction']        = 'notes.ui.add';
-                       $link_data['cat_id']            = $this->cat_id;
- 
-                       if ($cat[0]['app_name'] == 'phpgw' || $cat[0]['owner'] 
== '-1' || !$this->cat_id)
-                       {
-                               $this->t->set_var('add','<form method="POST" 
action="' . $GLOBALS['phpgw']->link('/index.php',$link_data)
-                                       . '"><input type="submit" name="Add" 
value="' . lang('Add note') .'"></font></form>');
-                       }
-                       else
-                       {
-                               if 
($this->bo->check_perms($this->grants[$cat[0]['owner']],PHPGW_ACL_ADD) || 
$cat[0]['owner'] == $this->account)
-                               {
-                                       $this->t->set_var('add','<form 
method="POST" action="' . $GLOBALS['phpgw']->link('/index.php',$link_data)
-                                               . '"><input type="submit" 
name="Add" value="' . lang('Add note') .'"></font></form>');
-                               }
-                               else
-                               {
-                                       $this->t->set_var('add','');
-                               }
-                       }
- 
-                       $this->t->pfp('out','notes_list_t');
-                       $this->save_sessiondata();
-               }
- 
                function index()
                {
!                       $this->display_app_header();
! 
!                       
$GLOBALS['phpgw']->xslttpl->add_file(array('list',$GLOBALS['phpgw']->common->get_tpl_dir('phpgwapi','default')
 . SEP . 'app_header',
                                                                                
$GLOBALS['phpgw']->common->get_tpl_dir('phpgwapi','default') . SEP . 
'filter_select',
                                                                                
$GLOBALS['phpgw']->common->get_tpl_dir('phpgwapi','default') . SEP . 
'search_field',
--- 63,69 ----
                }
  
                function index()
                {
!                       
$GLOBALS['phpgw']->xslttpl->add_file(array('app_data',$GLOBALS['phpgw']->common->get_tpl_dir('phpgwapi','default')
 . SEP . 'app_header',
                                                                                
$GLOBALS['phpgw']->common->get_tpl_dir('phpgwapi','default') . SEP . 
'filter_select',
                                                                                
$GLOBALS['phpgw']->common->get_tpl_dir('phpgwapi','default') . SEP . 
'search_field',
***************
*** 314,325 ****
                        );
  
!                       //_debug_array($data);
! 
!                       $GLOBALS['phpgw']->xslttpl->set_var('list',$data);
! 
!                       //echo $this->tpl->xml_parse(); exit;
!                       //echo $this->tpl->xsl_parse(); exit;
! 
!                       $GLOBALS['phpgw']->xslttpl->pparse();
                        $this->save_sessiondata();
                }
--- 149,153 ----
                        );
  
!                       
$GLOBALS['phpgw']->xslttpl->set_var('phpgw',array('list' => $data));
                        $this->save_sessiondata();
                }
***************
*** 330,336 ****
                        $values         = get_var('values',array('POST'));
  
!                       $this->display_app_header();
! 
!                       
$GLOBALS['phpgw']->xslttpl->add_file(array('form',$GLOBALS['phpgw']->common->get_tpl_dir('phpgwapi','default')
 . SEP . 'app_header'));
  
                        if ($values['save'])
--- 158,162 ----
                        $values         = get_var('values',array('POST'));
  
!                       
$GLOBALS['phpgw']->xslttpl->add_file(array('app_data',$GLOBALS['phpgw']->common->get_tpl_dir('phpgwapi','default')
 . SEP . 'app_header'));
  
                        if ($values['save'])
***************
*** 384,452 ****
                        );
  
!                       if ($data['value_access'] == 'public')
!                       {
!                               unset($data['value_access']);
!                       }
! 
!                       $GLOBALS['phpgw']->xslttpl->set_var('form_data',$data);
!                       $GLOBALS['phpgw']->xslttpl->pparse();
!               }
! 
!               function edit_old()
!               {
!                       $note_id        = 
get_var('note_id',array('POST','GET'));
!                       $values         = get_var('values',array('POST','GET'));
! 
!                       $this->display_app_header();
! 
!                       $this->t->set_file(array('form' => 'form.tpl'));
!                       $this->t->set_block('form','add','addhandle');
!                       $this->t->set_block('form','edit','edithandle');
! 
!                       if ($new_cat)
!                       {
!                               $cat_id = $new_cat;
!                       }
! 
!                       if ($editnote)
!                       {
!                               $note['category'] = $cat_id;
!                               $note['id'] = $note_id;
! 
!                               $this->bo->save($note);
!                               $this->t->set_var('message',lang('Note has been 
updated for x !',$GLOBALS['phpgw_info']['user']['fullname']));
!                       }
!                       else
!                       {
!                               $this->t->set_var('message','');
!                       }
! 
!                       $note = $this->bo->read($note_id);
! 
!                       $this->t->set_var('lang_action',lang('Edit note for'));
!                       
$this->t->set_var('actionurl',$GLOBALS['phpgw']->link('/index.php','menuaction=notes.ui.edit&cat_id='
 . $cat_id . '&note_id=' . $note_id));
!                       
$this->t->set_var('content',$GLOBALS['phpgw']->strip_html($note['content']));
!                       
$this->t->set_var('main_cat_list',$this->cats->formated_list('select','all',$note['category'],'True'));
!                       $this->t->set_var('lang_edit',lang('Edit'));
! 
!                       $this->t->set_var('access','<input type="checkbox" 
name="note[access]" value="True"' . ($note['access'] == 'private'?' 
checked':'') . '>');
! 
!                       if 
($this->bo->check_perms($this->grants[$note['owner']],PHPGW_ACL_DELETE) || 
$note['owner'] == $this->account)
!                       {
!                               $this->t->set_var('delete','<form method="POST" 
action="' . 
$GLOBALS['phpgw']->link('/index.php','menuaction=notes.ui.delete&note_id=' . 
$note_id)
!                                       . '"><input type="submit" value="' . 
lang('Delete') .'"></form>');
!                       }
!                       else
!                       {
!                               $this->t->set_var('delete','&nbsp;');
!                       }
! 
!                       $this->t->set_var('edithandle','');
!                       $this->t->set_var('addhandle','');
!                       $this->t->pfp('out','form');
!                       $this->t->pfp('edithandle','edit');
                }
  
- 
                function delete()
                {
--- 210,216 ----
                        );
  
!                       
$GLOBALS['phpgw']->xslttpl->set_var('phpgw',array('edit' => $data));
                }
  
                function delete()
                {
***************
*** 465,470 ****
                        }
  
-                       $this->display_app_header();
- 
                        
$GLOBALS['phpgw']->xslttpl->add_file(array($GLOBALS['phpgw']->common->get_tpl_dir('phpgwapi','default')
 . SEP . 'app_delete',
                                                                                
$GLOBALS['phpgw']->common->get_tpl_dir('phpgwapi','default') . SEP . 
'app_header'));
--- 229,232 ----
***************
*** 483,488 ****
                        );
  
!                       $GLOBALS['phpgw']->xslttpl->set_var('delete',$data);
!                       $GLOBALS['phpgw']->xslttpl->pparse();
                }
  
--- 245,249 ----
                        );
  
!                       
$GLOBALS['phpgw']->xslttpl->set_var('phpgw',array('delete' => $data));
                }
  
***************
*** 490,496 ****
                {
                        $note_id = get_var('note_id',array('GET'));
-                       $this->display_app_header();
  
!                       
$GLOBALS['phpgw']->xslttpl->add_file(array('view',$GLOBALS['phpgw']->common->get_tpl_dir('phpgwapi','default')
 . SEP . 'app_header'));
  
                        $note = $this->bo->read_single($note_id);
--- 251,256 ----
                {
                        $note_id = get_var('note_id',array('GET'));
  
!                       
$GLOBALS['phpgw']->xslttpl->add_file(array('app_data',$GLOBALS['phpgw']->common->get_tpl_dir('phpgwapi','default')
 . SEP . 'app_header'));
  
                        $note = $this->bo->read_single($note_id);
***************
*** 506,510 ****
                                'lang_time_created'     => lang('time created'),
                                'lang_done'                     => lang('done'),
!                               'value_content'         => 
nl2br($note['content']),
                                'value_access'          => 
lang(ucfirst($note['access'])),
                                'value_cat'                     => 
$this->cats->id2name($note['cat']),
--- 266,270 ----
                                'lang_time_created'     => lang('time created'),
                                'lang_done'                     => lang('done'),
!                               'value_content'         => $note['content'],
                                'value_access'          => 
lang(ucfirst($note['access'])),
                                'value_cat'                     => 
$this->cats->id2name($note['cat']),
***************
*** 512,517 ****
                        );
  
!                       $GLOBALS['phpgw']->xslttpl->set_var('view_data',$data);
!                       $GLOBALS['phpgw']->xslttpl->pparse();
                }
        }
--- 272,276 ----
                        );
  
!                       
$GLOBALS['phpgw']->xslttpl->set_var('phpgw',array('view' => $data));
                }
        }





reply via email to

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